------ Original Message ------
From "Alan Mackenzie" <a...@muc.de>
To gentoo-user@lists.gentoo.org
Date 18.12.2024 22:31:42
Subject Re: [gentoo-user] Fun with systemd-boot
Also, none of the documentation was explicit in saying that with
efibootmgr, you have to go into the BIOS setup to select the kernel you
want to boot. Nothing wrong with that, but if I'd know first, I wouldn't
have bothered getting it working. (Sorry, it's been a strenuous
evening.)
After a bit of wiki browsing and experimentation I have ended up with
the following process for a gentoo VM using UEFI boot:
- `emerge gentoo-kernel-bin`
- kernel and initramfs end up in /boot
- `efi-update 6.12.5`
where efi-update is
#!/bin/zsh
BASE=/efi/EFI/gentoo/
VERSION=${1-6.8.10}
KERNEL="vmlinuz-${VERSION}-gentoo-dist"
INITRD="initramfs-${VERSION}-gentoo-dist.img"
cp /boot/${KERNEL} /boot/${INITRD} ${BASE}
efibootmgr --create-only --create --disk /dev/sdd --part 1 --label
"gentoo ${VERSION}" --loader "\\EFI\\gentoo\\${KERNEL}" --unicode
"initrd=\\EFI\\gentoo\\${INITRD}"
echo "try: efibootmgr -n XXXX"
echo "use: efibootmgr -o XXXX,YYYY,..."
echo "del: efibootmgr -B -b XXXX"
The last three lines are to remind of which options to use for managing
the kernel for the next boot only (try), changing the permament boot
sequence
and cleaning up old kernels. I never had to enter the UEFI BIOS on this
VM.
HTH,
s.