Repository navigation
x86_64_lilo: legacy non-secure BIOS/MBR boot with a LILO-style installer - #956
Open
danielinux wants to merge 2 commits into
Open
danielinux wants to merge 2 commits into
danielinux wants to merge 2 commits into
Conversation
danielinux
commented
Oct 28, 2026
Member
- Target: x86_64_lilo adds a third x86_64 boot path, alongside UEFI (x86_64_efi) and Intel FSP. It boots from the MBR on legacy BIOS machines with no EFI or FSP stage; the example configuration uses SIGN=NONE.
- Boot chain: A 446‑byte MBR loader reads wolfBoot from the sectors before the first partition into memory at 0x7E00 using BIOS LBA disk reads. wolfBoot runs in flat 32‑bit protected mode and drops back to real mode for each BIOS disk, keyboard, video and memory‑map call, so it needs no storage driver of its own.
- Kernel loading: Kernels and initrds are read by file path from a FAT32 partition using wolfBoot's existing FAT32 code. Each kernel is a wolfBoot image, checked with the standard verification before boot. The kernel is started through the Linux real‑mode boot protocol, and other= entries chain‑load a partition boot sector.
- User interface: It reproduces LILO's behaviour: the L/I/L/O progress letters, a boot: prompt with labels and aliases, Tab to list entries, timeout/delay/Shift key handling, extra parameters typed after the label, and an optional serial console. If an image is missing or fails verification, it returns to the prompt instead of halting.
- Installer (tools/lilo): It reads /etc/lilo.conf and accepts the usual lilo options (-C -b -i -D -s -t -q -u -v). It writes a CRC‑protected boot map at LBA 1 and wolfBoot at LBA 34, keeping the disk signature and partition table. Before writing anything it checks every image with wolfBoot's own partition and FAT32 code. Because the map holds file paths rather than lists of disk sectors, kernels can be replaced without re‑running the installer.
- Constraints: It supports MBR partitioning only and refuses GPT disks. other= only reaches primary partitions 1–4. Unsupported lilo.conf options such as password and restricted are rejected rather than ignored. With SIGN=NONE, the image check only detects corruption and authenticates nothing.
- Validation: tools/lilo/test/run-qemu.py builds a disk image, installs wolfBoot with the installer and boots a stock x86_64 kernel under SeaBIOS. It covers default boot after the timeout, a label with extra parameters typed at the prompt, recovery from an unknown label and a corrupted image, and chain loading. All scenarios pass under both KVM and TCG. The default boot was also checked by hand on IDE, AHCI (q35) and virtio‑blk disks. A CI workflow runs the suite in the wolfboot-ci-x86 container but has not run yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.