Crash in uefi_remove_old_loaders

Bug #2009957 reported by Heinrich Schuchardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin (Ubuntu)
New
Undecided
Unassigned

Bug Description

I tried to install https://cdimage.ubuntu.com/ubuntu-server/daily-live/current/lunar-live-server-riscv64.img.gz on the Unmatched board. A crash in curtin occurs when trying to delete a preexisting UEFI boot option:

 Traceback (most recent call last):
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/commands/main.py", line 202, in main
     ret = args.func(args)
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/commands/curthooks.py", line 1903, in curthooks
     builtin_curthooks(cfg, target, state)
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/commands/curthooks.py", line 1868, in builtin_curthooks
     setup_grub(cfg, target, osfamily=osfamily,
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/commands/curthooks.py", line 819, in setup_grub
     uefi_remove_old_loaders(grubcfg, target)
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/commands/curthooks.py", line 442, in uefi_remove_old_loaders
     in_chroot.subp(
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/util.py", line 787, in subp
     return subp(*args, **kwargs)
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/util.py", line 275, in subp
     return _subp(*args, **kwargs)
   File "/snap/subiquity/4470/lib/python3.8/site-packages/curtin/util.py", line 139, in _subp
     raise ProcessExecutionError(stdout=out, stderr=err,
 curtin.util.ProcessExecutionError: Unexpected error while running command.
 Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/target', 'efibootmgr', '-B', '-b', '0001']

# ls /sys/firmware/efi/efivars/
AuditMode-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
DeployedMode-8be4df61-93ca-11d2-aa0d-00e098032b8c
OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c
PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c
SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c
VendorKeys-8be4df61-93ca-11d2-aa0d-00e098032b8c

# efibootmgr -v
BootOrder: 0001
Boot0001* Ubuntu boot from NVMe HD(15,GPT,798dd5fe-5931-4cec-96aa-1c7eb8416b43,0x2822,0x35000)/File(\EFI\ubuntu\grubriscv64.efi)

Boot0001 points to the GRUB of a preexisting installation.

With U-Boot EFI variables are never writable. You have to assume that boot options already exist.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
summary: - Crash in get_efibootmgr
+ Crash in uefi_remove_old_loaders
tags: added: foundations-todo
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

File ubootefi.var on /dev/nvme0n1p15 contained the U-Boot EFI variables. The installation destination was /dev/nvme1n1 (the other NVMe drive).

00000000 00 00 00 00 00 00 00 00 55 62 45 66 69 56 61 01 ........UbEfiVa.
00000010 60 01 00 00 7A 57 47 B8 06 00 00 00 07 00 00 00 `...zWG.........
00000020 00 00 00 00 00 00 00 00 61 DF E4 8B CA 93 D2 11 ........a.......
00000030 AA 0D 00 E0 98 03 2B 8C 50 00 6C 00 61 00 74 00 ......+.P.l.a.t.
00000040 66 00 6F 00 72 00 6D 00 4C 00 61 00 6E 00 67 00 f.o.r.m.L.a.n.g.
00000050 00 00 65 6E 2D 55 53 00 9C 00 00 00 07 00 00 00 ..en-US.........
00000060 00 00 00 00 00 00 00 00 61 DF E4 8B CA 93 D2 11 ........a.......
00000070 AA 0D 00 E0 98 03 2B 8C 42 00 6F 00 6F 00 74 00 ......+.B.o.o.t.
00000080 30 00 30 00 30 00 31 00 00 00 01 00 00 00 6A 00 0.0.0.1.......j.
00000090 55 00 62 00 75 00 6E 00 74 00 75 00 20 00 62 00 U.b.u.n.t.u. .b.
000000A0 6F 00 6F 00 74 00 20 00 66 00 72 00 6F 00 6D 00 o.o.t. .f.r.o.m.
000000B0 20 00 4E 00 56 00 4D 00 65 00 00 00 04 01 2A 00 .N.V.M.e.....*.
000000C0 0F 00 00 00 22 28 00 00 00 00 00 00 00 50 03 00 ...."(.......P..
000000D0 00 00 00 00 FE D5 8D 79 31 59 EC 4C 96 AA 1C 7E .......y1Y.L...~
000000E0 B8 41 6B 43 02 02 04 04 3C 00 5C 00 45 00 46 00 .AkC....<.\.E.F.
000000F0 49 00 5C 00 75 00 62 00 75 00 6E 00 74 00 75 00 I.\.u.b.u.n.t.u.
00000100 5C 00 67 00 72 00 75 00 62 00 72 00 69 00 73 00 \.g.r.u.b.r.i.s.
00000110 63 00 76 00 36 00 34 00 2E 00 65 00 66 00 69 00 c.v.6.4...e.f.i.
00000120 00 00 7F FF 04 00 00 00 02 00 00 00 07 00 00 00 ................
00000130 00 00 00 00 00 00 00 00 61 DF E4 8B CA 93 D2 11 ........a.......
00000140 AA 0D 00 E0 98 03 2B 8C 42 00 6F 00 6F 00 74 00 ......+.B.o.o.t.
00000150 4F 00 72 00 64 00 65 00 72 00 00 00 01 00 00 00 O.r.d.e.r.......

tags: added: fr-3656
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.