Update to U8 fails on UEFI bootload install


Hello, I did these to update today to U8:

All worked smoothly until the end, when I got:

Updating Bootloader
Updating EFI boot-loader on: ada1
ERROR: Unable to mount EFI partition
ERROR: Updating boot-loader failed!

about reveals this:

Project Trident Information
OS Version: 18.12-RELEASE-U7
Build Date: 20190310230934
TrueOS Sources Used:
Base Repository: https://github.com/trueos/trueos
Base Commit Branch or Tag: trueos-stable-18.12
Ports Repository: https://github.com/trueos/trueos-ports
Ports Commit Branch or Tag: c0589506330027efbe0d2b1417a5756bdf89c12f
System Specs:
Boot Method: UEFI
Intel® Core™ i7-4790K CPU @ 4.00GHz
Physical CPUs: 8
Physical Memory: 15.84 GB
GPU Information:
vgapci0@pci0:1:0:0: class=0x030000 card=0x32021462 chip=0x140110de rev=0xa1 hdr=0x00
vendor = ‘NVIDIA Corporation’
device = ‘GM206 [GeForce GTX 960]’
class = display
subclass = VGA
vgapci1@pci0:0:2:0: class=0x038000 card=0x04121849 chip=0x04128086 rev=0x06 hdr=0x00
vendor = ‘Intel Corporation’
device = ‘Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller’
class = display
Network Device Information
em0@pci0:0:25:0: class=0x020000 card=0x15a11849 chip=0x15a18086 rev=0x00 hdr=0x00
vendor = ‘Intel Corporation’
device = ‘Ethernet Connection (2) I218-V’
class = network
subclass = ethernet

Not sure how to proceed with the update. Many thanks!



Thanks. about is saying UEFI boot (that’s good there have been issues where a system was actually BIOS booted but had a leftover EFI partition and showed the same errors).

I’m not sure how to proceed from here, we’re down in the source code of sysup.

Is this a multiboot system or a dedicated Trident system? I’m asking because the error talks about “ada1” which would typically be the second drive found.



in a terminal, type the following, (I’m assuming I know where your EFI partition is);

sudo mkdir /media/flash
sudo mount -t msdosfs /dev/ada0p1 /media/flash/
df -h

how much space is left on /media/flash



I freshly installed from iso recently. No multi-boot:

I have two disks in a zfs pool, and yes bios is set to boot from the second one:

% ll /dev/ad*
crw-r----- 1 root operator 0x56 Mar 24 16:08 /dev/ada0
crw-r----- 1 root operator 0x57 Mar 24 16:08 /dev/ada0p1
crw-r----- 1 root operator 0x5f Mar 24 16:08 /dev/ada0p2
crw-r----- 1 root operator 0x6d Mar 24 16:08 /dev/ada1
crw-r----- 1 root operator 0x6e Mar 24 16:08 /dev/ada1p1
crw-r----- 1 root operator 0x6f Mar 24 16:08 /dev/ada1p2
crw-r----- 1 root operator 0x70 Mar 24 16:08 /dev/ada1p3



just 112 KiB

% df -h

Filesystem Size Used Avail Capacity Mounted on
/dev/ada0p1 100M 112K 100M 0% /media/flash



do you see your problem?

if that , is in fact your EFI partition?



yeah, I was too fast, sorry:

% sudo mount -t msdosfs /dev/ada1p1 /media/flash/
mount_msdosfs: /dev/ada1p1: Operation not permitted

% file -s /dev/ada1p1
/dev/ada1p1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "BSD4.4 ", sectors/cluster 16, root entries 512, sectors/FAT 50, sectors/track 63, heads 16, sectors 204800 (volumes > 32 MB), serial number 0xda71140e, unlabeled, FAT (16 bit)



I have pc-diskmanager installed, that is how I know where my EFI partition is.

file -s /dev/ada0p1
/dev/ada0p1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "BSD4.4 ", sectors/cluster 16, root entries 512, sectors/FAT 50, sectors/track 63, heads 16, sectors 204800 (volumes > 32 MB), serial number 0x81df0904, unlabeled, FAT (16 bit)

info looks similar.

install pc-diskmanager, ad try to mount it

sudo pkg install pc-diskmanager



gpart show ada1 and gpart show ada0

@sunshine, is this a mirror for root? or just 2 drives that you are doing zfs on?



I was able to mount it RO and /dev/ada1p1 is empty.

/dev/ada0p1 contains /mnt/efi/boot/BOOTx64.ef (80 KiB). So I am assuming I ada0p1 is indeed my boot device. Thing is, I had a previous TrueOS running and probably mixed up devices.
But I cannot really confirm as BIOS lists the boot device as “UEFI disk” so I don’t know which HDD is which boot device o_O

% gpart show ada0
=> 40 78165280 ada0 GPT (37G)
40 204800 1 efi (100M)
204840 77936640 2 freebsd-zfs (37G)
78141480 23840 - free - (12M)

% gpart show ada1
=> 40 3907029088 ada1 GPT (1.8T)
40 204800 1 efi (100M)
204840 3898404864 2 freebsd-zfs (1.8T)
3898609704 8388608 3 freebsd-swap (4.0G)
3906998312 30816 - free - (15M)

@mer no mirror, just one SDD and one HDD in a large zfs pool



pc-diskmanager lists under pool trident:

ada0p2 online
ada1p1 online
ada1p2 online

this seems weird? the boot device should not be part of the pool right? So I guess this confirms ada0p1 must be the boot-device.

Previous updates worked fine though, not sure why suddenly the wrong device is being used.



Ok, so ada0 looks to be a 40G (give or take) device and ada1 a 2T. Is that correct?
And the 40G should be the boot device, with the 2T you are just using the zfs partition (and maybe the swap partition)?

If so then the error is likely because the sysup is finding the efi partition on ada1 and thinking it needs to update it.
That would be similar to what someone saw before.
A way around it is to use gpart and either delete partition 1 on ada1 or modify the type of it so the sysup doesn’t try to update it.
Deleting it would be fine, you’re not touching partition 2.
as root:
gpart delete -i 1 ada1
gpart modify -i 1 -type freebsd-ufs

The first will delete the efi partition on ada1 the second will change the type to freebsd-ufs. I’d be inclined to modify the type.

Assuming all my assumptions are correct, do one of the gpart commands on ada1 and then retry the sysup.

1 Like


@mer You’re assumptions are correct, but sadly, it didn’t work:
sysup is still trying to find the boot-loader on ada1. Could it be set in some config to look there?

Updating Bootloader
Updating GPT boot-loader on: ada1
Unable to locate freebsd-boot partition on: ada1
ERROR: Updating boot-loader failed!

interestingly, the last successful upgrade from 13 March seemed to have an issue, too but it nonetheless worked:

rm: /pkg-add.log: No such file or directory
Moving updated pkg repo…
mount_msdosfs: /dev/ada1p1: Operation not permitted
Updating to latest EFI bootloader…

I’m going to bed now. And I don’t want to waste any more of your time. Unless you have another last idea, I will probably have to go the fresh install route tomorrow. Thanks for your help so far @mer @RodMyers

1 Like