Pulsar PXE Loader
Pulsar is a multiboot-compliant PXE loader that can boot an ELF kernel and a set of modules over the network. It requires a network card with built-in PXE ROM, a DHCP server and a TFTP server. The BIOS boot device must be set to "network device".
Boot Process
- The BIOS invokes the PXE ROM of the network card.
- The PXE ROM requests an IP address from a DHCP server.
- The DHCP server responds with an IP address, a TFTP server address, a bootstrap file and optionally a root path.
- The PXE ROM loads the bootfile (Pulsar) from the TFTP server and executes it.
- Pulsar retrieves a configuration file, describing which modules and kernel to load from the TFTP server.
- After loading all modules, Pulsar unpacks and starts the kernel.
Setup
For the following examples you would need to copy the Pulsar binary and any initial configuration files to the directory /boot/tftp of your TFTP server.Booting on Bare Hardware
You need to setup a TFTP server and a DHCP server.TFTP
The TFTP server can be started from inetd. With the -s option you can specify the host directory that will be used as TFTP root directory.in.tftpd -s /boot/tftp
DHCP
The following DHCP server configuration instructs clients to use Pulsar as PXE boot loader. You must adapt the configuration to your network setup:host testbox { # Hostname of the machine hardware ethernet aa:bb:cc:dd:ee:ff; # Hardware address of the machine fixed-address 192.168.0.2; # IP address of the machine next-server 192.168.0.1; # TFTP server address, can be omitted if same machine as DHCP server filename "pulsar"; # Bootstrap file option root-path ""; # Root path relative to TFTP root directory (typically not needed if tftpd runs with -s) }
Booting under QEMU
There is no need to setup a TFTP or DHCP server because QEMU has that functionality built in. The following command line instructs QEMU to use Pulsar as PXE boot loader:qemu -boot n -tftp /boot/tftp -bootp pulsar
Configuration
Pulsar loads the initial configuration file config-aa-bb-cc-dd-ee-ff from the TFTP server, where aa-bb-cc-dd-ee-ff is the MAC address of the booting network card. The configuration file currently accepts the following commands:addr <addr> Sets memory address where boot modules will be loaded. chld <file> Chainload a different PXE boot loader. conf <file> Loads a new configuration file and processes it. exec <file> <cmdline> Loads and unpacks the specified ELF file. The last executable loaded this way will be started. load <file> <cmdline> Loads a module and creates a multiboot module structure for it. root <path> Sets TFTP server root path. tftp <ip addr> Sets TFTP server address.Each command affects the lines succeeding it until overridden by another command of the same type. A hash sign (#) at the beginning of a line turns the entire line into a comment. A backslash (\) at the end of a line is treated as line wrap.
Examples
- NOVA microhypervisor with pingpong, loaded from the nova directory on the TFTP server.
root nova exec hypervisor iommu serial spinner load pingpong
- L4/Fiasco kernel with pingpong, loaded at address 0x2000000 from the l4 directory on the TFTP server.
root l4 addr 0x2000000 exec bootstrap -serial load fiasco -serial_esc load sigma0 load roottask load pingpong
- Linux kernel with ramdisk, loaded from the linux directory on the TFTP server (note that the ramdisk must precede the kernel image).
root linux load ramdisk.gz exec bzImage root=/dev/ram0
- PXEGrub chainloaded from the pxe directory of the TFTP server at 192.168.0.1.
tftp 192.168.0.1 root pxe chld pxegrub.pxe