Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] EFI booting problem - understanding it
Date: Thu, 02 Jul 2020 10:56:59
Message-Id: 2538456.mvXUDI8C0e@peak
1 Morning all,
2
3 I'm trying to set the default boot entry via bootctl or efibootmgr. I know I
4 can set it directly by pressing D at the boot selection screen, and the system
5 does boot properly; I just want to understand the setup a bit better. I don't
6 have the rest of systemd: this is an openrc box.
7
8 # tree -L 3 /boot
9 /boot
10 ├── config-5.4.48-gentoo
11 ├── config-5.4.48-gentoo-rescue
12 ├── config-5.7.6-gentoo
13 ├── config-5.7.7-gentoo
14 ├── early_ucode.cpio
15 ├── EFI
16 │ ├── Boot
17 │ │ └── bootx64.efi
18 │ ├── Linux
19 │ ├── Microsoft
20 │ │ ├── Boot
21 │ │ └── Recovery
22 │ └── systemd
23 │ └── systemd-bootx64.efi
24 ├── intel-uc.img
25 ├── loader
26 │ ├── entries
27 │ │ ├── 08-gentoo-5.4.48-rescue.conf
28 │ │ ├── 09-gentoo-5.4.48-rescue.nonet.conf
29 │ │ ├── 30-gentoo-5.7.7.conf
30 │ │ ├── 32-gentoo-5.7.7.nox.conf
31 │ │ ├── 34-gentoo-5.7.7.nonet.conf
32 │ │ ├── 40-gentoo-5.4.48.conf
33 │ │ ├── 42-gentoo-5.4.48.nox.conf
34 │ │ └── 44-gentoo-5.4.48.nonet.conf
35 │ ├── loader.conf
36 │ └── random-seed
37 ├── System.map-5.4.48-gentoo
38 ├── System.map-5.4.48-gentoo-rescue
39 ├── System.map-5.7.6-gentoo
40 ├── System.map-5.7.7-gentoo
41 ├── vmlinuz-5.4.48-gentoo
42 ├── vmlinuz-5.4.48-gentoo-rescue
43 ├── vmlinuz-5.7.6-gentoo
44 └── vmlinuz-5.7.7-gentoo
45
46 # bootctl status
47 --->8
48 Default Boot Loader Entry:
49 title: Gentoo 5.4.48 (No network)
50 id: 44-gentoo-5.4.48.nonet.conf
51 --->8
52
53 44-gentoo-5.4.48.nonet.conf is the last entry in /boot/loader/entries.
54
55 Man bootctl says:
56 set-default ID, set-oneshot ID
57 Sets the default boot loader entry. Takes a single boot loader entry ID
58 string as argument...
59
60 But then,
61 # bootctl set-default 30-gentoo-5.7.7.conf
62 Failed to update EFI variable: Invalid argument
63
64 ...in spite of this:
65 # cat /boot/loader/entries/30-gentoo-5.7.7.conf
66 title Gentoo 5.7.7
67 version 5.7.7-gentoo
68 linux vmlinuz-5.7.7-gentoo
69 initrd=intel-uc.img
70 options root=/dev/nvme0n1p4 net.ifnames=0 raid=noautodetect
71
72 ...and this:
73 # mount | grep efi
74 efivarfs on /sys/firmware/efi/efivars type efivarfs
75 (rw,nosuid,nodev,noexec,relatime)
76
77 I've also tried telling efibootmgr to set the default.
78
79 # efibootmgr
80 BootNext: 0007
81 BootCurrent: 0007
82 Timeout: 2 seconds
83 BootOrder: 000B,0007,0006,0000,000C,000D
84 Boot0000* Windows Boot Manager
85 Boot0006* UEFI OS
86 Boot0007* Linux Boot Manager
87 Boot000B* CD/DVD Drive
88 Boot000C* Hard Drive
89 Boot000D* Removable Drive
90
91 Efibootmgr -n 7 seems to make no difference, as expected, but:
92 # efibootmgr -N 7
93 Boot entry 0001 does not exist
94 # cat /boot/loader/loader.conf
95 default 30-gentoo-5.7.7

Replies

Subject Author
Re: [gentoo-user] EFI booting problem - understanding it Andrew Udvare <audvare@×××××.com>