I personally don't use Bootloaders anymore , using UEFI directly to boot my kernel.
Edit: It doesn't require any manual tinkering/maintainance even when updating. Also it boots fast.
I personally don't use Bootloaders anymore , using UEFI directly to boot my kernel.
Edit: It doesn't require any manual tinkering/maintainance even when updating. Also it boots fast.
Edit: Indeed it's possible with CONFIG_EFI_STUB=y : https://wiki.archlinux.org/index.php/EFISTUB - thanks for the hint !
If you need to boot into runlevel 3 (or use init=/bin/bash) for maintenance, it's going to be much more complicated to make this happen than it is when booting through Grub.
You can just boot into the UEFI Interaractive Shell (think of it as a BIOS terminal/cmd.exe), which most BIOSes have, and launch your kernel with those parameters, as regular arguments to a regular command, right?
What's hard about that?
However, it's not particularly practical.
Of course, as with all things UEFI, YMMV. This worked for me on an HP EliteDesk 800 G2 before I got around to setting up the keys for secure boot.
[0] https://wiki.archlinux.org/index.php/EFISTUB#Using_UEFI_dire...
> fs0:
> \vmlinuz-linux root=PARTUUID=3518bb68-d01e-45c9-b973-0b5d918aae96 rw initrd=\initramfs-linux.img
Again: how is this hard?
Also, not sure how many people have the UUID lying around ready to be copied. If you have encryption setup, there's even more parameters to add. Again, it's not hard, but a bootloader with an editable command line is just much simpler.
> Again: how is this hard?
Is this a joke? Is this something you do yourself with any frequency? Do you realize how utterly painful just typing the correct UUID is? I've had to rescue non-booting systems like this many dozens of times and it makes me absolutely hate my life that on top of having to fix the actual boot problem, I also have to scramble to find a paper and pencil or grab a phone or whatever (or flip back and forth between two screens approximately 51,295,183 times) just to copy 32 random hexadecimal digits from another screen just to test other parameters from a screen I really shouldn't have to bring up in the first place. Especially given the inevitable transcription mistakes that will force you through another reboot cycle. It's such an utter frustration and waste of time to have to go through this nonsense to test a fix to a boot issue. And that's based on the ridiculous assumption that the process is somehow intuitive for people—what fraction of Linux users do you think even know there's both a PARTUUID and a volume UUID? What fraction do you think even know what to type when they face a GRUB screen, and also know what kernel parameters they need to pass? What fraction of those do you think know (and remember!) how to do all this in the UEFI shell?
> What's hard about that?
That you had to explain what the UEFI interactive shell even is yourself is I think quite a clear answer to your question.
Try booting from an encrypted drive identified by an UUID in a machine with a lot of disks
I'd be interested in giving this a try.
Kernel upgrades are just copying .config from the old kernel to the new kernel.
sudo make olddefconfig && sudo make && sudo make modules_install && install_kernel
The contents of install_kernel
KERNEL=`readlink /usr/src/linux`
NUMBER=${KERNEL##linux-}
NUMBER=${NUMBER%%-gentoo}
sudo cp arch/x86_64/boot/bzImage /boot/EFI/Gentoo/vmlinuz-${NUMBER}-gentoo.efi
sudo efi bootmgr -c -L "Gentoo ${NUMBER}" -l "\\EFI\\Gentoo\\vmlinuz-${NUMBER}-gentoo.efi" -d /dev/nvme0n1
Yet if you don't use sudo, some make/compiles fail with random permissions errors.
I mean I see the reasoning, but in 2020 I think the Linux desktop security model is sufficiently broken that it doesn't matter.
In Debian/Ubuntu it should be on by default, and has been for almost a decade:
https://askubuntu.com/questions/510009/does-the-ubuntu-kerne...
That means you can run your kernel directly as a UEFI-target and it will support secure-boot.
EDIT: I managed to create the target, with efibootmgr and boot it partly but it panics. I assume that's due to FDE so I'll have to look into how to configure it to support that (if it's possible without a bootloader).
A linux-aware bootloader will usually load the initramfs itself and pass linux the memory address where it's loaded, in UEFI the kernel gets "executed" like a normal executable, so it has a commandline but not a pre-loaded initramfs.
My efibootmgr entry looks like this (root is btrfs on LUKS):
HD(disk-id)/File(\vmlinux-5.6.0-2-rt-amd64) initrd=\initrd.img-5.6.0-2-rt-amd64 ro root=/dev/mapper/cryptpv0
The latter part is what you must supply manually if you want to start the kernel from the UEFI command line.