I have a system originally built as a FreeBSD 13.1R with root ZFS, which I've upgraded using freeebsd-update to 13.2R-p1. I've upgraded the zpool and enabled all features, and after a reboot, am unable to boot it. I have tried updating the bootcode using all methods I found reference to, but it hasn't helped.
This appears on the console when I boot from the hard drive(s):
I am able to access the ZFS pool by booting from a USB stick imaged with FreeBSD-13.2-STABLE-amd64-20231005-2464d8c5e296-256505-mini-memstick.img.xz and selecting Shell
ada0 and ada1 are on an extra SATA controller
ada2 and ada3 are on the chipset SATA controller.
I boot non-UEFI, GPT. The BIOS is UEFI capable but I'm pretty sure I have always booted non-UEFI, and in the course of trying to fix this issue, I messed up the EFI partition in following some forum posts trying to update it. So I can probably fix and attempt EFI boot if someone gives me the correct steps.
My annotations below are in {}.
I have concat'ed partitions of the 2 1 TB disks together to be the mirror of the 2TB drive, and I have an addition SSD to act as L2ARC and SLOG (just to play with the features). Doing the "geom load concat" causes some of the ada[0-3] names to be unusable for gpart, so I have to use the diskid label instead.
After reboot, same result. I tried updating bootcode using the on-disk boot bootcodes in zroot/ROOT/default:
Same result. Then I tried using a different ROOT:
In place of
I executed
Bootcode appears the same as zroot/ROOT/default:
Repeated:
Same result.
I don't understand why none of the bootcode supports this ZFS feature considering I'm using the ZFS version from this FreeBSD version. Any ideas on getting this system bootable again?
This appears on the console when I boot from the hard drive(s):
Code:
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS drive E: is disk2
BIOS drive F: is disk3
BIOS drive G: is disk4
ZFS: unsupported feature: com.delphix.redaction_bookmarks
ZFS: pool zroot is not supported
Can't find /boot/zfsloader
Can't find /boot/loader
Can't find /boot/kernel/kernel
FreeBSD/x86 boot
Default: /boot/kernel/kernel
boot:
I am able to access the ZFS pool by booting from a USB stick imaged with FreeBSD-13.2-STABLE-amd64-20231005-2464d8c5e296-256505-mini-memstick.img.xz and selecting Shell
Code:
# dhclient re0
# mkdir /tmp/ssh
# mount_unionfs /tmp/ssh /etc/ssh
# printf "PermitRootLogin yes\nPasswordAuthentication yes\nPermitEmptyPasswords yes\nUsePAM no\no" >> /etc/ssh/sshd_config
# /etc/rc.d/sshd onestart
#{SSH in for ease of copy-paste.}
root@:~ # geom concat load
root@:~ # geom mirror load
root@:~ # mkdir /tmp/root
root@:~ # zpool import -a -R /tmp/root
root@:~ # zpool list -v
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 1.81T 584G 1.24T - - 1% 31% 1.00x ONLINE /tmp/root
mirror-0 1.81T 584G 1.24T - - 1% 31.4% - ONLINE
ada2p4 1.82T - - - - - - - ONLINE
concat/zfs1 1.82T - - - - - - - ONLINE
logs - - - - - - - - -
gpt/slog 16G 424K 15.5G - - 0% 0.00% - ONLINE
cache - - - - - - - - -
gpt/l2arc 127G 127G 143M - - 0% 99.9% - ONLINE
root@:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 584G 1.19T 96K /tmp/root/zroot
zroot/ROOT 24.4G 1.19T 96K none
zroot/ROOT/13.1-RELEASE-p7_2023-07-15_171848 8K 1.19T 4.22G /tmp/root
zroot/ROOT/13.1-RELEASE_2023-03-05_000007 8K 1.19T 1.35G /tmp/root
zroot/ROOT/13.2-RELEASE-p1_2023-07-15_172053 8K 1.19T 4.29G /tmp/root
zroot/ROOT/13.2-RELEASE-p1_2023-08-04_232738 8K 1.19T 19.8G /tmp/root
zroot/ROOT/default 24.4G 1.19T 18.7G /tmp/root
zroot/tmp 2.37G 1.19T 2.37G /tmp/root/tmp
zroot/usr 557G 1.19T 96K /tmp/root/usr
zroot/usr/home 387M 1.19T 346M /tmp/root/usr/home
zroot/usr/local 556G 1.19T 96K none
zroot/usr/local/share 556G 1.19T 556G none
zroot/usr/ports 810M 1.19T 810M /tmp/root/usr/ports
zroot/usr/src 96K 1.19T 96K /tmp/root/usr/src
zroot/var 2.88M 1.19T 96K /tmp/root/var
zroot/var/audit 96K 1.19T 96K /tmp/root/var/audit
zroot/var/crash 96K 1.19T 96K /tmp/root/var/crash
zroot/var/log 1.88M 1.19T 888K /tmp/root/var/log
zroot/var/mail 508K 1.19T 256K /tmp/root/var/mail
zroot/var/tmp 224K 1.19T 96K /tmp/root/var/tmp
root@:~ # zfs mount zroot/ROOT/default
root@:~ # ls -l /boot/pmbr /boot/gptzfsboot /tmp/root/boot/gptzfsboot /tmp/root/boot/pmbr
-r--r--r-- 1 root wheel 156046 Oct 5 09:41 /boot/gptzfsboot
-r--r--r-- 1 root wheel 512 Oct 5 09:41 /boot/pmbr
-r--r--r-- 1 root wheel 156502 Jul 16 00:18 /tmp/root/boot/gptzfsboot
-r--r--r-- 1 root wheel 512 May 12 2022 /tmp/root/boot/pmbr
root@:~ # egrep 'ada.*device|ada.*sectors' /var/run/dmesg.boot
ada0: <ST1000DM003-1ER162 CC45> ACS-2 ATA SATA 3.x device
ada0: 953869MB (1953525168 512 byte sectors)
ada1: <Samsung SSD 860 EVO 250GB RVT01B6Q> ACS-4 ATA SATA 3.x device
ada1: 238475MB (488397168 512 byte sectors)
ada2: <ST2000DM001-1ER164 CC26> ACS-2 ATA SATA 3.x device
ada2: 1907729MB (3907029168 512 byte sectors)
ada3: <ST1000DM003-1ER162 CC43> ACS-2 ATA SATA 3.x device
ada3: 953869MB (1953525168 512 byte sectors)
ada0 and ada1 are on an extra SATA controller
ada2 and ada3 are on the chipset SATA controller.
I boot non-UEFI, GPT. The BIOS is UEFI capable but I'm pretty sure I have always booted non-UEFI, and in the course of trying to fix this issue, I messed up the EFI partition in following some forum posts trying to update it. So I can probably fix and attempt EFI boot if someone gives me the correct steps.
My annotations below are in {}.
I have concat'ed partitions of the 2 1 TB disks together to be the mirror of the 2TB drive, and I have an addition SSD to act as L2ARC and SLOG (just to play with the features). Doing the "geom load concat" causes some of the ada[0-3] names to be unusable for gpart, so I have to use the diskid label instead.
Code:
root@:~ # gpart show diskid/DISK-Z4Y9GBS5 {ada0}
=> 40 1953525088 diskid/DISK-Z4Y9GBS5 GPT (932G)
40 4056 - free - (2.0M)
4096 1953517568 1 freebsd-zfs (932G) {label zfs1a}
1953521664 3464 - free - (1.7M)
root@:~ # gpart show ada1
=> 40 488397088 ada1 GPT (233G)
40 4056 - free - (2.0M)
4096 33554432 1 freebsd-zfs (16G) {label slog}
33558528 266338304 2 freebsd-zfs (127G) {label l2arc}
299896832 188500296 - free - (90G)
root@:~ # gpart show ada2 {diskid/DISK-Z4Z3YP4B}
=> 40 3907029088 ada2 GPT (1.8T)
40 532480 1 efi (260M) {label efiboot0}
532520 1024 2 freebsd-boot (512K) {label gptboot0}
533544 984 - free - (492K)
534528 4194304 3 freebsd-swap (2.0G) {label swap0}
4728832 3902300160 4 freebsd-zfs (1.8T) {label zfs0}
3907028992 136 - free - (68K)
root@:~ # gpart show diskid/DISK-Z4Y0PJNM (ada3)
=> 40 1953525088 diskid/DISK-Z4Y0PJNM GPT (932G)
40 532480 1 efi (260M) {label efiboot1}
532520 1024 2 freebsd-boot (512K) {label gptboot1}
533544 984 - free - (492K)
534528 4194304 3 freebsd-swap (2.0G) {label swap1}
4728832 1948794880 4 freebsd-zfs (929G) {label zfs1b}
1953523712 1416 - free - (708K)
root@:~ # gconcat list
Geom name: zfs1
State: UP
Status: Total=2, Online=2
Type: AUTOMATIC
ID: 2074157860
Providers:
1. Name: concat/zfs1
Mediasize: 1997983972352 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
Consumers:
1. Name: diskid/DISK-Z4Y0PJNMp4
Mediasize: 997782978560 (929G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
Start: 1000200994304
End: 1997983972352
2. Name: diskid/DISK-Z4Y9GBS5p1
Mediasize: 1000200994816 (932G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
Start: 0
End: 1000200994304
root@:~ # gpart bootcode -b /boot/pmbr diskid/DISK-Z4Y9GBS5
bootcode written to diskid/DISK-Z4Y9GBS5
root@:~ # gpart bootcode -b /boot/pmbr ada1
bootcode written to ada1
root@:~ # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada2
partcode written to ada2p2
bootcode written to ada2
root@:~ # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 diskid/DISK-Z4Y0PJNM
partcode written to diskid/DISK-Z4Y0PJNMp2
bootcode written to diskid/DISK-Z4Y0PJNM
After reboot, same result. I tried updating bootcode using the on-disk boot bootcodes in zroot/ROOT/default:
Code:
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr diskid/DISK-Z4Y9GBS5 # {ada0}
bootcode written to diskid/DISK-Z4Y9GBS5
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr ada1
bootcode written to ada1
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr -p /tmp/root/boot/gptzfsboot -i 2 diskid/DISK-Z4Z3YP4B # {ada2}
partcode written to diskid/DISK-Z4Z3YP4Bp2
bootcode written to diskid/DISK-Z4Z3YP4B
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr -p /tmp/root/boot/gptzfsboot -i 2 diskid/DISK-Z4Y0PJNM # {ada3}
partcode written to diskid/DISK-Z4Y0PJNMp2
bootcode written to diskid/DISK-Z4Y0PJNM
Same result. Then I tried using a different ROOT:
In place of
Code:
root@:~ # zfs mount zroot/ROOT/default
Code:
root@:~ # zfs mount zroot/ROOT/13.2-RELEASE-p1_2023-08-04_232738
Bootcode appears the same as zroot/ROOT/default:
Code:
root@:~ # ls -l /boot/pmbr /boot/gptzfsboot /tmp/root/boot/gptzfsboot /tmp/root/boot/pmbr
-r--r--r-- 1 root wheel 156046 Oct 5 09:41 /boot/gptzfsboot
-r--r--r-- 1 root wheel 512 Oct 5 09:41 /boot/pmbr
-r--r--r-- 1 root wheel 156502 Jul 16 00:18 /tmp/root/boot/gptzfsboot
-r--r--r-- 1 root wheel 512 May 12 2022 /tmp/root/boot/pmbr
Repeated:
Code:
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr diskid/DISK-Z4Y9GBS5 # {ada0}
bootcode written to diskid/DISK-Z4Y9GBS5
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr ada1
bootcode written to ada1
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr -p /tmp/root/boot/gptzfsboot -i 2 diskid/DISK-Z4Z3YP4B # {ada2}
partcode written to diskid/DISK-Z4Z3YP4Bp2
bootcode written to diskid/DISK-Z4Z3YP4B
root@:~ # gpart bootcode -b /tmp/root/boot/pmbr -p /tmp/root/boot/gptzfsboot -i 2 diskid/DISK-Z4Y0PJNM # {ada3}
partcode written to diskid/DISK-Z4Y0PJNMp2
bootcode written to diskid/DISK-Z4Y0PJNM
Same result.
I don't understand why none of the bootcode supports this ZFS feature considering I'm using the ZFS version from this FreeBSD version. Any ideas on getting this system bootable again?