Table of Contents
The bootstrap is downloaded by the client PXE ROM and executed in local. This a dependent binary architecture, so you should compile a bootstrap for intel x86, intel ia64, alpha...
The aim of a PXE Bootstrap is to give a minimalist user interface to choose the system you wish to boot.
The TCP/IP PXE system gets its bootstrap filename from the dhcp and determines its root directory from this filename. See Chapter 4, DHCP server for more details.
The Real PXE system gets its bootstrap from the pxe server depending on the client's architecture. See Chapter 3, PXE server for more details.
PXELinux is provided by Syslinux [7] and is called "pxelinux.0". Its main features are:
You can define a config file for each PXE Client IP address
The TFTP root directory is the one which contains pxelinux.0
PXEClient vendor-class-identifier request compilant.[8]
The Ability to boot a disk image (i.e floppy disk image)
All the configuration files are stored in the root path of the TFTP server (i.e /tftpboot). You can create a subdirectory that contains all the files needed by the PXE Client. In our case, I choose PXEClient, so all the files needed by my PXE Client will be stored in /tftpboot/PXEClient (PXEPATH). So your pxelinux.0 should be in PXEPATH and set in the dhcp configuration file. See Chapter 4, DHCP server for more details. Then create a pxelinux.cfg directory in PXEPATH (CFGPATH)
It will contain all the configuration files (one by PXE Client IP Address) and/or a "default" configuration file. The naming mecanism is to convert your IP address in a hexadecimal form. 192.168.200.1 will give you the name of "C0A8C801"CFGFILE [9] This file contains options of the PXE Client that will make the request with its 192.168.200.1 IP address.
Note: You can use soft links for CFGFILE (i.e C0A8C801 can be linked to default) but you can't link if the source file isn't in the same directory. You can use soft links but just with one directory level !
In PXEPATH, you must make a directory called images (IMGPATH) that will contain subdirectories (BOOTIMAGEPATH) for each boot system (i.e linux for linux boot images or a kernel and its initrd). Each BOOTIMAGEPATH contains a boot images or a kernel and its initrd and a help file.
Now you have the choice to boot directly from a disk boot image or from a kernel.
As we've seen before, the PXE client downloads the bootstrap (pxelinux.0 in our case), execute it locally and the tries to download its configuration file CFGFILE.
If flag_val is 0, display the boot: prompt only if the Shift or Alt key is pressed, or Caps Lock or Scroll lock is set (this is the default).
If flag_val is 1, always displays the boot: prompt.
Sets the default command line. If SYSLINUX boots automatically, it will act just as if the entries after DEFAULT had been typed in at the "boot:" prompt, except that the option "auto" is automatically added, indicating an automatic boot.
If no configuration file is present, or no DEFAULT entry is present in the config file, the default is kernel name "linux", with no options
Displays the indicated file on the screen at boot time (before the boot: prompt, if displayed). This option takes the place of the LINUXMSG.TXT and BOOTMSG.TXT files in SYSLINUX 1.0.
NOTE: If the file is missing, this option is simply ignored.
Indicates how long to wait at the boot: prompt until booting automatically, in units of 1/10 s. The timeout is cancelled as soon as the user types anything on the keyboard, the assumption being that the user will complete the command line already begun. A timeout of zero will disable the timeout completely, this is also the default.
NOTE: The maximum possible timeout value is 35996; corresponding to just below one hour.
KERNEL image APPEND options... IPAPPEND flag_val [PXELINUX only]
Indicates that if label is entered as the kernel to boot, SYSLINUX should instead boot image, and the specified APPEND and IPAPPEND options should be used instead of the ones specified in the global section of the file (before the first LABEL command.) The default for image is the same as label, and if no APPEND is given the default is to use the global entry (if any). Up to 128 LABEL entries are permitted. (for ISOLINUX, 64 LABEL entries.)
Note that LILO uses the syntax:
image = mykernel label = mylabel append = "myoptions"whereas SYSLINUX uses the syntax:
label mylabel kernel mykernel append myoptions
Notes: Labels are mangled as if they were filenames, and must be unique after mangling. For example, two labels "v2.1.30" and "v2.1.31" will not be distinguishable under SYSLINUX, since both mangle to the same DOS filename.
On PXELINUX, specifying LOCALBOOT 0 instead of a KERNEL option means invoking this particular label will cause a local disk boot instead of booting a kernel.
The argument 0 means perform a normal boot. The argument 4 will perform a local boot with the Universal Network Driver Interface (UNDI) driver still resident in memory. Finally, the argument 5 will perform a local boot with the entire PXE stack, including the UNDI driver, still resident in memory. All other values are undefined. If you don't know what the UNDI or PXE stacks are, don't worry -- you don't want them, just specify 0. On ISOLINUX, the "type" specifies the local drive number to boot from; 0x00 is the primary floppy drive and 0x80 is the primary hard drive. The special value -1 causes ISOLINUX to report failure to the BIOS, which, on recent BIOSes, should mean that the next boot device in the boot sequence should be activated.Displays the content of filename on the screen when a function key is pressed at the boot: prompt. This can be used to implement pre-boot online help (presumably for the kernel command line options.)
Note that F10 MUST be entered in the config file as "F0", not "F10", and that there is currently no way to bind file names to F11 and F12. Please see the section Section 6.2.3.3, “DISPLAY filename” on DISPLAY files.
Enables a serial port to act as the console. port is a number (0 = /dev/ttyS0 = COM1, etc.); if baudrate is omitted, the baud rate defaults to 9600 bps. The serial parameters are hardcoded to be 8 bits, no parity, 1 stop bit.
For this directive to be guaranteed to work properly, it should be the first directive in the configuration file.The PXE client will download (using a tftp server) the kernel in the path given in the KERNEL option. Then it downloads the initrd in the path given in APPEND initrd= option.
The PXE client then executes the kernel with the initrd and the option given by the APPEND option.
The PXE client will download (using a tftp server) a special kernel called memdisk (provided by syslinux) in the path given in the KERNEL option then it downloads the boot disk image in the path given in APPEND initrd= option. So your disk boot image is considered as an initrd of this virtual kernel. Then it tells the bios to boot on this image as it was a real floppy. Your drive A: under dos like systems is this boot image but that's not the case under linux.
In this a subdirectory of IMGPATH (maybe called linux) copy a boot image and call it boot.img (BOOTIMAGE) and create a file called help.txt with the description. The BOOTIMAGE is for example a network.img from the Mandrake Linux Distribution (in images/ directory of the cdrom) or a boot disk image. Then edit your config file in CFGPATH (the IP address converted in hexa or the "default" file) and add an entry.
Get a dos like boot image and executedd if=/dev/fd0 of=IMGPATH/dos/boot.img
you can do the same with rawwrite [10] under Microsoft Windows systems.
You can't specify many options for your real kernel unless you mount this image on a loopback device.
You can boot any kind of OS that can be installed on a floppy disk (DOS like system, QNX, linux)
You can boot a Mandrake Linux network boot image directly without extracting the kernel and its initrd.
This file should be stored in CFGPATH and called like a CFGFILE (i.e /tftpboot/PXEClient/pxelinux.cfg/default or /tftpboot/PXEClient/pxelinux.cfg/C0A8C801)
PROMPT 1 DEFAULT local DISPLAY messages TIMEOUT 50 label local LOCALBOOT 0 label linux KERNEL memdisk APPEND initrd=images/linux/network.img label freedos KERNEL memdisk APPEND initrd=images/freedos/boot.img label autoinstall KERNEL images/autoinstall/vmlinuz APPEND initrd=images/autoinstall/network.rdz ramdisk=32000 vga=788 kickstart=Mandrake/base/auto_inst.cfg.pl useless_thing_accepted automatic=method:nfs,network:dhcp,interface:eth0,dns:192.168.100.11,server:192.168.200.1,directory:/install root=/dev/ram3 F1 images/local/help.txt F2 images/linux/help.txt F3 images/freedos/help.txt F4 images/autoinstall/help.txt
PxeGrub is a bootstrap for PXE Client that gives you the ability to execute Grub through the network.
The PXE client downloads PxeGrub and executes it locally, PxeGrub tries to initialize the network card then downloads the menu (/boot/grub/menu.lst) and shows it. You can tell PxeGrub to download the kernel and its initrd on a tftp server. See Section 6.3.4, “Booting a kernel directly”.
Indicates how long to wait at the boot: prompt until booting automatically, in units of 1 second. The time is cancelled as soon as the user types anything on the keyboard, the assumption being that the user will complete the command line already begun. A timeout of zero will disable the timeout completely.
Tell PxeGrub to make a dhcp request before downloading the kernel and its initrd. If this entry is not set, pxegrub will use the one given to the PXE ROM by the DHCP.
Tell PxeGrub to contact a tftp server on the computer that uses the IP address ip_address.
Tell PxeGrub to get vmlinuz at vmlinuz_path with the options given. (nd)/ indicates that the file will be stored on the /boot located in the root directory of the tftpserver.
You just need to specify a new title, add a tftpserver name and give the right kernel path and the right initrd path. Save this file in /boot/grub/ GRUBPATH in tftp server home (TFTPHOME). i.e /tftpboot/boot/grub
Remember that your kernel and your initrd must be stored in GRUBPATH.
PxeGrub must be compiled for your ethernet card because it can't be compiled for multiple architectures. The first solution is to download grub [11] 0.91 or later and compile it with --enable-eepro100 option if you're using an Intel Ethernet Express Pro 100 or get the package called pxe-1.2.0-sample in the Mandrake Linux distribution : it contains all the images that Grub can provide.
This example shows you the way of auto_installing a Mandrake Linux through a ftp server after downloading a kernel (vmlinuz) and the initrd (network.rdz).
timeout 0 title linux tftpserver 192.168.200.1 kernel (nd)/vmlinuz vga=788 kickstart=Mandrake/base/auto_inst.cfg.pl useless_thing_accepted automatic=method:ftp,network:static,ip:192.168.200.25,dns:192.168.100.11,server:192.168.200.39,directory:/export,use a,pass:a initrd (nd)/network.rdz
NbGrub is a bootstrap for Etherboot [12] that gives you the ability to execute Grub through the network.
Etherboot loads a virtual ROM for your network card, makes a PXE request then downloads nbgrub and executes it locally, NbGrub tries to initialize the network card then it downloads the menu (/boot/grub/menu.lst) and shows it. You can tell NbGrub to download the kernel and its initrd on a tftp server. See Section 6.3.4, “Booting a kernel directly”.
The simplest way is to download a floppy boot image from the rom-o-matic website [13] and choose the 5.0.5 version at least. Choose your network card, set the REQUIRE_VCI_ETHERBOOT option, and choose Floppy Bootable ROM image.
Then make add if=the_file_you_ve_download of=/dev/fd0 You can execute now it by booting this floppy disk.
Note : Etherboot version 5.0 and later needs an option vendor-class-identifier set to Etherboot-5.0 and a special vendor-encapsulated-options set to 3c:09:45:74:68:65:72:62:6f:6f:74:ff. See Chapter 3, PXE server for more details.
Options are the same as PxeGrub so read the PxeGrub documention above, see Section 6.3.3, “Options of menu.lst”.
The same as PxeGrub, see Section 6.3.7, “Advantages and drawbacks”.
The PXE client ask the Pxe Server for its configuration then shows a menu. User selects an entry or waits until the timeout expires. Then the client loads the kernel and its initrd on a tftp server defined in the pxe.conf file. NBP is the only client that can use the menu features is NBP. See Section 3.2, “Options in pxe.conf” for details.
NBP is the PXE client designed by RedHat ™ available in the source rpm of pxe [14] NBP is also packaged in pxe-1.2.0 rpm from the Mandrake Linux distribution. NBP bootstrap is usually called linux.0 and stored in /tftpboot/X86PC/linux/. See Section 3.2, “Options in pxe.conf” for details.