Live data from Hacker News

No more boot loader: Please use the kernel instead

pretalx.com

191–200 of 460 posts

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

#191
post #176
post #169

Earlier quoted context omitted.

you seem to be saying that they are using two separate kernels, one for the bootloader and one for the final boot target the title text says 'Loaded by the EFI stub on UEFI, and packed into a unified kernel image (UKI), the kernel, initramfs, and kernel command line, contain everything they need to reach the final boot target' which sounds like they're not talking about using two separate kernels, one for the bootloa…

I watched the video. They have two different configurations, one where there’s only one kernel, one where there are indeed two separate kernels with one kexec’ing to the other.

thank you for your sacrifice and for the resulting correction to my error

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

#192
I'm a big fan of compiling my own kernel with all needed drivers compiled in, with the EFI stub compiled in, no initram, no grub, a fixed cmdline that works 99% of times.

This allows a boot to happen in less than 5 seconds.

The 1% of times I need something different, I use the boot selector provided by the firmware to boot to grub (that's installed anyway), where I have the usual plethora of choices.

Is there a key to be pressed at the right moment? There is. I even have to insert a password. So what? I can go through such ordeal once in a while for that 1% of "special" boots.

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

#195
post #150
post #135

Earlier quoted context omitted.

Theoretically, couldn't it just write to a "boot this image next time" field (is the legacy MBR area available?) and trigger a reboot?

The target image would need to reset that field so that a second reboot puts you back into the bootloader because otherwise you'll be stuck booting that image forever.

The image doesn't need to do it, that's how UEFI bootnext works: the firmware resets the flag before it loads the image.

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

#196
post #130

My previous laptop was a Chromebook running Linux+Coreboot. Unfortunately the usual Tianocore UEFI BIOS people use had some bugs in the nvme and keyboard drivers, which I gave up fixing or working around (at the time). Obviously Linux had working drivers because that's all ChromeOS is, so we setup a minimal Linux install as the Coreboot payload in the firmware flash, and I wrote a little Rust TUI to mount all visible…

> I don't see any reason why we don't just use Linux direct instead for everything. Because that would only allow you to boot Linux kernels. One of the benefits of bootloaders is the ability to boot other OSs. You can’t kexec windows.

You can kexec Windows: https://www.platformsecuritysummit.com/2019/speaker/koch/PSE...

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

#197
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.

I feel like that post misses the biggest one that pulls people to GRUB: complicated boot sources and procedures. Filesystems that UEFI doesn't understand, more complex network boot sources, all that kind of complex messiness that GRUB enables and others don't. Now, whether those are good idea or not is a different question, but I think this is a good concept for a full replacement for GRUB, as opposed to the existing replacements which already cover the 90% case pretty well. (And I think it's got a case for handling the other cases OK: from the sounds of it they plan to lean on UEFI and A/B image to handle fallback, and it'll basically just work as a direct UEFI boot in the common case)

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

#198

The Linux kernel is pretty easy to compile[1], but the first-party documentation for getting Linux to boot is total garbage. It's embarrassingly bad. You end up reading third-party articles to figure out what the modern approach is to building your own Linux-based operating system, but even then, it's effectively undocumented how you're supposed to get out of a RAM fs from a ISO boot. You're on your own. I completely…

I'll bite.

Official documentation from who? For which audience? For which use case?

Making a bootable image for what kind of system? My Ryzen PC needs a very different image to my aarch64 router.

Where have you not seen info on "installing a bootloader to a target disk"? This is what every distro installer does - this can range from putting a kernel in an EFI partition and setting a variable to building a uboot image and setting variables in NVRAM

Lastly, what do you class as a "decent installer process"? Things have moved on from Slackware's installer. You've got everything from the Debian installer (which hasn't changed much) to Anaconda (let's run the install UI in a browser) to Ubuntu Server (everything is a container!) and many things in between.

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

#199
post #7

Earlier quoted context omitted.

The Linux kernel does not require an initramfs. You can build a kernel with everything compiled in; with no modules needed at all. Initramfs is used for generic kernels where you don't know beforehand which features will be required. This allows you to avoid wasting RAM on features you don't use. But it is optional.

I realize that. But every distro I've used uses an initramfs, so unless you want to build your own kernels, you're stuck with it, and the painfully slow initramfs updates when you update packages, and dkms (or similar) updates the initramfs with the newer version of your out-of-tree modules.

why would initramfs updates be slow? do you mean that most initramfses are large? how much time are we talking about?

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

#200
post #12
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…

> I personally think they're moving in the wrong direction the other direction is to put everything in systemd. :)

bad thing to joke about.
Post reply on HN