Hi All,
Back for another look at GhostBSD.
I have two drives on my PC, an internal 500Gb drive that has Linux Mint (my daily drive), and the EFI partition. I also have a 3TB USB drive which has a few other distros installed.
I installed GhostBSD with ZFS on one of the USB drive's partitions, and selected Refind as the boot manager as I already use it to boot my other distros. When I try to boot GhostBSD from Refind, after outputting some lines of attempts to set currdev to a disk1p1,2, or 3, it gives up and says "failed to find bootable partition"
If I boot it with the GhostBSD bootloader, it does boot, but only gets as far as the screen with the GhostBSD logo on it (and nothing else) and then hangs. I left it there for over ten minutes, but it didn't get past the splash screen.
I can't look at the partition with Mint as Mint refuses to mount it. It returns an error message that it has an "unknown filesystem type, zfs_member". Fair enough I suppose, although I've seen several posts that say Ubuntu (which Mint is built on) has ZFS built into the kernel.
What do I have to do to get GhostBSD to boot?
All advice gratefully received.
Can't boot GhostBSD
-
- Posts: 207
- Joined: Sat Nov 12, 2016 5:44 pm
Re: Can't boot GhostBSD
Read Telegram channel t.me/ghostbsd message link https://t.me/ghostbsd/126948
https://blog.insane.engineer/post/freeb ... pt_labels/
http://kflu.github.io/2017/07/17/2017-0 ... eebsd-zfs/
https://forums.freebsd.org/threads/bsdi ... all.73938/
https://www.truenas.com/community/threa ... bels.1075/
https://twitter.com/DLangille/status/10 ... 2874816512
https://forums.freebsd.org/search/30850 ... ent&o=date
https://forums.freebsd.org/threads/when ... ost-599930
https://forums.freebsd.org/threads/my-c ... nes.87706/
ls (hd0,gpt2)/
ls (hd0,gpt1)/
# Disable diskid/gptid labels or enable gpt label; Can enable all 3; reboot after changing
kern.geom.label.gptid.enable=0
kern.geom.label.gpt.enable=1
kern.geom.label.disk_ident.enable=0
I found this in /boot/loader.conf
# Allan Jude: so that disks are always gpt/<my label here> and never DISK-<random ### here>
kern.geom.label.disk_ident.enable=1
kern.geom.label.gpt.enable=1
kern.geom.label.gptid.enable=1
geom_label_enable="YES"
Reboot after editing /boot/loader.conf file and changing kern.geom values
sysctl kern.geom
With geom_label_enable="YES" in /boot/loader.conf, the /dev/gpt and /dev/gptid directories are populated, but the only things in there are the EFI System Partitions and freebsd-boot partitions in my mirrored BIOS+UEFI setup:
Hello, I am really very interested in the boot sequence from UEFI to load file Refind (rEFInd) /boot/efi/BOOTX64-REFIND.EFI. Next from rEFInd , you can pick via a GUI, which operating system to boot. So you can direct message me with the details, files, sequences you learn from booting up GhostBSD. I have used GhostBSD for 6 years, so I could study and find the same information on my own, but I like your help and knowledge you learn.
EXAMPLES to get your bearings:
camcontrol devlist
camcontrol inquiry -a
geom disk list
glabel status
glabel list
gpart create -s GPT /dev/da1 #EXAMPLE to SET disk scheme type as GPT 128 partitions
gpart add -a 4k -l mydisk1 -t freebsd-zfs -s 50GB da1 #EXAMPLE align 4K boundary for newer SSD, Label mydisk1, set TYPE freebsd ZFS partition , Size of added partition is 50GB, device drive is da1, -a 1m can align on 1 Megabyte boundary
gpart status da1
gpart show -lp da1
booting rEFInd from grub setup: gpt1 is the ESP EFI FAT32 partition with rEFInd on there. gpt2 is the ZFS GhostBSD primary data partition
set root=(hd0,gpt2)
chainloader (hd0,gpt1)/boot/efi/BOOTX64-REFIND.EFI
boot
extra help commands:
ls (hd0)
ls (hd0,gpt2)/
ls (hd0,gpt1)/
ls (hd0,gpt1)/boot
ls (hd0,gpt1)/
Example using GhostBSD live version to fix the external USB Hard disk da1, SSD partitions to boot. on a GPT UEFI partition type: da1 is a place holder. change to your ada0, ada1 da0, da2, or use /dev/gpt/ , /dev/gptid, /dev/diskid/DISK- , /dev/label/my_new_disk1
ls -l /dev/label /dev/gpt /dev/gptid /dev/diskid/ # enable GEOM settings in file /boot/loader.conf
mount a disk /dev/da1 FAT32 ESP partition to /mnt point. Possible set 2 flags using Linux GPARTED, boot & esp
mount -t msdosfs /dev/da1p1 /mnt
ls /boot/lo*
cp /boot/loader1.efi /mnt/EFI/BOOT/BOOTX64.EFI or
mkdir -p /mnt/efi/ghostbsd
cp /boot/loader1.efi /mnt/EFI/ghostbsd/BOOTX64.EFI
Not sure if I left out some step above. Still learning myself Telegram Direct Message T.ME/@Finster_Fred
https://blog.insane.engineer/post/freeb ... pt_labels/
http://kflu.github.io/2017/07/17/2017-0 ... eebsd-zfs/
https://forums.freebsd.org/threads/bsdi ... all.73938/
https://www.truenas.com/community/threa ... bels.1075/
https://twitter.com/DLangille/status/10 ... 2874816512
https://forums.freebsd.org/search/30850 ... ent&o=date
https://forums.freebsd.org/threads/when ... ost-599930
https://forums.freebsd.org/threads/my-c ... nes.87706/
ls (hd0,gpt2)/
ls (hd0,gpt1)/
# Disable diskid/gptid labels or enable gpt label; Can enable all 3; reboot after changing
kern.geom.label.gptid.enable=0
kern.geom.label.gpt.enable=1
kern.geom.label.disk_ident.enable=0
I found this in /boot/loader.conf
# Allan Jude: so that disks are always gpt/<my label here> and never DISK-<random ### here>
kern.geom.label.disk_ident.enable=1
kern.geom.label.gpt.enable=1
kern.geom.label.gptid.enable=1
geom_label_enable="YES"
Reboot after editing /boot/loader.conf file and changing kern.geom values
sysctl kern.geom
With geom_label_enable="YES" in /boot/loader.conf, the /dev/gpt and /dev/gptid directories are populated, but the only things in there are the EFI System Partitions and freebsd-boot partitions in my mirrored BIOS+UEFI setup:
Hello, I am really very interested in the boot sequence from UEFI to load file Refind (rEFInd) /boot/efi/BOOTX64-REFIND.EFI. Next from rEFInd , you can pick via a GUI, which operating system to boot. So you can direct message me with the details, files, sequences you learn from booting up GhostBSD. I have used GhostBSD for 6 years, so I could study and find the same information on my own, but I like your help and knowledge you learn.
EXAMPLES to get your bearings:
camcontrol devlist
camcontrol inquiry -a
geom disk list
glabel status
glabel list
gpart create -s GPT /dev/da1 #EXAMPLE to SET disk scheme type as GPT 128 partitions
gpart add -a 4k -l mydisk1 -t freebsd-zfs -s 50GB da1 #EXAMPLE align 4K boundary for newer SSD, Label mydisk1, set TYPE freebsd ZFS partition , Size of added partition is 50GB, device drive is da1, -a 1m can align on 1 Megabyte boundary
gpart status da1
gpart show -lp da1
booting rEFInd from grub setup: gpt1 is the ESP EFI FAT32 partition with rEFInd on there. gpt2 is the ZFS GhostBSD primary data partition
set root=(hd0,gpt2)
chainloader (hd0,gpt1)/boot/efi/BOOTX64-REFIND.EFI
boot
extra help commands:
ls (hd0)
ls (hd0,gpt2)/
ls (hd0,gpt1)/
ls (hd0,gpt1)/boot
ls (hd0,gpt1)/
Example using GhostBSD live version to fix the external USB Hard disk da1, SSD partitions to boot. on a GPT UEFI partition type: da1 is a place holder. change to your ada0, ada1 da0, da2, or use /dev/gpt/ , /dev/gptid, /dev/diskid/DISK- , /dev/label/my_new_disk1
ls -l /dev/label /dev/gpt /dev/gptid /dev/diskid/ # enable GEOM settings in file /boot/loader.conf
mount a disk /dev/da1 FAT32 ESP partition to /mnt point. Possible set 2 flags using Linux GPARTED, boot & esp
mount -t msdosfs /dev/da1p1 /mnt
ls /boot/lo*
cp /boot/loader1.efi /mnt/EFI/BOOT/BOOTX64.EFI or
mkdir -p /mnt/efi/ghostbsd
cp /boot/loader1.efi /mnt/EFI/ghostbsd/BOOTX64.EFI
Not sure if I left out some step above. Still learning myself Telegram Direct Message T.ME/@Finster_Fred
Re: Can't boot GhostBSD
Hi @wb7odyfred, thanks for the reply.
I have to confess I didn't understand most of it, I'm not that techo, and my problem is more from a user standpoint than a technical one. I installed GhostBSD for the first time a couple of days ago and have not been able to get it to boot, using Refind or the GhostBSD loader. I've tried installing it with ZFS and UFS (which is a bit more Linux like, allowing me to specify the mount point for the partition, whereas ZFS does not), but it won't boot in either case.
I have had a bit of an explore with the live system, but it won't connect to the net, so I'm a bit limited there. I've had the same problem with Arch based distros, and eventually found out that the problem was caused, on my computer, with two kernel modules that were inserted in the wrong order, broadcom and tg3. The solution is to remove tg3 (modprobe -r tg3) then reinsert it (modprobe tg3). I tried the same thing with GhostBSD, but there is no modprobe command. A bit of searching and I found the equivalent in BSD is kldunload and kldload. Tried that but tg3 does not exist. Still trying to resolve that.
I have to confess I didn't understand most of it, I'm not that techo, and my problem is more from a user standpoint than a technical one. I installed GhostBSD for the first time a couple of days ago and have not been able to get it to boot, using Refind or the GhostBSD loader. I've tried installing it with ZFS and UFS (which is a bit more Linux like, allowing me to specify the mount point for the partition, whereas ZFS does not), but it won't boot in either case.
I have had a bit of an explore with the live system, but it won't connect to the net, so I'm a bit limited there. I've had the same problem with Arch based distros, and eventually found out that the problem was caused, on my computer, with two kernel modules that were inserted in the wrong order, broadcom and tg3. The solution is to remove tg3 (modprobe -r tg3) then reinsert it (modprobe tg3). I tried the same thing with GhostBSD, but there is no modprobe command. A bit of searching and I found the equivalent in BSD is kldunload and kldload. Tried that but tg3 does not exist. Still trying to resolve that.
-
- Posts: 207
- Joined: Sat Nov 12, 2016 5:44 pm
Boot GhostBSD. SET up EFI loader.efi point to ZFS
gpart status da0
gpart show -lp da0
camcontrol devlist
geom disk list
Set of commands to build a efi boot loader and create an entry
# sudo zpool import -f -R /mnt/zroot zroot
# sudo cd /mnt/zroot
# sudo zfs mount zroot/ROOT/13.1-RELEASE-p5_2023-01-12_235731
# sudo mkdir -p /boot/efi/efi/freebsd
# sudo cp /boot/loader.efi /boot/efi/efi/freebsd/
# sudo efibootmgr -a -c -l /boot/efi/efi/freebsd/loader.efi -L FreeBSD-13.1-ZFS
See freebsd forum post near the end for the above listed lines. Thanks to Mario sharing them.
https://forums.freebsd.org/threads/my-c ... nes.87706/
gpart show -lp da0
camcontrol devlist
geom disk list
Set of commands to build a efi boot loader and create an entry
# sudo zpool import -f -R /mnt/zroot zroot
# sudo cd /mnt/zroot
# sudo zfs mount zroot/ROOT/13.1-RELEASE-p5_2023-01-12_235731
# sudo mkdir -p /boot/efi/efi/freebsd
# sudo cp /boot/loader.efi /boot/efi/efi/freebsd/
# sudo efibootmgr -a -c -l /boot/efi/efi/freebsd/loader.efi -L FreeBSD-13.1-ZFS
See freebsd forum post near the end for the above listed lines. Thanks to Mario sharing them.
https://forums.freebsd.org/threads/my-c ... nes.87706/
Re: Can't boot GhostBSD
In the continuing saga of trying to get GhoistBSD to do something useful, I bought a new USB disk drive. My old one was doing some odd things, and I thought it might have developed a fault, so I bought a new one.
So the first thing I did was divide it up into several partitions, and then I tried to install GhostBSD on one of the partitions. I found to my complete surprise that I couldn't do it. I booted the live system and activated the installer. I selected manual partitioning, and set a partition to ZFS, in exactly the same way I had done it on my old drive. However the "Next" button did not ungrey itself. It remained unselectable. So, I reset the partition and did the exact same procedure for a partition on my old disk. This time the "Next" button became active and I could proceed. As in the previous install, I did not have to specify an EFI partition or a Swap partition. GhostBSD had found those on its own. Pretty smart I thought. I didn't want to reinstall GhostBSD on my old disk, it was already there anyway, so I tried again with the new disk. Still the "Next" button remained inactive. This was all done in the same
"install session" btw, I did not cancel and start the installer a second time to test with the old disk.
What was the difference? My old disk had a Swap partition and an EFI partition defined on it even though I didn't need them (they were also defined on my internal HD) and GhostBSD seemed to have not trouble finding them, maybe they needed to be on the same disk. So I created a Swap partition and a 1Gb FAT partition on the new disk. Started the installer and created a ZFS partition in the manual partitioning page. Same result, the "Next" button could not be selected. So I created a UEFI partition and a Swap partition as well in the installer. Same result, I could not select the "Next" button.
Could my new disk be faulty too? So I tried installing Debian on it. No problem, Debian installed itself, and Refind found it and the launcher started Debian as expected. So the new disk seems to be working fine.
Maybe the partition needs to be formatted before GhostBSD can be installed on it, although Debian didn't have a problem installing itself on an unforrmatted partition. So I formatted the partition, and the new EFI partition and the Swap partition, just in case. Attempted to install GhostBSD again, but again the "Next" button was not activated. It works fine on my old disk, but not my new one.
I can't think of anything else to try. I must have missed something somewhere, but what? Both the USB disks are from the same vendor, WS Elements. My old one is 3Tb, the new one is 5Tb (they don't make 3Tb any more). Each of the partitions is 512Mb, on both the new and old disks.
Does anybody have any ideas what I could try next? I'd like to have a working GhostBSD system to play with.
All advice gratefully received.
So the first thing I did was divide it up into several partitions, and then I tried to install GhostBSD on one of the partitions. I found to my complete surprise that I couldn't do it. I booted the live system and activated the installer. I selected manual partitioning, and set a partition to ZFS, in exactly the same way I had done it on my old drive. However the "Next" button did not ungrey itself. It remained unselectable. So, I reset the partition and did the exact same procedure for a partition on my old disk. This time the "Next" button became active and I could proceed. As in the previous install, I did not have to specify an EFI partition or a Swap partition. GhostBSD had found those on its own. Pretty smart I thought. I didn't want to reinstall GhostBSD on my old disk, it was already there anyway, so I tried again with the new disk. Still the "Next" button remained inactive. This was all done in the same
"install session" btw, I did not cancel and start the installer a second time to test with the old disk.
What was the difference? My old disk had a Swap partition and an EFI partition defined on it even though I didn't need them (they were also defined on my internal HD) and GhostBSD seemed to have not trouble finding them, maybe they needed to be on the same disk. So I created a Swap partition and a 1Gb FAT partition on the new disk. Started the installer and created a ZFS partition in the manual partitioning page. Same result, the "Next" button could not be selected. So I created a UEFI partition and a Swap partition as well in the installer. Same result, I could not select the "Next" button.
Could my new disk be faulty too? So I tried installing Debian on it. No problem, Debian installed itself, and Refind found it and the launcher started Debian as expected. So the new disk seems to be working fine.
Maybe the partition needs to be formatted before GhostBSD can be installed on it, although Debian didn't have a problem installing itself on an unforrmatted partition. So I formatted the partition, and the new EFI partition and the Swap partition, just in case. Attempted to install GhostBSD again, but again the "Next" button was not activated. It works fine on my old disk, but not my new one.
I can't think of anything else to try. I must have missed something somewhere, but what? Both the USB disks are from the same vendor, WS Elements. My old one is 3Tb, the new one is 5Tb (they don't make 3Tb any more). Each of the partitions is 512Mb, on both the new and old disks.
Does anybody have any ideas what I could try next? I'd like to have a working GhostBSD system to play with.
All advice gratefully received.
-
- Posts: 207
- Joined: Sat Nov 12, 2016 5:44 pm
Re: Can't boot GhostBSD
First the app gbi.py and shell scripts pc-sysinstall.sh were designed to expect to use a free empty whole disk for itself. and create 3 partitions a 50 mb or 260mg FAT32 EFI, swap 2048 mb, disk size - swap - efi for ZFS partition size. GhostBSD Installer gbi internal design , does not play well with existing partition setups, like an installed Linux Distribution.
The Ghostbsd installer is not setup up to use premade partitions for EFI FAT32, SWAP, DATA. So it greys out any partition that exists, to not overwrite it with new data. The installer is looking for free , empty , not partitioned space. If you deleted an existing partition, then it shows up as free empty partition space as white that you can select ( not grey) then the pc-sysinstaller.sh scripts would create 3 new partitions efi, swap, zfs data inside the existing free space.
I am still studying the python files that make up gbi.py installer. I also want to pre setup my partitions and have GhostBSD use existing EFI partition on this disk to add/copy file /boot/loader.efi to /mnt/EFI/ghostbsd/bootx64.efi
https://github.com/ghostbsd/gbi
Looking for your feedback here or in a
direct message https://t.me/ghostbsd @finster_fred
can you share partition information on your WD Elements disks.?
gpart show -lp
geom disk list
camcontrol devlist
I am looking for your disk partition scheme, GPT? or MBR? I assume GPT.
kldstat is command to list the loaded kernel modules. I saw you did use kldload and kldunload commands.
The Ghostbsd installer is not setup up to use premade partitions for EFI FAT32, SWAP, DATA. So it greys out any partition that exists, to not overwrite it with new data. The installer is looking for free , empty , not partitioned space. If you deleted an existing partition, then it shows up as free empty partition space as white that you can select ( not grey) then the pc-sysinstaller.sh scripts would create 3 new partitions efi, swap, zfs data inside the existing free space.
I am still studying the python files that make up gbi.py installer. I also want to pre setup my partitions and have GhostBSD use existing EFI partition on this disk to add/copy file /boot/loader.efi to /mnt/EFI/ghostbsd/bootx64.efi
https://github.com/ghostbsd/gbi
Looking for your feedback here or in a
direct message https://t.me/ghostbsd @finster_fred
can you share partition information on your WD Elements disks.?
gpart show -lp
geom disk list
camcontrol devlist
I am looking for your disk partition scheme, GPT? or MBR? I assume GPT.
kldstat is command to list the loaded kernel modules. I saw you did use kldload and kldunload commands.