A bootloader written in rust
Find a file
2025-08-09 01:02:35 +02:00
bios bios-kern: Add BiosDisk 2025-08-09 01:02:35 +02:00
common common-kern: Add alloc::string to the prelude 2025-08-09 00:58:23 +02:00
modules module-api: Add DiskError 2025-08-09 00:59:30 +02:00
src Initial Commit; get bootsector to work 2025-01-29 08:46:23 +01:00
tools tools/install: make sure that the boot signature is present in install_bootsector 2025-02-27 02:19:00 +01:00
.gitignore Update gitignore 2025-07-30 18:44:32 +02:00
32bit-module.json Fix custom target to work with newer nigthly versions 2025-07-29 16:25:45 +02:00
bits16-bootsector.json Fix custom target to work with newer nigthly versions 2025-07-29 16:25:45 +02:00
bochsrc.bxrc Initial Commit; get bootsector to work 2025-01-29 08:46:23 +01:00
build.rs common-kern: Add alloc::string to the prelude 2025-08-09 00:58:23 +02:00
bx_enh_dbg.ini Initial Commit; get bootsector to work 2025-01-29 08:46:23 +01:00
Cargo.lock building: Add a check for the baseaddress in kern's 2025-07-25 12:30:45 +02:00
Cargo.toml common-macros: Add crate and implement own format_args_nl 2025-08-08 23:50:26 +02:00
LICENSE Initial Commit; get bootsector to work 2025-01-29 08:46:23 +01:00
readme.md readme: add attribution to GRUB 2025-07-26 13:44:34 +02:00
rust-toolchain.toml Initial Commit; get bootsector to work 2025-01-29 08:46:23 +01:00
test.sh Initial Commit; get bootsector to work 2025-01-29 08:46:23 +01:00

rustboot

A bootloader entirely written in rust.

License

This project is licensed under AGPL3.0-or-later; for more details see the LICENSE file.

How to build

  1. Install rustup
  2. Install the rust nightly toolchain
  3. Run cargo build in the repositories root.
  4. ...
  5. Profit!

How to use

Currently, only the stage1 of the bootloader is implemented; usage is somewhat limited. However, it can be loaded up by both QEMU and bochs and read & execute itself again, demonstrating that it is indeed functional.

To do exactly that, use the test.sh script inside the repo. As first argument supply the emulator you want to use; supported are currently qemu and bochs:

  • ./test.sh qemu, or
  • ./test.sh bochs

FAQ (Or simply some infos that might come up all over the place):

  • Q: Whats a kern? A: It's a german word for core and was choosen for a number of reasons, including to not be confusing with rust's core crate, and because I didn't want to use the word kernel as this word is commonly assosicated with something like the linux kernel, and would give folks a false impression of what a kern in rustboot is. It's just the core of rustboot itself, reponsible for loading modules and actually doing stuff to get towards a bootable system.

Attribution & Thanks

  • GRUB for an amazing piece of software that inspired a lot of the features of this project. I learned a lot by reading through their sourcecode!
  • num_traits for ispiration how to do casting of primitives via generics & traits.