Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] UEFI data corruption? [SOLVED, mostly]
Date: Wed, 18 Sep 2019 13:20:24
Message-Id: 1694781.Y3JgBqBMYA@localhost
In Reply to: Re: [gentoo-user] UEFI data corruption? [SOLVED, mostly] by Peter Humphrey
1 On Wednesday, 18 September 2019 09:43:11 BST Peter Humphrey wrote:
2 > On Tuesday, 17 September 2019 07:23:10 BST Peter Humphrey wrote:
3 >
4 > Well, it seems to be working now - mostly.
5 >
6 > The fix was to write a new gpt label, create all the partitions and build a
7 > new system: no use of earlier packages. User data came from backups.
8
9 This sounds too drastic a repair procedure, unless the GPT table entries
10 themselves were corrupted, but ... whatever works. :-)
11
12
13 > Meanwhile, I used bootctl and efibootmgr to create and delete boot entries
14 > in the efi data until I finished up with this arrangement:
15 >
16 > # bootctl
17 > systemd-boot not installed in ESP. <---- Note 1
18 > System:
19 > Firmware: UEFI 2.31 (American Megatrends 5.09)
20 > Secure Boot: disabled
21 > Setup Mode: user
22
23 If you are not using systemd-boot, is bootctl of any use vis-à-vis the
24 efibootmgr command?
25
26
27 > Current Boot Loader:
28 > Product: systemd-boot 243
29 > Features: ✓ Boot counting
30 > ✓ Menu timeout control
31 > ✓ One-shot menu timeout control
32 > ✓ Default entry control
33 > ✓ One-shot entry control
34 > ✓ Support for XBOOTLDR partition
35 > ✓ Support for passing random seed to OS
36 > ESP: /dev/disk/by-partuuid/95b0a3f6-eae2-445c-b098-3c8174588948
37 > File: └─/EFI/BOOT/BOOTX64.EFI
38 >
39 > Random Seed:
40 > Passed to OS: no
41 > System Token: not set
42 > Exists: yes
43 >
44 > Available Boot Loaders on ESP:
45 > ESP: /boot (/dev/disk/by-partuuid/95b0a3f6-eae2-445c-
46 > b098-3c8174588948)
47 > File: └─/EFI/BOOT/bootX64.efi (systemd-boot 243)
48 >
49 > Boot Loaders Listed in EFI Variables:
50 > Title: EFI Stub <---- Note 2
51 > ID: 0x0000
52 > Status: active, boot-order
53 > Partition: /dev/disk/by-partuuid/95b0a3f6-eae2-445c-b098-3c8174588948
54 > File: └─/EFI/BOOT/BOOTX64.EFI
55 >
56 > Boot Loader Entries:
57 > $BOOT: /boot (/dev/disk/by-partuuid/95b0a3f6-eae2-445c-
58 > b098-3c8174588948)
59 >
60 > Default Boot Loader Entry:
61 > title: Gentoo Linux 4.19.72 <---- Note 3
62 > id: 30-gentoo-4.19.72
63 > source: /boot/loader/entries/30-gentoo-4.19.72.conf
64 > linux: /vmlinuz-4.19.72-gentoo
65 > options: root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0
66 >
67 > Note 1: I still can't 'bootctl install' without causing the damage I've
68 > described already. The system does boot though.
69
70 Perhaps bootctl is now meant to operate (without breaking things) with
71 systemd-boot fully installed and configured. If you're not using systemd-boot
72 it tries to be too clever by half.
73
74
75 > Note 2: I've tried to change this with 'efibootmgr -b 00 -L "Gentoo
76 Linux"',
77 > to no avail. It does nothing I can see.
78
79 I think --label can only be specified when you --create a new entry in the
80 UEFI boot menu. If there is an entry already present, I think you cannot
81 modify it. When I get things wrong at menu entry creation time, I delete the
82 whole entry and reconstitute it afresh.
83
84
85 > Note 3: This title comes from the file named two lines later; it has
86 nothing
87 > to do with the Title of Note 2.
88
89 Hmm ... I wonder what bootctl reads to populate its "title:" field. Would you
90 care to share the output of:
91
92 efibootmgr -v
93
94 --
95 Regards,
96
97 Mick

Attachments

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

Replies

Subject Author
Re: [gentoo-user] UEFI data corruption? [SOLVED, mostly] Peter Humphrey <peter@××××××××××××.uk>