Skip to content

Mathis-Z/bootloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

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.

Features

  • 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.)

Missing Features

  • 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.

Starting using QEMU

  1. Create a virtual drive containing your system(s) using virtualbox
  2. Edit the Makefile so your drive gets mounted (make sure the partition with bootloader gets mounted first)
  3. Start with make run

Debugging with gdb

  • 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

Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •