Does anyone know why anyone would choose systemd-boot over something like efistub?
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 :-)
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.
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.
Most devices out there will always boot the first entry (or BootNext) no questions asked. Some devices may allow reordering boot loader entries in their setup program. Almost no devices will actually a) pause booting whenever there are multiple valid entries b) show you a menu where you can choose one of alternatives c) respect your timeout value, choosing the first boot entry if the timeout expires. Incidentally these 3 happen to be the basic properties of what people usually demand from a boot manager.
I've only ever got those white in a blue screen firmwares.
It's not all flames of course. But the design of the firmware UI certainly got really flamboyant when UEFI hit the scene while quality of implementation really suffered.
It's gotten somewhat better, but now it's getting hard to buy non-enterprise hardware without over 9000 RGB LEDs on there. Sigh. At least the LEDs don't bother my bootloader.
> UEFI allows the consolidation of boot menus from the OS loader and platform firmware into a single platform firmware menu. These platform firmware menus will allow the selection of any UEFI OS loader from any partition on any boot medium that is supported by UEFI boot services. An UEFI OS loader can support multiple options that can appear on the user interface. It is also possible to include legacy boot options, such as booting from the A: or C: drive in the platform firmware boot menus.
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
Of course, the firmware may be configured to refuse to boot a USB drive as a matter of policy.
There are hardware solutions to that problem, but most regular PCs don't come with a remotely-accessible boot menu.
This was an MSI motherboard in case anyone's wondering.
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.
Some kind of ideas are stupid and we must go back to reasoning about real problems, not fictional problems.
A computer that stays in sleep most of the times is the last problem we have in modern societies.
Meanwhile people set their home temperature at 30C in winter (when it's 10-15C outside) and the AC at 16C during summer (when it's 28-30C outside)
maybe just don't?
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.