Live data from Hacker News

No more boot loader: Please use the kernel instead

pretalx.com

51–60 of 460 posts

Re: No more boot loader: Please use the kernel instead

#51
post #32

Earlier quoted context omitted.

Right before that paragraph, they cite issues with GRUB as a motivation for this work. What confuses me is that Redhat already has a GRUB replacement in systemd-boot. Is this work intended to obviate that as well, or is it going to relate to it somehow? I imagine doing all this and tying it to systemd would generate some backlash like usual (although at this point, it seems unlikely that this would affect the plans g…

>I imagine doing all this and tying it to systemd would generate some backlash like usual (although at this point, it seems unlikely that this would affect the plans given how few distros don't use systemd). systemd-boot is independent of systemd. It's called "systemd-" because it's under the same "group of core OS software" umbrella named "systemd", but otherwise it can be compiled independently, does not require th…

>To be clear, systemd-boot doesn't replace GRUB, in that systemd-boot can only boot other EFI binaries, so it still requires the kernel to be compiled as a UKI. A GRUB setup with a regular vmlinuz + separate initramfs in root partition (or boot partition that's not the ESP) can't be replaced with systemd-boot directly. You first need to switch to a UKI-in-ESP setup.

That's wrong, my laptop right now uses systemd-boot with a vmlinuz and an initramfs, no UKI. See a configuration example here: https://wiki.archlinux.org/title/Systemd-boot#Adding_loaders

Re: No more boot loader: Please use the kernel instead

#52

It's something you can do since a lot of years. I used to do so 10 years ago, when I've got the first motherboard with UEFI. But is it useful? It saves a minimal time in the boot sequence, but at what cost? The bootloader (being it grub, or something more simple as systemd-boot) is useful to me for a couple of reasons: - it allows to dual-boot with Windows easily: motherboard boot menu is often not easy to access, yo…

Just because the boot loader is using Linux, it doesn’t prevent an alternative OS from being booted into, so there is nothing fundamentally stopping all of grub’s features from working in this new scheme.

Re: No more boot loader: Please use the kernel instead

#54
post #38

What's the point of using this over plain EFISTUB? I use it with Arch, and whenever I want to boot to Windows, I just use the BIOS menu. I don't see what benefit a Linux-based bootloader provides.

EFISTUB requires recompiling the kernel every time initramfs, microcode or commandline change, no? That would get annoying pretty quickly on desktop PCs, which are not that fast with recompiling, and would need to do all of this quite often, e.g. on nvidia driver updates.

I've never once had to recompile the kernel on my laptop for any reason. The kernel command line is set in the bios entry, which is somewhat tedious to change, but that's just an efibootmgr command. Initramfs gets rebuilt by pacman on larger updates, but that would happen no matter what bootloader I use.

Re: No more boot loader: Please use the kernel instead

#55

It's something you can do since a lot of years. I used to do so 10 years ago, when I've got the first motherboard with UEFI. But is it useful? It saves a minimal time in the boot sequence, but at what cost? The bootloader (being it grub, or something more simple as systemd-boot) is useful to me for a couple of reasons: - it allows to dual-boot with Windows easily: motherboard boot menu is often not easy to access, yo…

rEFInd is the magic tool here.

Personally I still use GRUB for all of the reasons you stated above. But rEFInd + kernel gets you pretty close.

Re: No more boot loader: Please use the kernel instead

#56
post #44

Or, really, use the ROM's boot loader. This is getting closer to the way QNX booted decades ago. The boot image has the kernel and whatever user space programs and .so files you decide to include. For a deeply embedded system, you might not have a file system or networking. For desktop QNX (discontinued), you'd have some disk drivers, a file system driver, a network driver, and a shell, along with a startup script, t…

QNX still works that way. It's just no longer free.

Re: No more boot loader: Please use the kernel instead

#57
>"Although GRUB is quite versatile and capable, its features create complexity that is difficult to maintain, and that both duplicate and lag behind the Linux kernel while also creating numerous security holes."

We agree thus far -- that GRUB may create unnecessary complexity and security holes (Note the relationship between "complexity" and "security holes" -- where you find one, you will usually find the other... they're intertwined like Yin and Yang -- you usually don't get one aspect alone by itself -- without also getting the other...)...

>"Loaded by the EFI stub on UEFI"

"Er, begging the question Governor" but isn't EFI and UEFI also a bootloader?

Aren't those systems also complex?

I think the article is trying to make the point that a small EFI stub program which loads a larger program, in this case, a modified version of the Linux Kernel itself could easily be audited for security issues, and yes, that's sort of true -- but remember that the EFI loader, no matter how small, still has to run in the UEFI environment, and the entire UEFI environment is anything but not complex...

Phrased another way, running a tiny open source, secure program on a gigantic, complex black-box VM with many undocumented/opaqued/"black box" parts -- may not be all that secure...

Still, any small part of a system that could be made simpler despite there being other obscure "black box" undocumented or poorly documented complex components at play -- is definitely a step in the right direction towards full future transparency and auditability...

Re: No more boot loader: Please use the kernel instead

#58
post #27

I was about to discuss/joke about the possibility of systemd absorbing this project. And hold and behold turns out there is already systemd-boot project competing in this space. I was not aware of that at all.

systemd-boot is actually pretty great. If you're looking for a lean fast (multi-os) uefi bootloader systemd-boot is much easier to set up and less fiddly than grub. I haven't reached for grub in years.

Re: No more boot loader: Please use the kernel instead

#59
post #2

I personally think they're moving in the wrong direction. I'd rather have "NMIRFS" (no more initramfs). Eg, a smarter bootloader that understands all bootable filesystems and cooperates with the kernel to pre-load modules needed for boot and obviates the need for initramfs. FreeBSD's loader does this, and its so much easier to deal with. Eg, it understands ZFS, and can pre-load storage driver modules and zfs.ko for t…

This requires a bunch of additional logic in the bootloader (eg, providing disk encryption keys), and since you're not doing this in a fully-featured OS environment (as you are in the initramfs case) it's going to be hard providing a consistent experience through the entire boot process. Having the pre-boot environment be a (slightly) cut-down version of the actual OS means all your tooling can be shared between the two environments.

Re: No more boot loader: Please use the kernel instead

#60

Earlier quoted context omitted.

>I imagine doing all this and tying it to systemd would generate some backlash like usual (although at this point, it seems unlikely that this would affect the plans given how few distros don't use systemd). systemd-boot is independent of systemd. It's called "systemd-" because it's under the same "group of core OS software" umbrella named "systemd", but otherwise it can be compiled independently, does not require th…

>To be clear, systemd-boot doesn't replace GRUB, in that systemd-boot can only boot other EFI binaries, so it still requires the kernel to be compiled as a UKI. A GRUB setup with a regular vmlinuz + separate initramfs in root partition (or boot partition that's not the ESP) can't be replaced with systemd-boot directly. You first need to switch to a UKI-in-ESP setup. That's wrong, my laptop right now uses systemd-boot…

Ah yes, I've used it with the default auto-detected UKIs for so long that I forgot about the explicit loader entries config.
Post reply on HN