Settings

Theme

Boot Linux Without Grub

gauthier.uk

14 points by warenhor 4 years ago · 6 comments

Reader

gizmo686 4 years ago

Another approach is systemd-stub. This is a small bit of efi code that looks for the kernel and ramdisk within the efi executable itself.

An added benifit of this approach is that you can have a full linux system in a single file. In addition to being more convenient in many scenerios, this also means that your initrd and kernel commandline can be signed under secureboot.

If you are using dracut to create your ramdisk, it has an option to automatically package it into an EFI executable. Given the design of Dracut, you probably wouldn't use it to put the entire system into the EFI executable, as Dracut assumes its job is to load the real rootfs.

https://www.freedesktop.org/software/systemd/man/systemd-stu...

https://man7.org/linux/man-pages/man8/dracut.8.html

morsch 4 years ago

I recently reinstalled Windows 10 and Ubuntu 21.10 (in that order) in EFI mode. I had assumed that grub was superfluous even in that situation: I figured the BIOS would see that there's an EFI partition with several operating systems and let me choose one.

Well, apparently it doesn't work that way. The BIOS still just lets me pick a disk (or flash memory, pxe, ...). And then grub takes over.

Hilariously, Ubuntu did not automatically set up an entry for the Windows 10 install (something that had always worked for legacy setups). Had to do it by hand. Really not something I would have wanted to spend time on.

  • TingPing 4 years ago

    You absolutely don't need grub, you can use efibootmgr to manually edit the entries, or just use bootctl install.

oshiar53-0 4 years ago

Next we should make GRUB chainload itself

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection