public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Fun with systemd-boot
Date: Wed, 18 Dec 2024 15:58:14 +0000	[thread overview]
Message-ID: <2293940.iZASKD2KPV@rogueboard> (raw)
In-Reply-To: <3620457.iIbC2pHGDl@cube>

[-- Attachment #1: Type: text/plain, Size: 3776 bytes --]

On Wednesday 18 December 2024 14:30:12 GMT Peter Humphrey wrote:
> On Wednesday 18 December 2024 12:13:59 GMT Alan Mackenzie wrote:
> > I've been having fun with systemd-boot.
> 
> I've been using bootctl from systemd-utils for some years; ever since I
> graduated to an EFI system. I don't follow the wiki because of the resulting
> impenetrable thicket of unpronounceable names and 32-digit hex numbers.
> Fine for a distro builder, perhaps, but not for me thank you - especially
> as I want a selection of kernels to boot from, which I never did work out
> how to achieve following the official advice.
> 
> My method has only one related USE variable:
> 	sys-apps/systemd-utils	boot kernel-install
> 
> My EFI partition, unformatted and not mentioned in /etc/fstab, is /dev/
> nvme0n1p1. 0n1p2 is the FAT-32 /boot.
> # tree -L 3 /boot
> /boot
> ├── [config files from make install]
> ├── early_ucode.cpio
> ├── EFI
> │   ├── BOOT
> │   │   └── BOOTX64.EFI
> │   ├── Linux
> │   └── systemd
> │       └── systemd-bootx64.efi
> ├── intel-uc.img
> ├── loader
> │   ├── entries
> │   │   ├── 06-gentoo-rescue-6.6.52.conf
> │   │   ├── 07-gentoo-rescue-6.6.52.nonet.conf
> │   │   ├── 08-gentoo-rescue-6.6.62.conf
> │   │   ├── 09-gentoo-rescue-6.6.62.nonet.conf
> │   │   ├── 30-gentoo-6.6.62.conf
> │   │   ├── 32-gentoo-6.6.62.nox.conf
> │   │   └── 34-gentoo-6.6.62.nonet.conf
> │   ├── entries.srel
> │   ├── loader.conf
> │   └── random-seed
> ├── [System.map files from make install]
> ├── vmlinuz-6.6.38-gentoo-rescue
> ├── vmlinuz-6.6.52-gentoo
> ├── vmlinuz-6.6.52-gentoo-rescue
> ├── vmlinuz-6.6.62-gentoo
> └── vmlinuz-6.6.62-gentoo-rescue
> 
> This is the relevant parts of the kernel make script on my little i5 NUC
> box: cd /usr/src/linux
> time (make -j4 && make modules_install &&\
>     make install && rm -f /boot/*old)
> emerge @module-rebuild @x11-module-rebuild
> rm -f /boot/early_ucode.cpio.new &&\
>         iucode_tool -q -S --write-earlyfw=/boot/early_ucode.cpio.new \
>           -tr /boot/early_ucode.cpio -tb /lib/firmware/intel-ucode &&\
>         mv -v /boot/early_ucode.cpio.new /boot/early_ucode.cpio &&\
> echo

Not relevant to the OP, but why don't you build the µcode blob in the kernel 
itself for a simpler life?


> Then all I have to do is some simple mmv and sed -i on the files in /boot/
> loader/entries and loader.conf. Also remove obsolete kernels, configs and
> maps from /boot. Oh, and bootctl set-default 30-gentoo-6.6.62.conf if it's
> a remote machine and I won't be present at boot time.
> 
> --->8
> 
> > Could somebody perhaps suggest a better boot loader to me?  I need to be
> > able to chose between several kernels at booting time, but I certainly
> > don't want something "refined" like grub - I just need what I thought
> > systemd-boot actually was before yesterday.
> 
> That's even worse than what I was suffering until I developed my own system.
> > Thanks in advance!
> 
> Hope that helps.

If the OP is running a systemd installation then using an ESP FAT32 formatted 
partition on /efi mountpoint and a XBOOTLDR partition at /boot mountpoint 
would greatly simplify things and avoid conflicts between what the systemd 
bootctl expects  to find and wants to do and what the user prefers:

https://wiki.gentoo.org/wiki/EFI_System_Partition#Standard_layout

On an OpenRC system without GRUB, rEFInd is a good choice, or for a totally 
manual approach use the efibootmgr:

https://wiki.gentoo.org/wiki/Efibootmgr

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-12-18 15:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 12:13 [gentoo-user] Fun with systemd-boot Alan Mackenzie
2024-12-18 12:50 ` Arsen Arsenović
2024-12-18 13:41   ` Alan Mackenzie
2024-12-18 14:18   ` Joost Roeleveld
2024-12-18 14:30 ` Peter Humphrey
2024-12-18 15:58   ` Michael [this message]
2024-12-18 21:31     ` Alan Mackenzie
2024-12-18 21:47       ` Re[2]: " Stefan Schmiedl
2024-12-19 10:59       ` Michael
2024-12-19 15:46         ` Alan Mackenzie
2024-12-19 16:38           ` Michael
2024-12-28 22:01           ` Wols Lists
2024-12-19 11:36     ` Peter Humphrey
2024-12-28 21:53   ` Wols Lists
2024-12-29 12:51     ` Peter Humphrey
  -- strict thread matches above, loose matches on Subject: below --
2024-12-18 12:57 Joost Roeleveld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2293940.iZASKD2KPV@rogueboard \
    --to=confabulate@kintzios.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox