by MobiusHorizons · 3y ago · 0 comments
Does anyone know why anyone would choose systemd-boot over something like efistub?
For trivial setups (one kernel that keeps getting updated in-place), a boot manager is not required. For more sophisticated setups (version in kernel file name or Nix style system versions or whatever), a boot manager is very convenient.
Personally the only reason I have it in the loop is it makes it so much easier to switch the an lts kernel if say... zfs has failed to build on a kernel update and I didn't notice (not that THAT would ever happen). Could use multiple EFI entries for that, but systemd-boot is simpler.
Is this not exactly what GRUB is, on UEFI systems?
Simply put: It can boot Linux on EFI without EFISTUB.
- the same disk is now impossible/harder to boot in another system/mainboard.
- no more choice between different kernels in case the newest one broke something
- to change the cmdline with kenel parameters you now need to run efibootmgr
Still, the quick boot can be worth it :-)
It's the most simple boot setup I've ever used, and it doesn't have the mentioned issues:
> the same disk is now impossible/harder to boot in another system/mainboard.
Just go and select your UKI in the EFI boot-manger. Works on every modern system OOTB.
> no more choice between different kernels in case the newest one broke something
You can have more than one UKI around. You can, for example, have even one with a whole recovery system included in the initrd part!
> to change the cmdline with kenel parameters you now need to run efibootmgr
You only need to recreate the UKI with an updated command line. No change to the boot-manager needed.
Also a UKI has a better security story compared to all other options. You have only one signed EFI binary. No need for complex setups that validate the initrd after the fact, as everything is included in the UKI and signed as a whole.
Have this setup on my Debian box but used actually the superior documentation form the Arch wiki to get there.
I just recently switched all of my Arch boxes to this setup. The first was so I could enable Secure Boot on that machine, the rest just because it felt so much simpler and cleaner than Grub. Actually, the last one just stopped booting entirely with Grub but worked just fine with UKI.
> You can have more than one UKI around. You can, for example, have even one with a whole recovery system included in the initrd part!
Same! I was considering writing up how to do this for the Arch wiki since it’s handy and I couldn’t find any complete guides.
Ah, I see. That's a deal breaker for me. Switching to an older kernel has saved me many times, usually when I completely mess up my nvidia drivers.
This was an MSI motherboard in case anyone's wondering.
EDIT: Anyway, I'd probably only ever rely on an external USB stick, but I don't know how that interacts with Secure Boot, tbh. I use Ventoy + loads of images of popular distros. Can fit quite a few distros on a 128 GiB USB stick! :D
There are hardware solutions to that problem, but most regular PCs don't come with a remotely-accessible boot menu.
I want to enter a sane booting environment as soon as possible (gummiboot, refind, grub). Also why not? Its basically free and In my experience doesnt really complicate secure boot.
The persistence of GRUB for x86-64 systems is both fascinating and irritating; the original driver for users paying the price of the complexity of GRUB was the idea that it would bring consistency across architectures and be an overall reduction in complexity for distro maintainers. Instead the bootloaders for non-x86 architectures are generally not-GRUB (zipl, various ARM options which are sometimes SoC specific, and so on), while x86 users are stuck with the byzantine complexity of GRUB.
Then I have some distro-supplied kernels, with initram, modules, non-standard parameters AND grub, just for those times when I need something exotic. I have to stop the normal boot with Esc and select the second boot option from the UEFI menu, that points to grub. It's clumsy and slow but I just need it once in a blue moon.
Lots of people dual boot without manually going through their UEFI. It's important enough that I can see why many distros wouldn't make it default.
Optimizing a few seconds off of something you seldom do isn't that useful. (Not that I haven't been guilty of that, again and again and again and...)
Disclaimer: I don't meet the 8 hour goal and the unattended boot of my office machine setup has been incomplete for 5 years...
Edit: We do also nightly builds, but they take between 5 minutes and less than 3 hours.
Actually it would be interesting to calculate whether frequent reboots don't use more energy in sum than putting the machine into sleep. Does anybody have numbers on that?
Discaimer: Have not worked with mobile phones for 10+ years.
I still use GRUB because IIRC my Gigabyte motherboard kept forgetting entries and/or associated settings.
You have so many different hardware vendors, but one common boot loader. Who can you rely on working every time for every vendor?
Also I use grub to select old deploys in Fedora Silverblue.
I'd love to use systemd-boot though.
With an UKI your whole boot setup is a self-contained and portable EFI executable.