How to manage a set of PC's with a BOOTP/TFTP server

National Botanic Garden of Belgium

Alain@BR.fgov.be

First release: June'98; current: Aug'98

Sample menus (try to 'install' Win95 or Linux)
Menu generator (generating HTML and bpb scripts from a symbolic script)


Introduction

To handle the difficulty to manage a pool of PCs, it is more and more important to avoid 'artisanal' procedures and to develop some generalized methods for installation, rescuing and housekeeping.

The last year was full of hypes about Network Computers and similar approaches : they try to work around the fact that PCs are 'Unsafe At Any Megahertz : today PCs are the most crash-prone computers ever built' [Crash-Proof Computing, Tom R. Halfhill, BYTE April'98, pp 60-74 - cover story and other]

The 'remoteboot.HOWTO' provided with recent releases of Linux gave us a good way to attack the problem without being linked to any OS (mix of MS DOS /Windows311 /Windows95 /WindowsNT /Linux)

It allows us to use conventional PCs, even disregarded 486 ones, when enjoying the advantages of the NC approach [see 'Disposable PCs, Tom R. Halfhill, BYTE Feb'98, pp 62-74 for a general overview about the 'Users Revolt'].

INCOM publish a very good discussion about this crisis and present their approach as a compromise between a total shift towards NC paradigm and a revisited classical PC paradigm.

At the Genève University, the installation of the student PCs is refreshed at each reboot (allowing to reconfigure 'on-the-fly' a PC), using a cache at the end of the hard disk to limit the network load. Their feature-rich software (MrZip/MrBatch Pre-Boot Batch Processor for MS-DOS and Linux) fills in all my expectations, allowing to handle many situations by end-user menus (starting from an interpreted scripting language, to a full Dual-Boot system configuration [automated partitionning/formatting plus Win95 AND Linux install and configuration : 18 min].

Here, the followed path is an hybride one between diskless machines (NC...) and classical PCs : the dynamic configuration is used only during the installation/rescue step; later on, the local hard disk is used normally.

So, the network or the bootp/tftp server is not required after this configuration step (robustness).

On the server side :

tftp    dgram   udp     wait    root    /usr/sbin/tcpd  in.tftpd
bootps  dgram   udp     wait    root    /usr/sbin/tcpd  bootpd -d 4
# GLOBAL--(included by the tag 'tc=.ether' into the PCs definitions)-----------
.ether:hn:\
        sm=255.255.255.0:\
        dn=BR.fgov.be:\
        ds=193.190.116.2:\
        gw=193.190.117.254:\
        vm=rfc1048:\
        ht=ether:\
        hd=/tftpboot:\
        bf=bpbatch:T155="index":
# ------------- PCs ----------
PC_96:tc=.ether:ha=00104B496599:ip=193.190.117.72:\
      T156="Alain Empain":T157="alain"
PC_97:tc=.ether:ha=00104B4965ed:ip=193.190.117.73:\
       T156="Alain Drèze":T157="alaind"
....

On each client :

To install a new machine (of a known configuration family - disk size, PCI...)

  1. Rescue -> Partition; (allow to partition the disks and to format each partition 'on-the-fly' as FAT, BIG DOS, Linux...)
  2. Rescue -> Load a full system -> Load Win95/Load Linux...

Dual-boot PC's

To allow a Windows-95 / Linux-X Window dual boot ability, the disk is divided into

  1. a SYSTEM DOS/Windows partition (can be erased and reinstalled)
  2. a SYSTEM Linux partition (can be erased and reinstalled)
  3. a DATA partition (the permanent user's data partition, seen by Windows95 as D: and as /d by Linux)
  4. a small SWAP partition
  5. This disposition allows to rescue/upgrade a full SYSTEM partition, without degrading the DATA partition
  6. 
      Remark: 
    
         * the partition 1 (Win95 system) must be PRIMARY
         * the partition 2 (Linux system) must be PRIMARY
         * the data partition (D:) must be LOGICAL (PRIMARY is fine for Linux; 
            it seems good as well for Win95, until you reboot : Win95 detects FAT
            errors and starts scandisk). 
    
    
    I use a DEBIAN startup disk to partition for the first time the disk, with this typical layout (total space is 1.7 GB)
    /dev/hda1     Boot  Primary    Dos Fat16       500.07   
    /dev/hda2           Primary    Linux           299.25  (asked : 300)
    /dev/hda4           Extended           
    /dev/hda5           Logical    Dos Fat16       620,16  (asked : 620)
    /dev/hda6           Logical    Linux swap      19.69   (asked : 20)
    
    A large buffer is left at the end of the hard disk (for tftp system recovery) It would be possible to reclaim this normally unused buffer, declaring it as a PRIMARY partition (/dev/hda3) with the bpbatch command 'setpartitions'.
    Untested till now (Aug'98).

Remote file system

To do some housekeeping (DATA partition backup and configuration backups, new packages...)

To rescue a machine (reinstall a fresh copy of the wanted OS, e.g. a bugged Win95 installation)

To install a new OS version


Not too difficult, indeed ;-)

Package images

To build an compressed image XX.imz of a package, install the package on a TEMPLATE PC, then, using 'mrzip' of Genève University, pack it and place the resulting compressed image on the tftp server (in /tftpboot/XX/XX.imz). An install and setup procedure must be added (see below).


SCRIPT to build up a COMPRESSED image:

(run on the TEMPLATE PC, under the target OS : LINUX: mrzip or DOS/WIN: mrzip.exe)

        set fragmentsize="30 Mb"
        filter -"var/log/*"
        filter -"tmp/*"
        Source Path "{:2}/"    (the LINUX system partition)
        Dest archive "/c/suse51.img"  (the mounted DOS c: disk)
        CopyArchive
echo "Done..."


INSTALL script for Linux: (rem: suse51/setup is on the server)

        showlog
echo "Resetting the cache"
        clean -1
        fullunzip "suse51/linux.imz" 2   (2 is the Linux system partition)
        include "suse51/setup"


SETUP script for Windows95

(rem win95/xxx files are on the server at /tftpboot/win95 ; {:1}/ is the local default disk, partition 1, aka c:\ )

echo "...Setup: creating c:\\bin\\registry.reg"
echo "   You must activate it with the command   c:\\bin\\adjust  under Win95"
        patch "win95/registry.ref" "{:1}/bin/registry.reg"
        copy  "win95/adjust.bat" "{:1}/bin/adjust.bat"
echo "...Patching nestcape.ini"
        patch "win95/netscape.ref" "{:1}/win_ut/netscape/netscape.ini"
echo "...Patching eudora.ini"
        patch "win95/eudora.ref" "{:1}/win_ut/eudora/eudora.ini"
echo "...Creating D: paths for Eudora and Netscape; D: is on the DATA partition #3 of the default disk"
        mkdir "{:3}/tmp"
        mkdir "{:3}/win_data/netscape/cache"
        mkdir "{:3}/win_data/netscape/news"
        mkdir "{:3}/win_data/netscape/mail"
        mkdir "{:3}/attach"


SAMPLE of REFERENCE file (eudora.ref -> real eudora.ini)

(to be patched with the current parameters, such as current IP number -- BOOTP-157 and BOOTP-156 are user-defined)

[Configurations]
POPAccount=${BOOTP-Option-157}@${BOOTP-Domain-Name}
RealName="${BOOTP-Option-156}"
SMTPServer=${BOOTP-SMTP-Servers}
PrinterFont=ç-N
CheckForMailEvery=15
ScreenFont=MS Sans Serif
AutoReceiveAttachments=8
AutoReceiveAttachmentsDirectory=d:\ATTACH
...


Windows95 REGISTRY handling