I'm trying to set up UEFI boot to a ZFS filesystem, my setup is as follows:
# gpart show
=> 40 1875384928 nda0 GPT (894G)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 4194304 3 freebsd-swap (2.0G)
4728832 1870655488 4 freebsd-zfs (892G)
1875384320 648 - free - (324K)
=> 40 31251759024 da1 GPT (15T)
40 31251759024 1 freebsd-zfs (15T)
=> 34 31251759037 da0 GPT (15T)
34 6 - free - (3.0K)
40 31251759024 1 freebsd-zfs (15T)
31251759064 7 - free - (3.5K)
# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 14.5T 8.84T 5.70T - - 9% 60% 1.00x ONLINE -
zssd 888G 2.57M 888G - - 0% 0% 1.00x ONLINE -
The EFI partition lives on the SSD, whereas zroot lives on the two hard drives.
When I boot, the loader can't find the zroot.
# zpool get bootfs
NAME PROPERTY VALUE SOURCE
zroot bootfs zroot/ROOT/default local
zssd bootfs - default
However, if I manually...
set currdev=zfs:/zroot/ROOT/default:
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
load /boot/kernel/mpr.ko
boot
Success! It boots just fine.
I noticed the environment variables in the loader are full of references to zssd, but I can't figure out why it looks there and not zroot, or if and where those configurations are being sourced from.
For now, manually keying in the data works for me, but there has to be a better way.
I have placed loader.rc and loader.conf in the root of the EFI directory, next to the bootx64.efi, but it doesn't seem to care.
Any ideas?
# gpart show
=> 40 1875384928 nda0 GPT (894G)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 4194304 3 freebsd-swap (2.0G)
4728832 1870655488 4 freebsd-zfs (892G)
1875384320 648 - free - (324K)
=> 40 31251759024 da1 GPT (15T)
40 31251759024 1 freebsd-zfs (15T)
=> 34 31251759037 da0 GPT (15T)
34 6 - free - (3.0K)
40 31251759024 1 freebsd-zfs (15T)
31251759064 7 - free - (3.5K)
# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 14.5T 8.84T 5.70T - - 9% 60% 1.00x ONLINE -
zssd 888G 2.57M 888G - - 0% 0% 1.00x ONLINE -
The EFI partition lives on the SSD, whereas zroot lives on the two hard drives.
When I boot, the loader can't find the zroot.
# zpool get bootfs
NAME PROPERTY VALUE SOURCE
zroot bootfs zroot/ROOT/default local
zssd bootfs - default
However, if I manually...
set currdev=zfs:/zroot/ROOT/default:
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
load /boot/kernel/mpr.ko
boot
Success! It boots just fine.
I noticed the environment variables in the loader are full of references to zssd, but I can't figure out why it looks there and not zroot, or if and where those configurations are being sourced from.
For now, manually keying in the data works for me, but there has to be a better way.
I have placed loader.rc and loader.conf in the root of the EFI directory, next to the bootx64.efi, but it doesn't seem to care.
Any ideas?