This project is a UEFI bootloader similar to grub, written in Rust. It can boot Linux and modern Windows systems but is focused on Linux. It is meant for demonstration and educational purposes rather than production use.
- Starting x86_64 Linux bzImages (oldest tested kernel 3.11.0) with both the deprecated EFI handover protocol and the normal 64 bit boot protocol
- EFI chainloading (starting other .efi applications like grub or the Windows bootloader)
- Reading from FAT, ext2 and ext4 file systems (The crate for ext2/4 file systems can only read empty journals or journals with a specific feature set. Mount and unmount your disk to empty the journal if necessary.)
- Booting OpenBSD / FreeBSD
- Reading CDROMs (missing a crate for parsing ISO9660 unfortunately)
- Support for more file systems
- Advanced features like network booting, secure boot, etc.
- Create a virtual drive containing your system(s) using virtualbox
- Edit the Makefile so your drive gets mounted (make sure the partition with bootloader gets mounted first)
- Start with
make run
- Start with
make debug
- Connect to
target remote :1234
using gdb (like this) - Normal breakpoints don't work; use hardware assisted breakpoints (hbreak) instead
- Use the pwndbg plugin if you want gdb to look cool
- To get output from early kernel booting, set "keep_bootcon earlyprintk=serial,ttyS0,115200" in the kernel cmdline and switch to serial0 in QEMU
- Rust UEFI github: https://github.com/rust-osdev/uefi-rs
- Rust UEFI tutorial: https://rust-osdev.github.io/uefi-rs/HEAD/introduction.html
- Linux Kernel Boot Protocol: https://github.com/torvalds/linux/blob/v4.16/Documentation/x86/boot.txt
- Kernel booting process: https://0xax.gitbooks.io/linux-insides/content/Booting/linux-bootstrap-1.html
- EFI handover protocol: https://www.kernel.org/doc/html/v5.6/x86/boot.html#efi-handover-protocol