diff --git a/log/2024-03-26.md b/log/2024-03-26.md index 09c5bd6..a57607a 100644 --- a/log/2024-03-26.md +++ b/log/2024-03-26.md @@ -350,6 +350,15 @@ fn panic(_info: &core::panic::PanicInfo) -> ! { # Building the kernel To build the kernel I just run `cargo build` in the `kernel` directory. This will produce a binary called `kernel/target/i686-bare-metal/debug/kernel.elf`. I now have a multiboot enabled kernel :) +# Grub +Now to turn the kernel into a ISO file with a bootloader, I used grub. To configure grub I needed to create a directory for it. I made `build/isodir/boot/grub/grub.cfg` containing this: +``` +menuentry "geos" { + multiboot /boot/geos.bin +} +``` +Then I copied `kernel/target/i686-bare-metal/debug/kernel.elf` to `isodir/boot/geos.bin`. Then I ran `grub-mkrescue -o build/geos.iso build/isodir` to make an ISO containing my OS and grub. Yippee + # File structure ``` geos/