Error updating EFI loader - not a size issue
-
Hello
I run into similar error during upgrade of my pfsense box from 2.7.1 to 2.7.2
However my efi/boot partition is large enough
So the cause of the error is due to something else, could someone point me in the right direction.
Kind regards
Henk -
Since this is different I split it off from the other thread.
If the partition is large enough it's possible there is some other problem there. Try running a filesystem check on that partition:
# umount /boot/efi # fsck_msdosfs -fy /dev/gpt/efiboot0 # mount /boot/efi
If that doesn't find any problems, see what else is already in that directory, it should look like this:
# ls -l /boot/efi/efi/boot/ total 656 -rwxr-xr-x 1 root wheel 657920 Dec 12 20:36 bootx64.efi
And see what other files are on that partition:
# find /boot/efi/ /boot/efi/ /boot/efi/efi /boot/efi/efi/freebsd /boot/efi/efi/freebsd/loader.efi /boot/efi/efi/boot /boot/efi/efi/boot/bootx64.efi
Now repeat those same two commands after unmounting
/boot/efi
to make sure something didn't copy those files "under" the mountpoint when/boot/efi
wasn't mounted:# umount /boot/efi # ls -l /boot/efi/efi/boot/ ls: /boot/efi/efi/boot/: No such file or directory # find /boot/efi/ /boot/efi/ # mount /boot/efi
If your output differs from above, it may be necessary to do some manual cleanup. Similar to the other thread but not identical.
-
Hello Jimp,
thanks for the above information.
I ran the filesystem check on /boot/efi, result the partition is OK.When the efiboot partiton is
- NOT mounted, the folder /boot/efi is empty
- mounted the folder /boot/efi contains:/boot/efi/
/boot/efi/efi
/boot/efi/efi/freebsd
/boot/efi/efi/freebsd/loader.efi
/boot/efi/efi/boot
/boot/efi/efi/boot/bootx64.efi
which are the same as you showed.
So it is unclear to me why the boot-partition can not be updated.
I have the utility beadm installed on the box, could that be aproblem? I don't see why, if so can yoy briefly clarify.Kind regards Henk
-
Something like
beadm
shouldn't interfere with anything since that would only affect ZFS, and the EFI partition is DOS.If the output of all that is OK and the package still won't update, I'm not sure what you might be hitting. There is a small possibility it's the disk itself but that seems unlikely.
Maybe make sure you do not have any installation media plugged in while performing the upgrade (memstick, ISO image/disc, etc).
If that isn't what happened, you could try reformatting the EFI partition to see if it helps. The following commands do that and also clean up the EFI dir in case there is something there that isn't showing in the commands you ran for some reason.
# mkdir -p /tmp/efitmp # cp -Rp /boot/efi/* /tmp/efitmp # umount /boot/efi # rm -rf /boot/efi # mkdir -p /boot/efi # newfs_msdos -F 32 -c 1 -L EFISYS /dev/gpt/efiboot0 # mount_msdosfs /dev/gpt/efiboot0 /boot/efi # cp -Rp /tmp/efitmp/* /boot/efi/
The usual disclaimers apply there.
If all else fails, you may have to reinstall.
-
Hello Jimp,
thanks again for your swift and helpfull response.
I also though beadm wouldn't cause the problem due to your mentioned reason.
Could it be the drive as I amusing an Intel Optane drive 16GB? I would find that strange as I did manage to install pfsense 7.2.1 on the drive with the current boot sector.Kind regards Henk
-
I wouldn't expect that to be an issue if it installed there but I'm not sure if there might be something about that drive that may not work as expected.
For example sometimes when an SSD is failing one of the symptoms is that you can read from it but not write in certain areas. This could be a similar problem.
-
Hello Jimp,
I want to let you know I solved the problem and it now writes the boot record and succesully finished the upgrade to 2.7.2
The problem was not an install media that was connected but an 2nd ssd with pfsens installation (which of course also contains a EFI boot partition). I disconnected it and voila.Thanks again for your help.
Kind regards Henk -
If you want to keep the other disk connected you could wipe the metadata from the disk as described in the documentation:
https://docs.netgate.com/pfsense/en/latest/troubleshooting/multiple-disks.html
However, if it's not needed it's probably best to disconnect/remove it as you have done.