On Sun, 29 Sep 2019 11:59:00 +0100, Mick wrote:

> As I understand it, 'bootctl --update' can be used to update
> systemd-boot boot manager's menu and it is looking for bootable
> kernels by scanning /efi, /boot, and /boot/efi, or the directory set
> by passing the '--path' option to it.  Manual addition of bootable
> kernels must be set via /loader/entries/*.conf (one file per kernel
> image) and then setting the default kernel to be booted in
> /loader/loader.conf.  I find all this to be unnecessary complication
> for maintaining a boot manager manually, compared to using say
> efibootmgr.  However, it is handy to be able to press 'e' to edit the
> default entry at boot time, or if new kernels are always stored where
> expected by the scripts of binary distros.
> 
> For Peter's use case, OS and kernel resides on secondary disk, the
> solutions I can think are:
> 
[snip GRUB bit]

> 2. Use systemd-boot.  Copy each kernel from the secondary disk to
> /boot/EFI/ creating the corresponding /loader/entries/*.conf, adding
> the kernel .conf name and the OS root partition's path on the
> secondary disk.  The root path can also/instead be included in the
> kernel itself (CONFIG_CMDLINE).

That's not how the systemd boot manager works. It is a bootable image
which then reads the config from /boot/loader and presents a boot menu.
As far as the firmware is concerned, it is always booting the same image.

The loader files are analogous to grub.cfg, but a thousand times simpler
(I may be understating that in my desire to avoid hyperbole). For
example, loader.conf here is

timeout 3
default 00-*

This never needs to be modified, it simply boots the first entry after 3
seconds. That entry here is

title   Desktop
version 5.3.1-gentoo
linux   /vmlinuz-5.3.1-gentoo
options root=LABEL=yooden 
rd.luks.uuid=luks-d879a686-39f3-4331-b35e-7744468b5ce3 rootfstype=btrfs 
rootflags=rw,noatime,ssd,space_cache rd.shell net.ifnames=0 
init=/lib/systemd/systemd
initrd  /intel-uc.img
initrd  /initramfs-5.3.1-gentoo.img

As you can see, the only vaguely complex part is the list of kernel
options, and most of that is options for the root filesystem which the
kernel would need for any bootloader.

Incidentally, I use a short shell script to regenerate the menu entries
after a kernel change, like grub-update but the predictable orders of
magnitude shorter, so even that is trivial.

I have tried reFind and AFAIR it works in a similar way, although I
stopped using it as I wasn't interested in the fancy graphical boot menu.


-- 
Neil Bothwick

Why is bra singular and pants plural?

Attachment: pgpEhhKNpc8rT.pgp
Description: OpenPGP digital signature

Reply via email to