Live data from Hacker News

No more boot loader: Please use the kernel instead

pretalx.com

171–180 of 460 posts

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

#172
post #169

Earlier quoted context omitted.

If I'm understanding correctly, it might help to point out that in spite of the title they are proposing a bootloader, which can still let you modify the cmdline, boot to other OSs, etc. It's just that the bootloader is itself using the Linux kernel so it can do things like read all Linux filesystems for "free" without having to rewrite filesystem drivers.

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…

> It's just that the bootloader is itself using the Linux kernel

This sentence does not say "the bootloader is itself another, separate, Linux kernel", so I'm not seeing him saying what you're saying he seems to be saying.

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

#173

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…

What is your actual need here? You talk about confusing documentation for a low-level process which basically no user is expected to go through if they aren't exploring the foundations of a linux system, or a developer working on their own distribution, and then complain that this is a lack of "a decent installer process".

It’s in the post, can’t you read? Also, something being low-level has nothing to do with documentation.

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

#174

I’m fairly technical but I have to say grasping the field of partitions , booting, boot loaders grub uefi its alternatives and the various combinations thereof in Linux defeated me. When learning something I try to find the simple path, a reliable minimum that gets to the goal. I never found it. Complexity is the word that comes to mind.

Complexity, indeed. I haven't looked into this stuff in literally decades, but: I thought the purpose of a boot loader was to pass control to code belonging to the OS - which would then be responsible for loading it's own drivers, etc.. This solution sounds like starting an entire OS, only to boot the next OS. But then I think UEFI is also stupidly complicated, and ought to be whacked down to its core functions. Dino…

I like that UEFI means I don't have to worry about bootloaders clobbering each other when multiple operating systems are installed on the same drive. They can all register into UEFI, rather than competing for the MBR.

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

#175

Not sure why loaders are a separate beast any more. In the bad old days, ROMs had very limited space. Lots of bootloader packages got invented, tiny things that knew just enough about ROM and the filesystem to get the 'real' code loaded, maybe un-zipped, maybe unencrypted. Later, some network-boot options which were handy. Today? The boot flash is huge (compared to ROMs). You can put an entire OS in there! In fact, n…

The reason is very simple, you only get to call ExitBootServices() once (absent hacks that hook the function).

If you want to be able to do anything prior to calling ExitBootServices(), such as choose what EFI application you want to use and options you want to pass it, you need a service built to provide you that interface which itself does not call ExitBootServices().

The name of that service is the bootloader.

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

#176
post #169

Earlier quoted context omitted.

If I'm understanding correctly, it might help to point out that in spite of the title they are proposing a bootloader, which can still let you modify the cmdline, boot to other OSs, etc. It's just that the bootloader is itself using the Linux kernel so it can do things like read all Linux filesystems for "free" without having to rewrite filesystem drivers.

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.

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

#177

Earlier quoted context omitted.

Grub uses an ancient version of zfs code, it's tied to Oracle's zfs and they refuse to update it to current openzfs.

Refuse, or legally can't? Oracle doesn't own the copyrights on commits made after illumos forked from the corpse of opensolaris.

A little of both. Everyone know about Linus' refusal to touch CDDL code, but grub isn't the kernel.

There have been several attempts to add features to the grub zfs code over the years, but there are several maintainers of grub who happen to be employees of Oracle, and typically the attempts go nowhere.

I personally can't recommend using grub anymore. The whole "just make 2 pools" solution is unacceptable, and until Oracle stops gatekeeping, their code becomes more obsolete in my eyes.

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

#178
An EFI stub that sets up multi-boot, kernel and initrd then jumps into it is pretty simple.

I don't know why people really need to keep putting huge intermediate loaders in every default boot path.

If you want to boot more than one OS, yes you need one of these, but if you don't then there's no need for yet another OS instance in the boot path. The mid-stage should be extremely small and simple.

There's been so much crying over the size of UEFI, well now there's an arbitrarily versioned and maintained entire Linux in there too? Mostly just to avoid some ugly UEFI APIs and a slightly different programming environment? Yuck.

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

#179
post #23
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…

FWIW, Grub has a read-only ZFS implementation to allow booting: https://git.savannah.gnu.org/cgit/grub.git/tree/include/grub...

Ditch grub and use Linux to boot Linux on ZFS - https://docs.zfsbootmenu.org/en/v2.3.x/ .

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

#180

Earlier quoted context omitted.

What is your actual need here? You talk about confusing documentation for a low-level process which basically no user is expected to go through if they aren't exploring the foundations of a linux system, or a developer working on their own distribution, and then complain that this is a lack of "a decent installer process".

It’s in the post, can’t you read? Also, something being low-level has nothing to do with documentation.

You've complained about a lot of things, but I can only guess at what you are actually trying to accomplish, and you explicitly reject solutions which would actually resolve your problem. The first-party documentation for the linux kernel boot process is: https://www.kernel.org/doc/Documentation/x86/boot.txt. It's not the kernel's job to get itself into memory and pass it the required information about the system. That's the bootloader's job. If you want to boot linux, either use one of the many existing distributions which package it in an easy to install manner, or read the documentation of your bootloader. If you want a guide on how to combine the linux kernel with other utilities to make a useful OS, read one of the many guides that exist on how to do that. This is why I asked what you actually needed, because for any reasonable goal I can think of, your post reads as "I've deliberately made this as hard as possible on myself".
Post reply on HN