Page 1 of 1

Simpleboot, a suckless GRUB alternative

Posted: Thu Jul 20, 2023 7:15 am
by simpleboot
Hi OSDevers,

I've created a simple boot loader in the spirit of suckless.org. I got fed up how difficult it is to use grub-install, and how much dependencies grub-mkrescue has. So I created a dependency-free tool (portable executable available on Windows and Linux as well), a single command which can create a bootable disk image with ease or make existing images or actual devices bootable. Free and Open Source, MIT licensed.

Simpleboot

Usage:

Code: Select all

simpleboot (input directory) (output image file)
That's all. It takes the contents of the given directory and constructs an image file from them that then can be booted on UEFI machines as well as on legacy BIOS systems. No further steps required, and it is totally dependency-free (neither mtools nor root privilege required, it Just Works). Command line tool's manual can be found here.

Supported kernel formats:
  • ELF (32-bit CDECL, 64-bit SysV ABI with Multiboot2 protocol)
  • COFF/PE32+ (32-bit CDECL, 64-bit MS fastcall ABI with Multiboot2 protocol)
  • Linux kernel (x86 boot protocol)
The Multiboot2 protocol is the same as grub's, but simpler and more featureful (and yet, still backward compatible): there's no need for embedded data (it uses a plain test file instead), and it is also capable of loading higher-half (upper-half) kernels, and passes the MBI to your entry point using standard ABI for your kernel format. The full boot protocol specification can be found here.

Minimal example kernels are provided in the repo, the Multiboot2 version is almost 100% the same as in the Multiboot2 spec, but it prints the info on the serial console and not as VGA text (Simpleboot sets up the framebuffer for you). There's also a Linux kernel mock up example, in case you want to support the Linux boot protocol in your kernel. Makfile rules to boot under qemu (UEFI and BIOS) and bochs (BIOS) also provided.

Cheers

Re: Simpleboot, a suckless GRUB alternative

Posted: Tue Sep 12, 2023 2:50 am
by Alexey1994
Thanks! You helped me with my raspberry.

Re: Simpleboot, a suckless GRUB alternative

Posted: Mon Dec 02, 2024 5:44 am
by alecco
I was looking for a fast and simple bootloader for a bare metal cloud/server kernel.
No more being annoyed with sudo prompts to make disk images.
And most of the code is readable C instead of assembly.
This is brilliant.
Thanks.