preparing EFI loader for upgrade to 14.0-RELEASE

From: Axel Rau <Axel.Rau_at_Chaos1.DE>
Date: Tue, 21 May 2024 20:58:29 UTC
Hi all,

the server to be upgraded (per freebsd-update) has only a default bootstrap in its ESP:

root@db3:~ # efibootmgr -v
Boot to FW : false
BootCurrent: 000c
Timeout    : 1 seconds
BootOrder  : 0002, 000C, 0011, 000D
Boot0002* UEFI: Built-in EFI Shell VenMedia(5023b95c-db26-429b-a648-bd47664c8012)
+Boot000C* UEFI OS HD(1,GPT,b6a39bf6-f288-11e9-81c6-d05099d4bb99,0x28,0x64000)/File(\\EFI\\BOOT\\BOOTX64.EFI)
                     nvd1p1:/EFI/BOOT/BOOTX64.EFI (null)
Boot0011* UEFI OS HD(1,GPT,b69156f5-f288-11e9-81c6-d05099d4bb99,0x28,0x64000)/File(\\EFI\\BOOT\\BOOTX64.EFI)
                     nvd0p1:/EFI/BOOT/BOOTX64.EFI (null)
Boot000D  Hard Drive BBS(HD,,0x0)

Should I create a freebsd directory on the ESPs of both mirrored disks, i.e.:

mount_msdosfs /dev/nvd0p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi/bootx64.efi
mkdir /boot/efi/efi/freebsd
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi

mount_msdosfs /dev/nvd1p1 /boot/efi
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi/bootx64.efi
mkdir /boot/efi/efi/freebsd
cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
umount /boot/efi

Please advice.

Thanks, Axel

PS: Detail config:

root@db3:~ # uname -a
FreeBSD db3 13.2-RELEASE-p10 FreeBSD 13.2-RELEASE-p10 GENERIC amd64

# root on sroot (nvd0p3/nvd1p3)
root@db3:~ # zpool list -v
NAME         SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
hpool       1.81T   105G  1.71T        -         -     8%     5%  1.00x    ONLINE  -
 mirror-0  1.81T   105G  1.71T        -         -     8%  5.63%      -    ONLINE
   ada0    1.82T      -      -        -         -      -      -      -    ONLINE
   ada1    1.82T      -      -        -         -      -      -      -    ONLINE
sroot       1.45T   442G  1.02T        -         -    50%    29%  1.00x    ONLINE  -
 mirror-0  1.45T   442G  1.02T        -         -    50%  29.7%      -    ONLINE
   nvd0p3  1.45T      -      -        -         -      -      -      -    ONLINE
   nvd1p3  1.45T      -      -        -         -      -      -      -    ONLINE
root@db3:~ # 

root@db3:~ # gpart list
Geom name: nvd0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 3125627527
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: nvd0p1
  Mediasize: 209715200 (200M)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 20480
  Mode: r1w1e1
  efimedia: HD(1,GPT,b69156f5-f288-11e9-81c6-d05099d4bb99,0x28,0x64000)
  rawuuid: b69156f5-f288-11e9-81c6-d05099d4bb99
  rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  label: efiboot0
  length: 209715200
  offset: 20480
  type: efi
  index: 1
  end: 409639
  start: 40
2. Name: nvd0p2
  Mediasize: 2147483648 (2.0G)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 210763776
  Mode: r1w1e1
  efimedia: HD(2,GPT,b698b995-f288-11e9-81c6-d05099d4bb99,0x64800,0x400000)
  rawuuid: b698b995-f288-11e9-81c6-d05099d4bb99
  rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
  label: swap0
  length: 2147483648
  offset: 210763776
  type: freebsd-swap
  index: 2
  end: 4605951
  start: 411648
3. Name: nvd0p3
  Mediasize: 1597962715136 (1.5T)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 2358247424
  Mode: r1w1e1
  efimedia: HD(3,GPT,b69bb265-f288-11e9-81c6-d05099d4bb99,0x464800,0xba070000)
  rawuuid: b69bb265-f288-11e9-81c6-d05099d4bb99
  rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
  label: zfs0
  length: 1597962715136
  offset: 2358247424
  type: freebsd-zfs
  index: 3
  end: 3125626879
  start: 4605952
Consumers:
1. Name: nvd0
  Mediasize: 1600321314816 (1.5T)
  Sectorsize: 512
  Mode: r3w3e6

Geom name: nvd1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 3125627527
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: nvd1p1
  Mediasize: 209715200 (200M)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 20480
  Mode: r0w0e0
  efimedia: HD(1,GPT,b6a39bf6-f288-11e9-81c6-d05099d4bb99,0x28,0x64000)
  rawuuid: b6a39bf6-f288-11e9-81c6-d05099d4bb99
  rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  label: efiboot1
  length: 209715200
  offset: 20480
  type: efi
  index: 1
  end: 409639
  start: 40
2. Name: nvd1p2
  Mediasize: 2147483648 (2.0G)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 210763776
  Mode: r1w1e1
  efimedia: HD(2,GPT,b6a7f8bc-f288-11e9-81c6-d05099d4bb99,0x64800,0x400000)
  rawuuid: b6a7f8bc-f288-11e9-81c6-d05099d4bb99
  rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
  label: swap1
  length: 2147483648
  offset: 210763776
  type: freebsd-swap
  index: 2
  end: 4605951
  start: 411648
3. Name: nvd1p3
  Mediasize: 1597962715136 (1.5T)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 2358247424
  Mode: r1w1e1
  efimedia: HD(3,GPT,b6aaf7ea-f288-11e9-81c6-d05099d4bb99,0x464800,0xba070000)
  rawuuid: b6aaf7ea-f288-11e9-81c6-d05099d4bb99
  rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
  label: zfs1
  length: 1597962715136
  offset: 2358247424
  type: freebsd-zfs
  index: 3
  end: 3125626879
  start: 4605952
Consumers:
1. Name: nvd1
  Mediasize: 1600321314816 (1.5T)
  Sectorsize: 512
  Mode: r2w2e4


---
PGP-Key: CDE74120  ☀ mobile: +49 160 7568212
computing @ chaos claudius