Can't boot FreeBSD 15 after installing over GhostBSD

A while ago I tried to install FreeBSD 15 with UI but couldn't get it to work, so I installed GhostBSD.

The environment is a Gigabyte Z790 Aorus Elite with two Samsung NVMe and two WD blues and one Samsung SSD.
A few days ago I installed FreeBSD 15 successfully, with all SATA connectors disconnected but for the NVMes. It worked and booted. However, when I reconnected the other three devices, it tried to boot into GhostBSD, freezing at the logo splash screen.

I set the MB secure boot off and also TPM. I also tried to have only the NVMe devices listed in the MB boot options, but this didn't stop the GhostBSD boot.

When I boot with all devices attached, I went into the boot prompt and listed a few items.

Code:
load_dev=zfs:zroot/ROOT/default:
loader_brand=ghostbsd
lsdev

disk0: 195352158 x 512 blocks
  disk0p1: EFI 
  disk0p2: FreeBSD ZFS 
  disk0p3: FreeBSD swap
disk1: 195352158 x 512 blocks
  disk1p1: EFI 
  disk1p2: FreeBSD ZFS 
  disk1p3: FreeBSD swap
disk2: 3707029168 x 512 blocks
disk3: 195352158 x 512 blocks
  disk3p1: EFI 
  disk3p2: FreeBSD ZFS 
disk4: 195352158 x 512 blocks
  disk4p1: EFI 
  disk4p2: FreeBSD ZFS 
http: (unknown)
net devices:
zfs devices:
  zfs:zroot
  zfs:zroot

When I connect only the NVMes and boot into FreeBSD:
Code:
gpart show 
=>        40  1953525088  nda0  GPT  (932G)
          40      532480     1  efi  (260M)
      532520        2008        - free -  (1.0M)
      534528  1952989184     2  freebsd-zfs  (931G)
  1953523712        1416        - free -  (708K)

=>        40  1953525088  nda1  GPT  (932G)
          40      532480     1  efi  (260M)
      532520        2008        - free -  (1.0M)
      534528  1952989184     2  freebsd-zfs  (931G)
  1953523712        1416        - free -  (708K)

So disk0 and disk1 must be the WD disks and disk2 the Samsung SSD.

Can anyone help me get this straight? I am lost.
 
Last edited by a moderator:
Check what you have with:
# efibootmgr -v
The entry made by GhostBSD probably is yet here, like ... File(\EFI\ghostbsd\BOOTX64.EFI).
If it is, you have to reorder the priorities, disable or delete this entry. See efibootmgr(8).
 
I cannot find any reference to GhostBSD on the system when only the NVMes are active. Below are details on efi.

Code:
# efibootmgr -v
  Boot to FW : false
  BootCurrent: 0001
  Timeout    : 1 seconds
  BootOrder  : 0001, 0002
  +Boot0001* UEFI OS HD(1,GPT,348f3983-fb61-11f0-be57-403f8ca8c682,0x28,0x82000)/File(\EFI\BOOT\BOOTX64.EFI)
                        gpt/efiboot0:/EFI/BOOT/BOOTX64.EFI /boot/efi//EFI/BOOT/BOOTX64.EFI
   Boot0002* UEFI OS HD(1,GPT,34a9291c-fb61-11f0-be57-403f8ca8c682,0x28,0x82000)/File(\EFI\BOOT\BOOTX64.EFI)
                        nda1p1:/EFI/BOOT/BOOTX64.EFI (null)

# gpart list | grep -E "Name:|rawuuid"
  1. Name: nda0p1
     rawuuid: 348f3983-fb61-11f0-be57-403f8ca8c682
  2. Name: nda0p2
     rawuuid: 349342bc-fb61-11f0-be57-403f8ca8c682
  1. Name: nda0
  1. Name: nda1p1
     rawuuid: 34a9291c-fb61-11f0-be57-403f8ca8c682
  2. Name: nda1p2
     rawuuid: 34acc3e0-fb61-11f0-be57-403f8ca8c682
  1. Name: nda1

I neglected to mention that the NVMes are mirrored zfs.
 
The story isn't very clear. GhostBSD is installed on the two WD disks with a ZFS mirror?
The ssd would have no importance since it's empty?
What you didn't say is: do you want to keep GhostBSD or just get back your WD drives?

Have you manually changed the efi vars?

I think one problem is that you have two zpool with the same name and with the bootfs var set.

Can you enter in the BIOS select boot device menu? Have you tried to select disk3 for booting?
If this doesn't work you can try to boot on the FreeBSD installation media and get a command line.
 
The story isn't very clear. GhostBSD is installed on the two WD disks with a ZFS mirror?
The ssd would have no importance since it's empty?
What you didn't say is: do you want to keep GhostBSD or just get back your WD drives?

Have you manually changed the efi vars?

I think one problem is that you have two zpool with the same name and with the bootfs var set.

Can you enter in the BIOS select boot device menu? Have you tried to select disk3 for booting?
If this doesn't work you can try to boot on the FreeBSD installation media and get a command line.
Emrion, thanks for trying to answer my problem. I gave up trying and reinstalled the OS, this time using the guided zfs and not the manual partitioning I used earlier. It's working now.

On the installation presenting with problems, I don't know where GhostBSD was installed; it could have been the SSD or the 1TB WDs. I think my attention wavered - first time install.

I did not change any efi variables.

Can you tell me how you determined that two zpools had the same name? I thought I created a single zfs pool (zroot) which was mirrored.

And yes, I will remember to use the live install for inquiries next time.

Thanks again.
 
Can you tell me how you determined that two zpools had the same name? I thought I created a single zfs pool (zroot) which was mirrored.
One zroot for GhostBSD and one zroot for FreeBSD 15 (it's the default name for both). A mirror is one pool composed of several vdev (zfs partitions in your case). GhostBSD was installed on the two WD disks, probably in a shape of a zfs mirror.

ZFS is very different compared to others FS. If there are several pools, a zfs aware OS can/may try to import and mount all those it can see among the disks.

I don't know what you have done to reinstall FreeBSD 15, but note that ZFS is terribly persistant and unless you use zpool-labelclear(8) on the two partitions that the GhostBSD mirror used, the pool is still here. If you have deleted these partitions and get trouble to reuse these disks, you will have no choice, but to totally zeroing them.
 
Back
Top