Failed bootloader-update service with error "Failed to find all esp devices"
Hello,
Lately I've noticed that bootloader-update.service is failing on boot. Error is error: Failed to update EFI: Failed to find all esp devices. This device is Raspberry Pi 4 Model B.
When I run bootupctl update -vvv manually:
[TRACE bootupd] executing cli
Running as unit: bootupd.service; invocation ID: 8c8f8fdae06647e69b932ea67fc52bf5
[TRACE bootupd] executing cli
[DEBUG bootupd::blockdev] Found parent devices: ["/dev/mmcblk0"]
[TRACE bootupd::bootupd] Gathering status for installed component: EFI
[DEBUG bootupd::efi] Unmounting
[TRACE bootupd::bootupd] Remaining known components: 0
[DEBUG bootupd::efi] Unmounting
error: Failed to update EFI: Failed to find all esp devices
bootupctl status gives me:
Running as unit: bootupd.service; invocation ID: 62591549fbda4615847d9515c879add0
Component EFI
Installed: grub2-efi-aa64-1:2.12-32.fc42.aarch64,shim-aa64-15.8-3.aarch64
Update: Available: grub2-efi-aa64-1:2.12-40.fc43.aarch64,shim-aa64-15.8-3.aarch64
No components are adoptable.
Boot method: EFI
lsblk output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
`-sda1 8:1 0 1.8T 0 part /var/mnt/storage
sdb 8:16 0 1.8T 0 disk
`-sdb1 8:17 0 1.8T 0 part
mmcblk0 179:0 0 59.5G 0 disk
|-mmcblk0p1 179:1 0 501M 0 part /boot/efi
|-mmcblk0p2 179:2 0 1G 0 part /boot
`-mmcblk0p3 179:3 0 58G 0 part /var
/sysroot/ostree/deploy/fedora-iot/var
/sysroot
/etc
zram0 251:0 0 7.6G 0 disk [SWAP]
Device seems to run without major issue, though those errors seem a bit worrying.
Thank you @alternateved for the reporting!
Could you help to show the output of sudo sfdisk -J /dev/mmcblk0? bootupd finds the esp device using this command and get the node that "partitions.type" equals "C12A7328-F81F-11D2-BA4B-00A0C93EC93B", there maybe something unmatched that causes the error.
Of course, here is the output:
{
"partitiontable": {
"label": "dos",
"id": "0xc1748067",
"device": "/dev/mmcblk0",
"unit": "sectors",
"sectorsize": 512,
"partitions": [
{
"node": "/dev/mmcblk0p1",
"start": 2048,
"size": 1026048,
"type": "6",
"bootable": true
},{
"node": "/dev/mmcblk0p2",
"start": 1028096,
"size": 2097152,
"type": "83"
},{
"node": "/dev/mmcblk0p3",
"start": 3125248,
"size": 121610240,
"type": "83"
}
]
}
}
From "label": "dos", so this is using MBR and not GPT, is this right?
Guess this is why can not find "partitions.type" equals C12A7328-F81F-11D2-BA4B-00A0C93EC93B (which is on GPT).
@cgwalters @travier in this case, need to add condition to check if label is dos, get esp partition using "partitions.bootable" == true, WDYT?
@HuijingHei Correct, this is using MBR. It's been a while since I installed Fedora IoT on this Raspberry Pi and I'm not sure why I went with MBR in this case, but it might have something to do with the Pi booting from SD card.
Of course, here is the output:
{ "partitiontable": { "label": "dos", "id": "0xc1748067", "device": "/dev/mmcblk0", "unit": "sectors", "sectorsize": 512, "partitions": [ { "node": "/dev/mmcblk0p1", "start": 2048, "size": 1026048, "type": "6", "bootable": true },{ "node": "/dev/mmcblk0p2", "start": 1028096, "size": 2097152, "type": "83" },{ "node": "/dev/mmcblk0p3", "start": 3125248, "size": 121610240, "type": "83" } ] } }
My Fedora IoT 42 install on my RPi3 looks almost exactly like this.
I think this is the default layout when you install Fedora IoT via https://github.com/fedora-arm/arm-image-installer
@pcdubs do you recall the reason for using MBR vs GPT when setting up the disk?
I think this is the default layout when you install Fedora IoT via https://github.com/fedora-arm/arm-image-installer @pcdubs do you recall the reason for using MBR vs GPT when setting up the disk?
MBR is the default for our AArch64 disk images to support the Raspberry Pi 3.
So we should support this, will try to fix this soon.
Waiting for the new release of bootc-internal-blockdev to include the https://github.com/bootc-dev/bootc/pull/1773