Bug #15084
openUpgrading an EFI system installed to ZFS mirror does not upgrade EFI loader on additional disks
0%
Description
When an EFI system installed to a ZFS mirror is upgraded, the EFI loader is only updated on the first disk of the mirror (/dev/gpt/efiboot0
).
If the system has EFI filesystems on the additional disks, they are not touched during upgrade.
Can be worked around by manually mounting the additional EFI partitions and copying the files.
For example, to update the loader on the second disk:
# mount -t msdosfs /dev/gpt/efiboot1 /mnt/
# cp -R /boot/efi/ /mnt
# umount /mnt
Note that systems may or may not actually have a proper EFI filesystem on the additional disks. See #15083
Marked as Plus 24.03/CE 2.8.0 but if it can be fixed in the pfSense-boot package the fix could be picked back to 23.09.1/2.7.2.
Related issues
Updated by Jim Pingle 10 months ago
- Related to Bug #15083: Installing to ZFS mirror does not format or populate EFI partition on additional disks added
Updated by Jim Pingle 10 months ago
- Related to Bug #15081: Upgrade fails due to undersized EFI filesystem added
Updated by Jim Pingle 10 months ago
- Related to Bug #15082: Upgrade fails due to unmounted EFI filesystem added
Updated by Jim Pingle 9 months ago
- Assignee set to Reid Linnemann
There was some change here recently as now this triggers a failure on upgrade for existing mirrors.
The second disk has an EFI partition but it is unformatted, thus the pfSense-boot post-install script can't mount it using msdosfs since it doesn't yet have a filesystem:
# pkg upgrade -f pfSense-boot-2.8.0.a.20240101.0600 [...] Updating EFI loader in ESP vtbd0p1 install: //boot/loader.efi -> //boot/efi/efi/freebsd/loader.efi install: //boot/loader.efi -> //boot/efi/efi/boot/BOOTx64.efi mount_msdosfs: /dev/vtbd1p1: Invalid argument Couldn't mount //dev/vtbd1p1 to //boot/efi pkg: POST-INSTALL script failed
If I manually format the partition on the second disk first, then re-run the upgrade, it works:
# newfs_msdos -F 32 -c 1 -L EFISYS1 /dev/gpt/efiboot1 # pkg upgrade -f pfSense-boot-2.8.0.a.20240101.0600 [...] Updating EFI loader in ESP vtbd0p1 install: //boot/loader.efi -> //boot/efi/efi/freebsd/loader.efi install: //boot/loader.efi -> //boot/efi/efi/boot/BOOTx64.efi Updating EFI loader in ESP vtbd1p1 install: //boot/loader.efi -> //boot/efi/efi/freebsd/loader.efi install: //boot/loader.efi -> //boot/efi/efi/boot/BOOTx64.efi
Assigning to Reid since he's been working on this area.
Updated by Christian McDonald 7 months ago
- Assignee changed from Reid Linnemann to Christian McDonald
Updated by Jim Pingle 5 months ago
- Plus Target Version changed from 24.03 to 24.07
Updated by Jim Pingle 4 months ago
- Plus Target Version changed from 24.07 to 24.08
Updated by Christian McDonald 29 days ago
- Status changed from New to Feedback
This should work with the new `install-boot` stage in pfSense-upgrade.
Updated by Jim Pingle 27 days ago
- Status changed from Feedback to New
Christian McDonald wrote in #note-8:
This should work with the new `install-boot` stage in pfSense-upgrade.
I haven't checked it in a while, but I'm not seeing it update the EFI loader anywhere now, is there something else that should be triggering it?
: mount -t msdosfs /dev/gpt/efiboot1 /mnt : find / -name loader.efi -exec ls -l {} \; -rwxr-xr-x 1 root wheel 657920 Mar 15 13:17 /mnt/efi/freebsd/loader.efi -r-xr-xr-x 2 root wheel 657408 Sep 6 04:25 /boot/loader.efi -rwxr-xr-x 1 root wheel 657920 Mar 15 13:17 /boot/efi/efi/freebsd/loader.efi
Even if I manually reinstall pfSense-boot it doesn't change, nor does it change during a snapshot upgrade.
This is on a CE 2.8.0 snap.
Both disks have the same loader, but it's not the same as the one in /boot which has the date of the current snapshot.