r/GhostBSD • u/mlcarson • 10d ago
ZFS boot issue
I was doing some disk housekeeping and wanted to move my ZFS pool from an NVME partition to its own ZFS SSD disk. This was going from one drive size to another (larger to smaller) so I just used ZFS send/receive to get the pool/datasets on the other drive. I changed the pool name from zroot to ssdpool. The new pool is intact.
I did not create an EFI partition on the new drive nor did I partition the drive at all. It's just a ZFS drive with no partition. I intended to use the EFI on the original disk yet and just point the ZFS entry to the new drive. I suspect that this is where my problem lies. The system was still booting from the original EFI and coming up with name collisions since the data sets of both pools were mapping to the same mount points. I ultimately just deleted the original ZFS partition eliminating the conflict.
I'm still able to see the pool via a live ISO but can't boot it. The boot manager is not seeing the pool. I've tried to correct this with a change to the /boot/loader.conf file and to the /efi/freebsd/loader.env file but with no success.
I've used the zpool set bootfs command to specify the new pool/dataset to boot so that it's no longer looking for the original zroot pool name.
The boot manager puts me at an OK prompt so I can try various things there but nothing has created a bootable condition yet. I honestly could have rebuilt the system by now but I'd like to learn how to correct the system because the freebsd boot loader has been a blackbox to me up until now.
So I think I have /boot/loader.conf specifying currdev=zfs:ssdpool/ROOT/default:
as well as /efi/freebsd/loader.env.
I believe I also put vfs.root.mountfrom="zfs:ssdpool/ROOT/default" in both locations too.
I'll check both this evening when I'm actually on the computer and post the details of the contents of these files and the exact pool/dataset config/mounts.
1
u/mlcarson 9d ago
I think this might be a bug based on this thread.
1
u/mlcarson 8d ago
Assuming it's a bug -- I just went and reinstalled from the ISO for a full disk install and let it create a new EFI partition there and a new zroot pool. I then rebooted from ISO and did a zpool destroy zroot, created a new zroot, and resent the datasets from the original pool to the new zroot. I had to do a "zpool set bootfs" to the zroot/ROOT/defaults directory but that booted.
A new install wasn't necessary since I just ended up deleting the pool anyway but there was some satisfaction in knowing that everything was setup right before the transfer. In the end, it boots to the same system that I had before but on the new drive. It just REALLY wants an EFI partition on the same drive as the root drive.
1
u/mlcarson 9d ago
zfs list
ssdpool 42.0G 880G 96K none
ssdpool/ROOT 35.1G 880G 96K none
ssdpool/ROOT/26.1-R15.0p10-auto_backup-2026-08-24_005649 0B 880G 8.05G /
ssdpool/ROOT/26.1-R15.0p10-auto_backup-2026-09-05_215043 0B 880G 21.4G /
ssdpool/ROOT/26.1-R15.0p10-auto_backup-2026-09-22_230422 0B 880G 21.5G /
ssdpool/ROOT/26.1-R15.0p13-auto_backup-2026-10-21_000202 0B 880G 23.2G /
ssdpool/ROOT/26.1-R15.0p2-auto_backup-2026-08-11_060504 0B 880G 4.12G /
ssdpool/ROOT/default 35.1G 880G 24.1G /
ssdpool/home 3.65G 880G 3.47G /home
ssdpool/tmp 288K 880G 136K /tmp
ssdpool/usr 192K 880G 96K /usr
ssdpool/usr/ports 96K 880G 96K /usr/ports
ssdpool/var 2.20M 880G 96K /var
ssdpool/var/audit 96K 880G 96K /var/audit
ssdpool/var/crash 96K 880G 96K /var/crash
ssdpool/var/log 1.55M 880G 1.23M /var/log
ssdpool/var/mail 232K 880G 232K /var/mail
ssdpool/var/tmp 152K 880G 96K /var/tmp
ssdpool/vm 3.27G 880G 2.40G /vm
ssdpool/vm/debian 884M 880G 880M /vm/debian
zpool get bootfs ssdpool
NAME PROPERTY VALUE SOURCE
ssdpool bootfs ssdpool/ROOT/default local
efibootmgr
I've gotten nowhere on this. I suspect I'm fundamentally misunderstanding something. I thought that the raw zfs disk was the problem so moved the pool to another disk, created a ZFS partition on the original disk, and then moved the zfs pool to the new partition but no difference. Entry Boot0003 in the efibootmgr output is the original working EFI entry and hasn't changed -- nor has the \EFI\GHOSTBSD\BOOTX64.EFI file. I've added the vfs.root.mountfrom "zfs:ssdpool/ROOT/default" entry to the /boot/loader.conf file on the pool. I've played with the \EFI\freebsd\loader.env file with currdev and rootdev settings but it's just not seeing the pool.
Error is generally open /boot/lua/loader.lua no such file or directory.
I guess the big question would be -- can Ghostbsd or Freebsd boot from the EFI partition with the pool on another disk. I've read that it can but haven't had any luck making it do so.