Live data from Hacker News

No more boot loader: Please use the kernel instead

pretalx.com

321–330 of 460 posts

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

#321
I will translate the doublespeak from redhat, which is similar to how they started to push systemd (really).

> [grub] features create complexity that is difficult to maintain, and that both duplicate and lag behind the Linux kernel while also creating numerous security holes.

No mention of the alternatives. No mention how useful are those features. Handwaiving "security" arguments.

> Loaded by the EFI stub

All the talk about booting the kernel directly is moot, because by this they mean "we will use systemd-boot" ;)

IMHO, this is part of the RH wider push for PKCS11/TPM2/FIDO2 stuff. So it is not really fixing boot loader, as it is standardizing on their bootloader "as the correct one" but using the kernel reputation on the double speak.

Just like they pushed the equivalent of https://www.tenforums.com/attachments/tutorials/195499d15314... as the interface of init. (i'm not salty on systemd, in fact i already use bootd even. but if you cannot see how systemctl is the same UX as that, you are blind)

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

#322
post #116

A lot of the commentary here is based on misunderstandings of the capabilities and constraints of a UEFI environment and what the actual goals of this project are, and I think miss the mark to a large degree. Lennart's written some more explicit criticism at https://lwn.net/Articles/981149/ and I think that's a much more interesting set of concerns.

Thinking about it a bit more, though, it does feel like a hybrid approach is probably better. For dual-booting off local disks and other simple cases, just having the kernel and initramfs alongside other OS options makes a lot of sense, and you can use the UEFI boot menu or something deliberately simple like systemd-boot to select between them for dual-boot or recovery. For more complex cases (where your rootfs is not just something the kernel can mount on its own), instead you basically just want a process for building your initramfs to do that from a config like grub (which is already how a lot of cases like that are solved, anyway), and in extreme cases where you also want to stash a kernel in some other location then you can use kexec from that. But for just a boot menu (which is aready in the minority case and 90% of users in that case need nothing more) it feels even heavier than grub for little benefit.

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

#323

I will translate the doublespeak from redhat, which is similar to how they started to push systemd (really). > [grub] features create complexity that is difficult to maintain, and that both duplicate and lag behind the Linux kernel while also creating numerous security holes. No mention of the alternatives. No mention how useful are those features. Handwaiving "security" arguments. > Loaded by the EFI stub All the ta…

I should say *the joint RH/Microsoft/et al wider push for PKCS11/TPM2/FIDO2 stuff

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

#324
post #297

Earlier quoted context omitted.

> And dual booting is rarely needed anyway and generally just a pita. Just always boot into your preferred OS and virtualize the other one when you really need it. I've been dual-booting linux since the kernel 2.2.x era and being able to do it was a major driver to migrate away from windows. It is super important for onboarding of new users that can't yet get rid of windows fully - mostly because of gaming (yes proto…

Ideally rather than dual booting I would welcome something like running both OSes in sort of a virtual machine but being able to switch between them as easy as with a physical KVM. Having to actually restart a PC is a pain in the ass which is why I don't dual boot.

grubonce "osname" && reboot

is a pain in the ass? All the virtualization solutions are moot for gaming due to anticheat (plus 3d graphics virtualization not really working for windows)

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

#325

I'm curious if they're proposal will be capable of handling multi-os boots. I know grub can, I can have Linux and windows and possibly even a third OS if I want. I am concerned that red hats solution the well-intended, may be rather myopic, and be commercial only. What I failed to understand, is what problem this solves for systems that I probably only reboot once or twice a year. (Given that it only works with Linux…

The issue it solves, according to the talk, is that grub presents a fairly big attack surface for something that is sparsely maintained and that could be done in the kernel, which has a lot of active devs.

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

#326
post #268

See also this project: https://github.com/zhovner/OneFileLinux Not a bootloader, but a single-file, very light Linux image that can be loaded directly as an .EFI file. Not useful as an actual OS for daily use, but can have specialized uses (I used it to network boot a whole room of PCs to a Linux showing a slideshow on the framebuffer).

See also https://news.ycombinator.com/item?id=40914761, just posted on HN. Website of the project: https://hub.zhovner.com/geek/one-file-linux/

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

#327

Earlier quoted context omitted.

Yes, people dual boot. Particularly people who are contemplating a move from Windows. I'd hate to see Linux take the "my way or the highway" attitude of Windows.

My experience when I had a dual boot in the late 90's was that rebooting is such an interruption that you never become fully comfortable on one of the OS. You just stick to the OS you are used to and never really do the switch. While if don't dual boot you can switch completely to another OS and only use VM or remote desktop for the handful of use cases when you aren't ready yet (and then end ip abandoning them compl…

I don't think you got the point.

The experience of using a VM is not good, that's exactly why people are doing dual boot. They know what they are doing.

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

#328

Earlier quoted context omitted.

Maybe it is time to re-think the entire hardware boot process and ditch the BIOS altogether.

It probably was, but UEFI was not a good answer. I'd have preferred CoreBoot or OpenFirmware, but the PC industry was too slow to move and let Intel -- still smarting from Microsoft forcing it to adopt AMD's 64-bit x86 extensions -- take control of the firmware.

The problem with all of the alternatives is that they aren't friendly for alternative OS. They mostly operate on a fork model, so upstreaming support for an OS doesn't mean everyone using that bootloader will support your OS. You either need to pretend to be Linux with a sort of boot shim, or build and flash a custom bootloader with support, which might be non trivial if you cannot get access to the forked bootloader's code.

UEFI is just a standard interface, not an implementation of a bootloader. This enables multiple UEFI compliant implementations as well as an easy way for OS to support all UEFI based bootloaders without needing to coordinate with the owner of the bootloader. While I'm sure most would agree the UEFI interface may not be ideal, it has a lot of industry momentum, and is therefore probably the best option to get behind. There are a lot of players in this space (mostly hardware vendors) and coordinating anything is very difficult and takes a very long time.

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

#329
post #81

Earlier quoted context omitted.

Given the reason why "out-of-tree modules" exist, there's really no way to eliminate initramfs or something like it entirely in the general case. It might be possible to speed up the process of building the image (as long as the results are not "redistributed"), but this is a licensing and legal problem, not a technical one. FreeBSD is under a much more permissive non-copyleft license and so can legally bundle things…

You could probably build a "virtual initramfs": - linux tells the bootloader what folder the modules live - bootloader just puts them all in memory - linux just picks what it needs. That's all the initramfs is anyways. The point is there's no reason to prebuild an image from inside Linux, you can just have grub assemble a simple fs on the fly.

[deleted]

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

#330

Earlier quoted context omitted.

I use them in embedded systems because they allow me to mount encrypted volumes without exposing the keys.

How does that work? The keys have to be loaded from somewhere.

I guess from a hardware cryptography module or OPTEE[1]

[1] https://optee.readthedocs.io/en/latest/general/about.html

Post reply on HN