Table of Contents
Client : The PXE code sends a DHCP request to any listening server (Broadcast): a DHCPDISCOVER packet
Server: If concerned, the server answers the client with a DHCPOFFER packet (IP address offer)
Client: The client selects among the response, a suitable response packet and sends a DHCPREQUEST to the selected server.
Server: The server answers by a DHCPACK packet.
Client: In the exchanged packets, the client will find: an IP address, the TFTP IP address, a filename to download (the NBP). The client which has now an assigned IP address, makes a TFTP request to get the FILENAME that will be its start-up program (it will be downloaded at address 0x7C00, just as any bootstrap program in the x86 world.) It is called NBP in the Intel PXE specification (stands for Network Bootstrap Program). NBP will use the PXE API to make other actions. The PXE API mainly supply services for: TFTP API, UDP API and UNDI API.
![]() |
|---|
At client's boot-time via PXE: Client obtains, through DHCP, its IP address and the FILENAME "/tftpboot/revoboot/bin/revoboot.pxe" that it will download and execute.
Linbox BootLoader execution (revoboot.pxe). A hardware scan takes place (device detection, memory and CPU detection, hard-disk partitions' size) and the result is sent to the server, over UDP port 1001 (HwPacket type).
"getClientResponse" acting as a daemon, gets this UDP packet and does an update of hardware information (stored in ./log) AND an update of the client's configuration file (if it exists, of course, which is not the case if the client is a newly added machine on the network).
The bootloader seeks for a configuration file. The bootloader successively tries /tftpboot/revoboot/cfg/IP, /tftpboot/revoboot/cfg/MAC & /tftpboot/revoboot/cfg/default . IP and MAC are respectively the IP and the MAC address, written in hexadecimal form (ex. C0A80080, 0010DCB049F8)
The bootloader interprets the commands contained in this file.
Instructions that are outside of a "title" tag are immediately executed (e.g. "color", "timeout", "default", etc).
Instructions that are located within "title" tags are only executed when that particular title gets selected in the menu. This menu is built from the "title" list from the configuration file.
Whenever a new workstation gets added in the list, a new entry in the /tftpboot/revoboot/images is created (whose name will be the MAC address of that workstation, expressed in hexadecimal. For example: "0010DCB049F8".) and a configuration file that will be stored in the /tftpboot/revoboot/cfg folder (its name will also be the MAC address in hexadecimal). The content of the image folder and the configuration file will be filled from the skeleton which is contained in the /tftpboot/revoboot/imgskel folder (It mainly contains at start: links to /tftpboot/revoboot/imgbase, empty folders for later storage and a "header.lst" file).
We have four command types in a configuration file and two images types :
For commands:
Restoration commands ("partcopy", "parttype", "ptabs".)
Back up commands (using a Linux kernel & initrd for diskless boot).
System commands (for misc. functions of the LRS system : "inc", "identify", etc.)
The underlying bootloader commands, (i.e. GRuB "root (x)", "chainloader +1", etc.)
For images:
Images that are specifically made for one workstation, stored in its own folder: "Local images".
Images that are made available to any workstation that are part of the LRS system, stored in the /tftpboot/revoboot/imgbase common folder base/shared images, that can be used for duplication/deployment.
Images are created when launching a "backup" type command. A diskless kernel will be launched on the workstation to be saved. Partitions on the hard-disk will be scanned one after the other, and depending on the filesystem type (FAT,NTFS,EXT2/3,REISERFS,SWAP), a specific utility will be used to save the partition's content. Files will be saved in the folder that is specified in the kernel's command line (revosave=/xxxxx/xxxxx/xxx/xxx), which is mounted using NFS on the /revosave mount-point. Created image files (that will be used by the restoration BootLoader) will by 86MByte long at maximum (this is imposed by the TFTP protocol) and thus, the content of a large partition will be automatically split into many files called PXYYY, where X is the partition's number (as in /dev/hda1 ... /dev/hdaX) and YYY will be between 000 and 999 or more depending on the partition's size.
During restoration, a command such as "partcopy" will ask for the server (using TFTP protocol) the files needed for re-building the hard-disk's partitions. The command will adjust the partition's table content in case the hard-disk geometry has changed (useful for duplication and/or hard-disk's exchange). By manipulating the configuration file directly (or only part of it, using the "conf.txt" files), it is possible to restore only a specific partition, and not the full hard-disk's content. See later explanations about conf.txt files, header.lst files and the content of /tftpboot/revoboot/cfg, for that.
On the first boot, the "/tftpboot/revoboot/cfg/default" configuration file is used. It will look like this :
timeout 20 default 1 title boot-disk root (hd0) chainloader +1 title identify-station identify reboot
Explanations :
timeout 20 : automatically start on default after 20 seconds
default 1 : the default will be the title number 1 (it starts at "0" !!!)
title boot-disk : title of menu 0 : "boot-disk"
root (hd0) : the root will be disk 0
(we could have (hd0,0) that means that root will be the boot sector
of the first partition on the disk).
chainloader +1 : is equivalent to "chainloader 0+1", and means load one ("1")
sector starting at sector 0 ("0") from the current root ( "(hd0)"
or "(hd0,0)").
title identify-station : menu 1, title "identify-station"
identify : "identify" command : asks for a machine name and an administration ID,
then sends an UDP packet to "getClientResponse" daemon.
reboot : restart the client.
getClientResponse will verify information such as a license and creates the new station's folder using the skeleton in /tftpboot/revoboot/imgskel, its configuration file, finds a free IP address and assigns it to the station, updates the /etc/dhcpd.conf file, restarts the "dhcpd" service on the server and adds the station to the list of already known stations (LRS file, stored in /tftpboot/revoboot/etc/ether).
timeout 10 color 7/1 15/3 default 0 hiddenmenu title Local Hard-Disk desc Boot on the local disk root (hd0) chainloader +1 title Floppy desc Boot on the local floppy root (fd0) chainloader +1 title Create Backup Image (Local) desc Save HD to Local Image kernel (nd)/tftpboot/revoboot/bin/bzImage.initrd revosavedir=/images/0010DCB037CF/Copy-1 initrd (nd)/tftpboot/revoboot/bin/initrd.gz inc COPY title Creation Image (Base) desc Save HD to Shared Image kernel (nd)/tftpboot/revoboot/bin/bzImage.initrd revosavedir=/imgbase/Base-2 initrd (d)/tftpboot/revoboot/bin/initrd.gz inc BASE title MBR Fix desc Fix MasterBootRecord content root (hd0) mbr (nd)/tftpboot/revoboot/bin/mbr446.bin pause title Utility : MemTest86 desc Test PC's RAM using MemTest86 kernel (nd)/tftpboot/revoboot/bin/memtest.bin title Win98 Base desc Restore a Win98 basis partcopy (hd0,0) 63 /tftpboot/revoboot/images/0010DCB037CF/Base-1/part1_ parttype (hd0,0) 12 root (hd0,0) chainloader +1
Explanations : (new commands)
color xx/yy tt/zz : sets the menu colors to xx/yy (fore/background) for "normal"
display and to tt/zz for highlighted display.
hiddenmenu : LBL will not display the menu, unless user presses
"shift-alt-shift" (if not pressed, just wait for timeout...)
desc XXXX : a small description for the menu entry (will be displayed under
the menu box when the menu entry will be highlighted)
root (fd0) : same that "root (hd0)", but for the floppy ( (hdX,Y)=harddisk
X,partition Y, (fdX)=floppy X, (nd)=network device )
kernel FILE ARGS : to load a kernel file (or equivalent) and supply ARGS as
command-line.
initrd FILE : to load an "initrd" file, i.e. a (compressed) disk on with the
kernel will boot (for diskless use, for example)
inc, mbr : see command description.
partcopy, parttype ... : in the above example, we are restoring the partition number 0
of first disk (i.e. C:\) with the files that are contained in
"/tftpboot/revoboot/images/0010DCB037CF/Base-1/", the first
sector of this partition being the 63th (we could have used
-first instead of 63). We then change the partition type : we set
it to 12 (FAT32,LBA) and we are then booting directly on its
bootsector (sector 0 of disk 0, partition 0).
This configuration file has been built from information that are stored in the "header.lst" file, stored in the station's folder (/tftpboot/revoboot/image/MAC). This file will look like:
[header] item=timeout 10 item=color 7/1 15/3 item=default DEFNUM item=hiddenmenu [menu1] def=yes visu=yes image=Local-Disk include=Local-Disk/conf.txt [menu2] def=no visu=yes image=Local-Floppy include=Local-Floppy/conf.txt [menu3] def=no visu=yes image=Backup-L include=Backup-L/conf.txt [menu4] def=no visu=yes image=Backup-B include=Backup-B/conf.txt [menu5] def=no visu=yes image=Util-Mbr include=Util-Mbr/conf.txt [menu6] def=no visu=yes image=Util-MemTest include=Util-MemTest/conf.txt [menu7] def=no visu=yes image=Base-1 include=Base-1/conf.txt
Please notice that this file does not contain any "partcopy","parttype", or other commands. This file will only contain information related to the "visible yes/no" status and/or "default yes/no" status of the menu entry. Commands that will form the rest of the configuration file are located in "conf.txt" files that are located within the image storage folders (/tftpboot/revoboot/images/MAC/foldername/conf.txt and /tftpboot/revoboot/imgbase/foldername/conf.txt). As a practical example to understand, below are the contents of the client's folder:
. |-- Backup-B | `-- conf.txt |-- Backup-L | `-- conf.txt |-- Base-1 -> ../../imgbase/Base-1 |-- COPYNUM |-- Copy-1 | |-- conf.txt | |-- part1_000 | `-- part1_idx |-- Copy-2 |-- Local-Disk -> ../../imgbase/Local-Disk |-- Local-Floppy -> ../../imgbase/Local-Floppy |-- Util-Mbr -> ../../imgbase/Util-Mbr |-- Util-MemTest -> ../../imgbase/Util-MemTest `-- header.lst
Folders Backup-B, Backup-L, Copy-1, Copy-2 are real local folders that belong to the client. The folders are used for storage of "local images." Folders Local-Disk, Local-Floppy, Util-Mbr, Util-MemTest are in fact symbolic links that point to /tftpboot/revoboot/imgbase/xxx folders that contain mainly a conf.txt file. Since they are not really needed to STORE image file (they only contains some commands such as "kernel", "mbr", etc). Folder Base-1 (symbolic link to /tftpboot/revoboot/imgbase/Base-1) is different. We find:
total 161392 -rw-r--r-- 1 root root 128 déc 19 17:23 conf.txt -rw-r--r-- 1 root root 36605958 déc 10 13:13 part1_000 -rw-r--r-- 1 root root 38500328 déc 10 13:15 part1_001 -rw-r--r-- 1 root root 38938023 déc 10 13:17 part1_002 -rw-r--r-- 1 root root 33404765 déc 10 13:18 part1_003 -rw-r--r-- 1 root root 17316535 déc 10 13:19 part1_004 -rw-r--r-- 1 root root 77 déc 10 13:19 part1_005 ... -rw-r--r-- 1 root root 77 déc 10 13:19 part1_112 -rw-r--r-- 1 root root 78 déc 10 13:19 part1_113 -rw-r--r-- 1 root root 33778 déc 10 13:19 part1_idx
The "conf.txt" file contains the following:
title Win98 Base desc Restore a Win98 basis partcopy (hd0,0) 63 PATH/part1_ parttype (hd0,0) 12 root (hd0,0) chainloader +1
This is exactly the set of commands that were in the configuration file (at the end of the file) that was presented in the beginning of this chapter (except for the "PATH" part, what will be on-the-fly substituted by the real path of the files when the configuration file will be updated). The other "substitutable" fields are: PATH, replaced by "/tftpboot/revoboot/images/MACADDR"; MAC, replaced by "MACADDR"; COPYNUM, replaced by the content of "/tftpboot/revoboot/images/MACADDR/COPYNUM"; BASENUM, replaced by the content of "/tftpboot/revoboot/imgbase/BASENUM", where MACADDR represents the client's MAC address, expressed in hexadecimal.
"partcopy" : syntax "partcopy PART START FILEPREFIX" :
Copy image files starting with FILEPREFIX (FILEPREFIX000 to FILEPREFIXxxx, where xxx is in fact contained in the header of file PREFIX000) over partition PART, using GRUB's notation such as "(hd0,0)", that starts at sector START (LBA). START can be replaced by "-first" which means that the image will start on the first sector of the second cylinder/head (which in most case should be 63 is the geometry is a standard CHS XXX/YY/63). START can be replaced by "-next" to start on the first sector of the cyl/head immediately following the previous partition entry.
"parttype" : syntax "parttype PART TYPE"
Assign type TYPE to partition PART. Warning, this action is not done by partcopy by default (except for some "standard" types)!
"mbr" : syntax "mbr FILE"
Copy the MBR that is contained in FILE on the hard-disk's MasterBootRecord (i.e. 1st sector). Warning, 512 bytes is the maximum read size! Everything is erased on the current MBR (includes the partition table if the mbr's size is greater than 446 bytes). Done on the CURRENT disk, thus you MUST set it using a "root" command BEFORE!
"pciscan" : syntax "pciscan"
Interactive version of the automatically executed at boot-time command.
"identify" : syntax "identify"
Asks for a machine NAME and an administrator ID, then sends an IdPacket (UDP, port 1001) to the LRS server.
"identifyauto" : syntax "identifyauto"
Same as "identify," but non interactive. NAME and ID are set to "+" (this is a cluster specific configuration option).
"inc" : syntax "inc BASE|COPY"
Sends an Inc packet (UDP, port 1001) to the server, to handle automatic creation of storage folders (either Base or Local (Copy)).
"setdefault" : syntax "setdefault NUMBER"
Sends a packet (UDP, port 1001) to the server, to modify the default grub entry for the next reboot. '0' means the 1st entry. After each backup, the default entry is set to the 1st one.
The back up process is done by booting a Linux kernel, using an "initrd" (ramdisk).
The kernel is using the ramdisk's content as its root-filesystem (/)
The network interface is probed by trying each driver listed in the /etc/modules list (/etc/modules.full is used if the keyword 'revofull' was specified in the kernel's boot parameters).
Net's parameters are obtained using DHCP, using "pump" program.
If the "revodebug" keyword is found on the kernel's boot parameters, then no back up will occur, and you will be able to log in as root. In this debug mode, you can run "floppysave" to write boot log files to a MSDOS formatted floppy in the case where the network card cannot be initialized and log files cannot be sent to the LRS.
The partitions and disks which will be backed up are those listed in /proc/partitions.
The backup itself will be done in the /revosave folder, which in fact is a mount-point for a NFS mounted folder whose name is obtained using some kernel passed parameters on the "command line" (revosavedir=/xxx/xxx).
The main script used for the backup is called "/bin/autosave". This script's purpose is to successively launch the programs "image_fat","image_ntfs","image_ext2" and "image_reiserfs" until one of them returns a NULL error code, that means that its internal tests were successful and that the filesystem was recognised. The program is then launched a second time, but this time it saves the data contained in the partition to the image files in /revosave folder.
At the end of the process (all partitions saved), the kernel reboots the computer.

