Exam topic 202.3 โ Alternate Bootloaders. Covers the Syslinux family, PXE network boot (BIOS and UEFI), UEFI Secure Boot with shim.efi/grubx64.efi, systemd-boot, and U-Boot for embedded systems.
LILO
LILO (Linux Loader) loads in two stages. During boot it prints the letters “L”, “I”, “L”, “O” one at a time โ each letter marks a completed stage. A partial sequence like LIL- or LIL? tells you exactly which stage failed.
In interactive mode (requires prompt in the config) LILO shows a menu of up to 16 entries. Without timeout=nnn (units of 0.1 s) the bootloader waits indefinitely. When the timeout expires, LILO boots the first image in the list unless default=name is set.
Configuration file: /etc/lilo.conf. After any change you must run /sbin/lilo to rewrite the MBR. The installer reads the config and writes the file map to /boot/map. LILO does not support UEFI and is largely obsolete.
# /etc/lilo.conf โ example configuration
boot=/dev/hda # device to write the bootloader to
prompt # show selection menu
timeout=150 # wait 15 seconds (150 ร 0.1 s)
lba32 # use LBA addressing
compact
vga=normal
root=/dev/hda1
read-only
menu-title=" My Computer "
# Linux kernels
image=/boot/zImage-1.5.99
label=try
image=/boot/zImage-1.0.9
label=1.0.9
image=/tamu/vmlinuz
label=tamu
initrd=initramdisk.img
root=/dev/hdb2
vga=ask
# Other OS
other=/dev/hda3
label=dos
boot-as=0x80
other=/dev/hdb1
label=Win98
boot-as=0x80
Exam trap: Unlike GRUB, LILO does not read
lilo.confat boot time โ only the installer/sbin/liloreads it. If you edit the file without running/sbin/lilo, the changes have no effect.
The Syslinux Family
The Syslinux project (syslinux.org) groups several bootloaders under one name. Each solves a different problem, but all use the same configuration file format.
| Bootloader | Filesystem / environment | Typical scenario |
|---|---|---|
| SYSLINUX | FAT (MS-DOS/Windows) | Bootable USB flash drive |
| ISOLINUX | ISO 9660 (CD/DVD) | LiveCD/LiveDVD distribution |
| EXTLINUX | ext2/3/4, btrfs | Embedded systems |
| PXELINUX | Network via PXE/TFTP | Network boot |
| MEMDISK | Any (via another bootloader) | Running DOS images |
SYSLINUX
SYSLINUX boots Linux from FAT partitions. Works only on Intel/AMD. The installer comes in three variants: syslinux for Linux, syslinux.exe for Windows, syslinux.com for DOS.
Key installer options:
| Option | Short | Description |
|---|---|---|
--install | -i | Install over the current bootsector |
--update | -U | Update a previous installation |
--directory | -d | Directory to install into |
--offset | -t | Filesystem offset on the device |
--raid | -r | On boot failure, try the next device |
--once=... | Execute a command once on next boot | |
--clear-once | -O | Clear the boot-once command |
--stupid | -s | Slow, safe mode |
--force | -f | Ignore warnings |
--menu-save= | -M | Set default label for next boot |
MS-DOS only options:
-m MBR: write a bootable MBR sector to the start of the disk
-a Active: mark the partition as active (bootable)
# Install on a USB drive: bootloader + MBR + active partition
syslinux --install -m -a /dev/sdb1
ISOLINUX
ISOLINUX boots from CD/DVD. Unlike syslinux, the ISOLINUX installer does not write directly to a device โ it generates an ISO image from a directory using xorriso. The directory must contain an isolinux/ folder with isolinux.bin.
# Minimum directory structure for building an ISO
my-iso/
โโโ isolinux/
โ โโโ isolinux.bin # the bootloader itself (required)
โ โโโ isolinux.cfg # configuration
โ โโโ ldlinux.c32 # module library
โโโ boot/
โโโ vmlinuz
To boot from USB, an additional file isohdpfx.bin is required โ a hybrid MBR image generated by xorriso.
EXTLINUX
EXTLINUX installs directly onto a mounted ext2/3/4 or btrfs filesystem.
extlinux --install /boot
Looks for its config at /boot/extlinux/extlinux.conf or /extlinux/extlinux.conf.
PXELINUX
PXELINUX acts as the second stage of PXE boot. The TFTP server provides pxelinux.0 together with the required library ldlinux.c32. Client configs live in /tftpboot/pxelinux.cfg/.
PXELINUX resolves the config filename using three methods (in priority order):
Method 1: DHCP options 209 and 210
Option 209 (pxelinux.config-file) sets the config filename. Option 210 (pxelinux.pathprefix) sets the path prefix on the TFTP server.
Method 2: Hardcoded in the pxelinux.0 image
The pxelinux-options utility embeds options directly into the pxelinux.0 image. Options can be before-options (DHCP takes priority) or after-options (they override DHCP).
Supported hardcoded options:
| Number | Option |
|---|---|
| 6 | domain-name-servers |
| 15 | domain-name |
| 54 | next-server |
| 209 | config-file |
| 210 | path-prefix |
| 211 | reboottime |
Method 3: Auto-derived from UUID, MAC, or IP
If no config is specified explicitly, PXELINUX tries filenames on the TFTP server in this order:
- Client UUID (lowercase)
- Client MAC address (lowercase, bytes separated by
-, e.g.01-aa-bb-cc-dd-ee-ff) - IP address as uppercase hex with shrinking prefix:
C0A80101,C0A8010,C0A801, …,C - File
default
Syslinux Configuration
All family members look for a config file syslinux.cfg in three locations in order: /boot/syslinux/, /syslinux/, /. ISOLINUX first checks /boot/isolinux/ and /isolinux/. EXTLINUX first checks /boot/extlinux/ and /extlinux/.
# syslinux.cfg / isolinux.cfg example
DEFAULT linux
TIMEOUT 50 # 5 seconds (units = 1/10 s)
PROMPT 1
LABEL linux
KERNEL /boot/vmlinuz
APPEND root=/dev/sda1 ro quiet
INITRD /boot/initrd.img
Key config directives:
| Directive | Purpose |
|---|---|
DEFAULT | Label to boot by default (overrides LABEL linux) |
TIMEOUT | Wait time for input in units of 1/10 second |
LABEL | Menu entry name |
KERNEL | Path to kernel image or next-stage bootloader |
APPEND | Parameters appended to kernel cmdline (only the last one applies) |
INITRD | Path to initial ramdisk โ equivalent to APPEND initrd=filename |
CONFIG | Restart boot with a different config file |
SYSAPPEND | Bitmask for auto-appending strings to kernel cmdline |
Note: By default the bootloader looks for the entry
LABEL linuxin the config. TheDEFAULTdirective overrides that label. TheCONFIGdirective with two paths overrides both the config file and the default directory for subsequent paths.
KERNEL file extensions:
| Extension | Image type |
|---|---|
.0 | PXE NBP (Network Boot Program), pxelinux.0 by default |
.bin | CD Boot Sector (ISOLINUX) |
.bs / .bss | DOS bootsectors (SYSLINUX) |
.com / .cbt | COMBOOT images (DOS / non-DOS) |
.c32 | COM32: COMBOOT before v5.00, ELF binary from v5.00 |
.img | Disk image (ISOLINUX) |
| no extension | Linux kernel |
The file type can be set explicitly using KERNEL aliases: LINUX, BOOT, BSS, PXE, FDIMAGE, COMBOOT, COM32.
SYSAPPEND takes a numeric bitmask. Each bit adds an auto-generated string to the kernel cmdline:
| Bit | String added |
|---|---|
| 1 | ip=client:bootserver:gw:netmask โ client network parameters |
| 2 | BOOTIF=... โ MAC address of the active network interface |
| 4 | SYSUUID=... โ system UUID |
| 8 | CPU=... โ processor information |
| 0x10โ0x10000 | Additional strings from DMI/SMBIOS |
Tip:
SYSAPPEND 3(bits 1+2) in a PXELINUX config appends both IP parameters and the interface MAC address to the kernel cmdline simultaneously โ useful for mass network installations where the kernel needs to know where it was loaded from.
PXE: Network Boot
PXE (Pre-boot Execution Environment) is an Intel specification extending BOOTP/DHCP and TFTP. It lets a machine boot without a local disk by fetching everything it needs from a network server.
PXE and BIOS
A PXE DHCP Discover contains at least five required options, three of which are PXE-specific:
| Option | Purpose |
|---|---|
| (53) | DHCP Message Type: Discover |
| (55) | Parameter Request List (including options 128โ135) |
| (93) | Client System Architecture โ architecture type |
| (94) | Client Network Device Interface โ UNDI version |
| (97) | UUID/GUID-based Client Identifier |
Options 93, 94, and 97 identify the client as PXE-capable. Option 55 must request the range 128โ135, even if the server is not required to provide them.
Boot sequence for BIOS:
1. Client sends DHCP Discover with PXE options (53, 55, 93, 94, 97)
2. DHCP server returns an IP address and bootloader filename
3. Client downloads pxelinux.0 and ldlinux.c32 via TFTP
4. pxelinux.0 requests a config file from pxelinux.cfg/
5. Kernel and initrd are downloaded via TFTP and booted
TFTP server layout:
/tftpboot/
โโโ pxelinux.0 # main PXELINUX bootloader
โโโ ldlinux.c32 # required library
โโโ pxelinux.cfg/
โโโ default # fallback config
โโโ 01-aa-bb-cc-dd-ee-ff # config by client MAC address
โโโ C0A80001 # config by IP address (hex, shrinking prefix)
Note โ Proxy DHCP: If the main DHCP server does not support PXE options, a Proxy DHCP server can be run alongside it. It listens on UDP port 4011 and adds only the PXE parameters on top of the main DHCP reply, without conflicting with it.
PXE and UEFI
With UEFI, PXE boot works differently: instead of pxelinux.0 the client requests an EFI bootloader. The Client System Architecture field (option 93) tells the server the client’s architecture.
# Option 93 (Client System Architecture) values:
0 = x86 BIOS
7 = EFI BC (64-bit x86 UEFI)
9 = x86 UEFI (32-bit)
For UEFI clients the TFTP server serves uefi/shim.efi or uefi/grubx64.efi. Example ISC DHCP config differentiating BIOS and UEFI:
# /etc/dhcp/dhcpd.conf: PXE fragment
if option arch = 00:07 {
# UEFI 64-bit
filename "uefi/shim.efi";
} else {
# Legacy BIOS
filename "pxelinux.0";
}
next-server 192.168.1.10; # TFTP server IP
UEFI and Secure Boot
UEFI (Unified Extensible Firmware Interface) replaces BIOS and stores bootloaders on a dedicated ESP (EFI System Partition) formatted as FAT. On Linux the ESP is typically mounted at /boot/efi. Bootloaders use the .efi extension.
Secure Boot requires a digital key: the UEFI firmware verifies the bootloader’s signature before running it. Major distributions โ Red Hat, Ubuntu, and SUSE โ have purchased such keys and work with Secure Boot out of the box. There are three ways to run Linux with Secure Boot enabled:
- Disable Secure Boot in UEFI settings โ simple, but reduces protection.
- Purchase your own signing key and sign each image.
- Use a signed shim from the Linux Foundation or Fedora.
If Secure Boot is preventing boot, first try disabling these firmware features:
- Quickboot / Fastboot
- Intel Smart Response Technology (ISRT)
- FastStartUp (if Windows 8 is installed)
On systems with Windows 8, UEFI settings can be reached via “Advanced startup options” directly from Windows. Some firmware supports both EFI and Legacy BIOS modes โ switching to Legacy resolves the issue.
shim and grubx64.efi
Shim is a small signed bootloader shim. UEFI launches shim.efi, which in turn launches grubx64.efi. This is convenient: shim is signed by a third party, while GRUB can be updated without re-signing.
ESP (/boot/efi/)
โโโ EFI/
โโโ uefi/
โโโ shim.efi # signed intermediary, launched by UEFI
โโโ grubx64.efi # GRUB2 for UEFI, launched by shim
Important for the exam: UEFI launches
shim.efi, andshim.efithen findsgrubx64.efiin the same directory. The filenames are fixed.
systemd-boot
systemd-boot (formerly gummiboot) is built into systemd and works only with EFI systems. It can launch any EFI executable: a Linux kernel via EFISTUB, a UEFI Shell, GRUB, or the Windows Boot Manager.
Managed via the bootctl command:
# Install systemd-boot to ESP
bootctl install
# Check status
bootctl status
# Update the bootloader
bootctl update
The ESP must be mounted, preferably at /boot. Configuration is stored in /boot/loader/:
/boot/loader/
โโโ loader.conf # main bootloader config
โโโ entries/
โโโ arch.conf # entry for Arch Linux
โโโ windows.conf # entry for Windows
# /boot/loader/loader.conf
default arch.conf
timeout 5
editor no
# /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sda2 rw quiet
Warning: systemd-boot cannot read configs from ext4 or other non-FAT partitions. The kernel and initrd must reside directly on the ESP or on a separate
/bootpartition in FAT.
U-Boot
Das U-Boot stands for Universal Boot Loader. It is an open-source primary bootloader for embedded devices, supporting a wide range of architectures: 68k, ARM, AVR32, Blackfin, MicroBlaze, MIPS, Nios, SuperH, PPC, and x86.
Key features of U-Boot:
- Loads kernels from flash memory, via network, from an SD card, or through a serial port.
- Requires explicit specification of memory addresses for copying the kernel and ramdisk โ other bootloaders choose addresses automatically; U-Boot does not.
- Can be split into multiple stages if firmware size is constrained.
- Low-level commands give flexibility, but booting a kernel requires several steps instead of one.
# Load kernel via TFTP and boot
setenv ipaddr 192.168.1.100
setenv serverip 192.168.1.10
tftp 0x80000000 uImage
bootm 0x80000000
# Load from SD card
mmc dev 0
load mmc 0:1 0x80000000 /boot/uImage
bootm 0x80000000
Note for LPIC-2: For the exam it is enough to understand that U-Boot targets embedded devices, is flexible and low-level, and requires explicit memory address management. Deep knowledge of commands is not tested.
Exam Cheat Sheet
Files and Utilities
| File / Utility | Purpose |
|---|---|
syslinux | Install bootloader on a FAT partition |
extlinux | Install bootloader on ext2/3/4, btrfs |
isolinux.bin | ISOLINUX bootloader binary for CD/DVD |
isolinux.cfg | ISOLINUX configuration |
isohdpfx.bin | Hybrid MBR for booting ISO from USB |
efiboot.img | EFI image for booting from CD on UEFI systems |
pxelinux.0 | PXELINUX bootloader for BIOS clients (TFTP) |
ldlinux.c32 | Required library alongside pxelinux.0 on TFTP |
pxelinux.cfg/ | Directory of per-client PXE configs |
pxelinux-options | Utility to hardcode options into pxelinux.0 |
uefi/shim.efi | Signed mini-bootloader for Secure Boot |
uefi/grubx64.efi | GRUB2 EFI image, launched by shim |
bootctl | Manage systemd-boot |
/etc/lilo.conf | LILO configuration |
/sbin/lilo | LILO installer (must be run after config changes) |
/boot/map | File map created by /sbin/lilo at install time |
Syslinux Config File Search Paths
| Bootloader | Config search locations |
|---|---|
| SYSLINUX | /boot/syslinux/, /syslinux/, / |
| ISOLINUX | /boot/isolinux/, /isolinux/, / |
| EXTLINUX | /boot/extlinux/, /extlinux/, / |
| PXELINUX | /tftpboot/pxelinux.cfg/ (UUID โ MAC โ IP โ default) |
PXE: Key DHCP Options
| DHCP Option | Role in PXE |
|---|---|
| (53) | DHCP Message Type: Discover |
| (55) | Parameter Request List (also requests 128โ135) |
| (93) | Client System Architecture (0=BIOS, 7=UEFI 64-bit) |
| (94) | Client Network Device Interface |
| (97) | Client UUID/GUID |
| (209) | pxelinux.config-file โ config filename |
| (210) | pxelinux.pathprefix โ TFTP path prefix |
| UDP 4011 | Proxy DHCP port |
SYSAPPEND Bits
| Bit | Appended to kernel cmdline |
|---|---|
| 1 | ip=client:bootserver:gw:netmask |
| 2 | BOOTIF= + MAC of active interface |
| 4 | SYSUUID= + system UUID |
| 8 | CPU= + processor info |
Common Mistakes
Warning โ frequent traps:
- Edited
/etc/lilo.confbut forgot to run/sbin/liloโ changes did not apply.pxelinux.0requiresldlinux.c32next to it on the TFTP server โ without it, boot fails.- systemd-boot requires the ESP mounted at
/boot, not at/boot/efi.isohdpfx.binis only needed for booting an ISO from USB โ not required for a regular CD.- With Secure Boot, UEFI launches
shim.efi, notgrubx64.efidirectly.- Only the last
APPENDdirective in the config applies โ previous ones are ignored.INITRD filenameis just syntactic sugar forAPPEND initrd=filename.
Practice Questions
Q1. You are setting up a PXE server for network boot. Which file does PXELINUX look for on the TFTP server first?
Answer: The file named after the client’s UUID (lowercase). PXELINUX tries names in order: UUID โ MAC address โ shrinking hex IP prefix โ default.
Q2. Which bootloader from the Syslinux family is used to boot from a FAT partition (e.g., a USB drive)?
Answer: SYSLINUX. ISOLINUX handles CD/DVD, EXTLINUX works with ext/btrfs, PXELINUX boots over the network.
Q3. What is the main config file for ISOLINUX?
Answer: isolinux.cfg. (isolinux.bin is the bootloader binary itself; isohdpfx.bin generates the hybrid MBR for USB.)
Q4. What does shim.efi do in the UEFI Secure Boot chain?
Answer: It acts as a signed intermediary between UEFI and grubx64.efi. UEFI launches the signed shim.efi, which then launches grubx64.efi. This allows using Secure Boot without purchasing your own signing key.
Q5. How does systemd-boot differ from GRUB?
Answer: systemd-boot works exclusively with UEFI systems and can only launch EFI executables. Its config lives in /boot/loader/, and it cannot read configs from ext4 or other non-FAT partitions.
Q6. What type of devices is U-Boot designed for?
Answer: Embedded devices with diverse architectures (ARM, MIPS, PPC, x86, etc.). Its distinguishing feature is requiring explicit memory address management โ other bootloaders choose addresses automatically.
Q7. You edited /etc/lilo.conf but the changes did not take effect after reboot. Why?
Answer: LILO does not read lilo.conf at boot time โ only the installer /sbin/lilo reads the file and writes the result to the MBR. Without running /sbin/lilo, changes to lilo.conf have no effect.
Q8. Which command is used to manage systemd-boot?
Answer: bootctl (bootctl install, bootctl status, bootctl update). efibootmgr manages UEFI Boot Manager entries, not the bootloader itself.
Q9. Which DHCP option in a PXE Discover request tells the server the client’s architecture (BIOS or UEFI)?
Answer: Option (93) Client System Architecture. Value 0 = x86 BIOS, value 7 = EFI BC (64-bit UEFI). The DHCP server uses this field to select the correct bootloader filename.
Q10. An admin wants the kernel to automatically receive network IP parameters and the interface MAC address on the cmdline during PXE boot. Which directive should be added to the PXELINUX config?
Answer: SYSAPPEND 3 โ sets bits 1 and 2 simultaneously. Bit 1 appends ip=client:bootserver:gw:netmask; bit 2 appends BOOTIF= with the MAC address of the active interface.