zpool upgrade on boot stick and now?

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
Hi,

I accidentally made zfs upgrade on the boot stick.
Then the following message appeared
Code:
Pool 'freenas-boot' has the bootfs property set, you might need to update
the boot code. See gptzfsboot(8) and loader.efi(8) for details.


I am now unsure - do I have to do something or not. I can't quite figure it out from the man page.

My system is running core - TrueNAS-13.0-U5.3

Code:
zpool status freenas-boot
  pool: freenas-boot
 state: ONLINE
  scan: scrub repaired 0B in 00:01:35 with 0 errors on Fri Nov 10 03:46:35 2023
config:

        NAME          STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          da0p2       ONLINE       0     0     0


Code:
gpart show
=>         40  31251759024  ada0  GPT  (15T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  31247564632     2  freebsd-zfs  (15T)

=>         40  31251759024  ada1  GPT  (15T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  31247564632     2  freebsd-zfs  (15T)

=>         40  31251759024  ada2  GPT  (15T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  31247564632     2  freebsd-zfs  (15T)

=>         40  31251759024  ada3  GPT  (15T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  31247564632     2  freebsd-zfs  (15T)

=>         40  27344764848  ada5  GPT  (13T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  27340570456     2  freebsd-zfs  (13T)

=>         40  31251759024  ada4  GPT  (15T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  31247564632     2  freebsd-zfs  (15T)

=>         40  27344764848  ada6  GPT  (13T)
           40           88        - free -  (44K)
          128      4194304     1  freebsd-swap  (2.0G)
      4194432  27340570456     2  freebsd-zfs  (13T)

=>      40  30719920  da0  GPT  (15G)
        40    532480    1  efi  (260M)
    532520  30179328    2  freebsd-zfs  (14G)
  30711848      8112       - free -  (4.0M)



I have to boot the box in the next few days and it would be a total disaster if it doesn't boot then.
I just wanted to update only the workspools and then it happened :(
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
From your command output the boot pool is on da0:
Code:
=>      40  30719920  da0  GPT  (15G)
        40    532480    1  efi  (260M)
    532520  30179328    2  freebsd-zfs  (14G)
  30711848      8112       - free -  (4.0M)

To update the boot code on that drive use the following commands - I have performed this literally hundreds of times but this is adapted to your situation without a test, please go line by line and read the output if there is any. There should not be any error message.
Code:
mkdir -p /mnt/efi
mount -t msdosfs /dev/da0p1 /mnt/efi
mkdir -p /mnt/efi/efi/boot /mnt/efi/efi/freebsd
cp /boot/boot1.efi /mnt/efi/efi/boot/bootx64.efi
cp /boot/boot1.efi /mnt/efi/efi/freebsd/loader.efi
umount /mnt/efi
rmdir /mnt/efi

If that goes well your system should be able to boot.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Save a copy of your config file before you do anything else.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Save a copy of your config file before you do anything else.
...and then, just reinstall and upload the saved config file.
 

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
@Patrick M. Hausen - thank you very much. I will save my config and then try your commands. Next week I need reboot my box

No errors or another messages.

But is this correct, into efi partition are only these files?

Code:
mynas001# mount -t msdosfs /dev/da0p1 /mnt/efi
mynas001# find /mnt/efi/
/mnt/efi/
/mnt/efi/efi
/mnt/efi/efi/boot
/mnt/efi/efi/boot/BOOTx64.efi
/mnt/efi/efi/boot/startup.nsh
/mnt/efi/efi/freebsd
/mnt/efi/efi/freebsd/loader.efi
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yes, of course. What else would you expect?
 

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
That was just a question. I remember from my Hackintiosh days that there were significantly more files in the EFI partition. But if that fits - it's perfect

Thanks again.
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
There's not much more in the EFI partition of a real Mac. A hackintosh is a different animal…
 
Top