Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] UEFI boot [FIXED]
Date: Mon, 28 Oct 2019 14:21:14
Message-Id: 5959646.Dzfb4xN3eq@localhost
In Reply to: Re: [gentoo-user] UEFI boot [FIXED] by Peter Humphrey
1 On Monday, 28 October 2019 12:52:35 GMT Peter Humphrey wrote:
2 > On Saturday, 26 October 2019 17:31:28 GMT Mick wrote:
3 > > If your intention is to use systemd- boot as the Boot Manager of choice, I
4 > > would try moving all kernels and associated files to your /boot/<machine-
5 > > id>/ subdirectory.
6 > >
7 > > Then create corresponding /boot/loader/entries/*.conf files, which
8 > > according to the systemd boot loader specification should be named like
9 > > so:
10 > >
11 > > /boot/loader/entries/4eec63dc92f83de25e1e2e485d7f6536-4.19.72-gentoo.conf
12 > >
13 > > /boot/loader/entries/<machine-id>-<kernel_version>.<os-release-ID>.conf
14 > >
15 > > For <kernel_version> use the output of 'uname -r'.
16 > >
17 > > For <os-release-ID> use the ID field of /etc/os-release. You may 'find
18 > > uname -r' and os-release-ID are the same on your Gentoo installation.
19 > >
20 > > The contents of the file should look like so:
21 > >
22 > > title 08-gentoo-4.19.72-rescue (My rescue kernel)
23 > > version 4.19.72-gentoo
24 > > machine-id 4eec63dc92f83de25e1e2e485d7f6536
25 > > options root=/dev/nvme0n1p4 net.ifnames=0
26 > > architecture x64
27 > > linux /4eec63dc92f83de25e1e2e485d7f6536/4.19.72-gentoo/linux
28 > > initrd /4eec63dc92f83de25e1e2e485d7f6536/4.19.72-gentoo/initrd
29 > >
30 > > For 'title' you can use the PRETTY_NAME in /etc/os-release, or whatever
31 > > you
32 > > want displayed in the boot menu to differentiate visibly this menu entry
33 > > from all others.
34 > >
35 > > For 'version' you can use the kernel version you want to boot with, but it
36 > > is an optional field.
37 > >
38 > > Machine-id is also optional, but it helps to differentiate between various
39 > > installations.
40 > >
41 > > 'linux' and 'initrd' fields show the relative path(s) where your vmlinuz
42 > > and initrd.img files are stored.
43 > >
44 > > I hope the above works for you with systemd-boot and helps customise its
45 > > boot menu to your liking.
46 >
47 > Thanks for the advice. I've also read the Boot Loader Specification [1] :)
48 >
49 > The scheme you and it outline seem not to allow me to create menu entries
50 > that use the same kernel but with different options, such as run level.
51 > That's one reason why I didn't use that approach.
52
53 As I understood when I read the same standard, you can add any options you
54 need next to the "options" field in the respective entries/*.conf files.
55
56 Everything else, other than "title" can remain the same, booting the same
57 kernel/initrd.
58
59 You should be able to boot:
60
61 The installation (machine-id: 4eec63dc92f83de25e1e2e485d7f6536) with the
62 kernel specified in:
63
64 linux /4eec63dc92f83de25e1e2e485d7f6536/4.19.72-gentoo/linux
65
66 or, some different fs installation (different machine-id) still with the same
67 kernel line as above;
68
69 and/or, using the same "options" line or a different one. You should be able
70 to combine any fs installation, kernel and options you want to boot and have
71 it listed in the systemd-boot menu using a title of your choice.
72
73 Of course it would make sense to use a different title for each boot menu.
74 However, I think you could even use the same title for different kernel
75 versions on the same installation, and the most recent version will be listed
76 at the top.
77
78
79 > The other was its reader-
80 > unfriendliness - why use a simple, descriptive name when you could use a
81 > 32- digit hex string instead?
82
83 I suspect because systemd devs did not have at the forefront of their minds
84 Peter's use case, but the kernel post-install scripts of binary distros. I
85 understand the intention of the systemd-boot creators was to allow any kernels
86 to be dropped in /boot/<machine-id/, then parsed and added to the systemd-boot
87 menu.
88
89 --
90 Regards,
91
92 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature