sbctl: `sbctl verify` returns `failed to find EFI system partition` even though it's there

Hi,

sbctl verify returns failed to find EFI system partition even though it’s there. Unmounting then mounting makes it work. There were no glaring issues with /efi (could read, write, no problem).

# cat /etc/fstab
UUID=F2D4-5BC4                                  /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro                                    0       2
UUID=F2D4-5BC4                                  /efi            vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro                                    0       2

Quick console session:

Console session
% findmnt /boot
TARGET SOURCE         FSTYPE OPTIONS
/boot  /dev/nvme0n1p1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro
% findmnt /efi 
TARGET SOURCE         FSTYPE OPTIONS
/efi   /dev/nvme0n1p1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro
# sbctl verify
failed to find EFI system partition
% tree /efi
/efi
├── EFI
│   ├── Boot
│   │   └── BOOTX64.EFI
│   ├── Linux
│   │   ├── archlinux-linux-clear-fallback.efi
│   │   ├── archlinux-linux-clear.efi
│   │   ├── archlinux-linux-lts-fallback.efi
│   │   └── archlinux-linux-lts.efi
│   ├── memtest86
│   │   ├── Benchmark
│   │   ├── MemTest86-20221014-153419.log
│   │   ├── MemTest86-20230105-174348.log
│   │   ├── MemTest86.log
│   │   ├── blacklist.cfg
│   │   ├── memtestx64.efi
│   │   ├── mt86.png
│   │   └── unifont.bin
│   └── systemd
│       └── systemd-bootx64.efi
├── amd-ucode.img
├── f7522b4f7bc64ecb9c928c6a3f7e481e
├── initramfs-linux-clear-fallback.img
├── initramfs-linux-clear.img
├── initramfs-linux-lts-fallback.img
├── initramfs-linux-lts.img
├── key
├── loader
│   ├── entries
│   │   ├── memtest86-efi.conf
│   │   ├── toxo-clear-efi.conf.disabled
│   │   ├── toxo-clear.conf
│   │   ├── toxo-lts.conf
│   │   └── toxo-lts.conf_20221014T151752Z
│   ├── entries.srel
│   ├── loader.conf
│   └── random-seed
├── vmlinuz-linux-clear
└── vmlinuz-linux-lts

strace: https://gist.githubusercontent.com/moviuro/8e5f2553fca9e2612b11cb7dd5341eef/raw/df8e25b8cc3259c6e87abc3cc2c3c0ed81519c36/strace%2520sbctl%2520verify%2520(failed).txt

remount and rerun
# umount /efi          
# mount /efi           # doesn't work with mount -o remount /efi
# sbctl verify
Verifying file database and EFI images in /efi...
✓ /boot/EFI/Linux/archlinux-linux-clear.efi is signed
✓ /boot/EFI/Linux/archlinux-linux-lts.efi is signed
✗ /efi/EFI/Boot/BOOTX64.EFI is not signed
✗ /efi/EFI/Linux/archlinux-linux-clear-fallback.efi is not signed
✗ /efi/EFI/Linux/archlinux-linux-lts-fallback.efi is not signed
✗ /efi/EFI/memtest86/memtestx64.efi is not signed
✗ /efi/EFI/systemd/systemd-bootx64.efi is not signed
✗ /efi/vmlinuz-linux-clear is not signed
✗ /efi/vmlinuz-linux-lts is not signed

strace: https://gist.githubusercontent.com/moviuro/2315b27c313a22d2b41018559482b27e/raw/809d6cb2b5d2de6171910cedc498ec061713ffe6/strace%2520sbctl%2520verify%2520(success).txt

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Please test the proposed fix and give the complete, and unredacted output, of lsblk --tree --json --output PARTTYPE,MOUNTPOINT,PTTYPE,FSTYPE,MOUNTPOINTS if it still fails.

https://github.com/Foxboron/sbctl/pull/358

If lsblk is reporting null I suspect udev has some issues. This isn’t a sbctl issue, strictly speaking. You can set ESP_PATH manually.

My problem appears to be lsblk -f doesn’t show any UUIDs, and the JSON output has the null values in its output.
But I’m in the arch-chroot of a new install. All the other sbctl commands appear to have succeeded, and it’s just sbctl verify which is failing. I’m installing a UKI and it’s signed (installing the kernel ran the kernel-install hooks, and everything looked successful). When I exit the arch-chroot, lsblk -f shows the UUIDs, but there’s not enough space in airootfs to install sbctl and all of its dependencies.

When I originally did this, I had the variable set to EFI_PATH=/efi, not ESP_PATH=/efi. Setting the latter allowed sbctl verify to work. I noticed the files installed by systemd-boot aren’t yet signed, so I’m going to sign them, but I’m thinking being in the arch-chroot may be a clue to what’s going on.

Yes, so also check if it’s present in MOUNTPOINTS then. That should be nice solution.