------ Original Message ------
From "Alan Mackenzie" <
acm@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.
<html><head><style id="css_styles">blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
table { border-collapse: collapse; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] { list-style-position: inside;}
body { font-family: Consolas; font-size: 11pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
a.em-mention[href] { text-decoration: none; color: inherit; border-radius: 3px; padding-left: 2px; padding-right: 2px; background-color: #e2e2e2; }
</style></head><body class="plain"><div>------ Original Message ------</div><div>
<div>From "Alan Mackenzie" <
acm@muc.de></div>
<div>To
gentoo-user@lists.gentoo.org</div>
<div>Date 18.12.2024 22:31:42</div>
<div>Subject Re: [gentoo-user] Fun with systemd-boot</div></div><div><br /></div>
<div id="xbf72e550d579438"><blockquote type="cite" class="cite2">
<div class="plain_line"><span> </span></div>
<div class="plain_line">Also, none of the documentation was explicit in saying that with</div>
<div class="plain_line">efibootmgr, you have to go into the BIOS setup to select the kernel you</div>
<div class="plain_line">want to boot. Nothing wrong with that, but if I'd know first, I wouldn't</div>
<div class="plain_line">have bothered getting it working. (Sorry, it's been a strenuous</div>
<div class="plain_line">evening.)</div></blockquote><span><div id="xbf72e550d579438"><span><br /></span></div><div id="xbf72e550d579438">After a bit of wiki browsing and experimentation I have ended up with</div><div id="xbf72e550d579438">the following
process for a gentoo VM using UEFI boot:</div><div id="xbf72e550d579438"><br /></div><div id="xbf72e550d579438">- `emerge gentoo-kernel-bin`</div><div id="xbf72e550d579438"><span>- kernel and initramfs end up in /boot</span></div><div id="
xbf72e550d579438"><span>- `efi-update 6.12.5`</span></div><div id="xbf72e550d579438"><span><br /></span></div><div id="xbf72e550d579438"><span>where efi-update is</span></div><div id="xbf72e550d579438"><br /><div class="quote"><div id="
x8c0243e5860e4061b37b50566cfa644a"><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">#!/bin/zsh
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">BASE=/efi/EFI/gentoo/
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;"><span>VERSION=${1-6.8.10}</span></div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">KERNEL="vmlinuz-${VERSION}-gentoo-dist"
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">INITRD="initramfs-${VERSION}-gentoo-dist.img"
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">cp /boot/${KERNEL} /boot/${INITRD} ${BASE}
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">efibootmgr --create-only --create --disk /dev/sdd --part 1 --label "gentoo ${VERSION}" --loader "\\EFI\\gentoo\\${KERNEL}" --unicode "initrd=\\EFI\\gentoo\\${INITRD}"
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">echo "try: efibootmgr -n XXXX"
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">echo "use: efibootmgr -o XXXX,YYYY,..."
</div><div id="xbf72e550d579438" style="background-color:rgba(0,0,0,0);margin:0px;">echo "del: efibootmgr -B -b XXXX" </div></div></div></div><div id="xbf72e550d579438"><span><br /></span></div><div id="xbf72e550d579438">The last three lines are to
remind of which options to use for managing</div><div id="xbf72e550d579438">the kernel for the next boot only (try), changing the permament boot sequence</div><div id="xbf72e550d579438">and cleaning up old kernels. I never had to enter the UEFI BIOS on
this VM.</div><div id="xbf72e550d579438"><br /></div><div id="xbf72e550d579438">HTH,</div><div id="xbf72e550d579438">s.</div></span><blockquote type="cite" class="cite2">
</blockquote></div>
</body></html>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)