I downloaded the 64-bit .iso file of GhostBSD 19.04 MATE and verified it was OK with the sha256 sum. After trying it in a VM on a laptop, I decided this was the BSD variant I wanted to use for my project.
From herein afterwards, everything was done on a desktop system with a 500 GB HDD using a GPT partition scheme. All booting and installation was done in 64-bit UEFI mode. Both Secure Boot and Fast Boot were disabled in the UEFI.
I have setup many multi-boot systems before, both with and without MS Windows. In particular, about 18 months ago I created a multi-boot system with 10 Linux distros on the same HDD. This time I decided to update that setup and add Windows and GhostBSD to the mix.
I started by installing GhostBSD on its own, first in ZFS, and then in UFS Full Disk configurations. Both times the install and booting were successful. That would seem to rule out any hardware related problems. Then, just to see what would happen, I installed Windows 10. As expected it wiped out the BSD boot loader.
Going back to my original concept, I wiped the HDD clean and added a new GPT partition table. I created a EFI System Partition (512 MiB) and a 50 GiB partition into which I installed Windows. This was successful with Windows automatically adding another hidden partition of 16 MiB.
I then proceeded to install GhostBSD in UFS Custom Disk configuration. At this stage, my partitions looked like this (please excuse the Linux terminology).
/dev/sda1 512 MiB ESP (EFI System Partition)
/dev/sda2 50 GiB Windows
/dev/sda3 16 MiB Windows (hidden reserved)
/dev/sda4 30 GiB BSD (UFS+SUJ mounted as /) ada0p4
/dev/sda5 2 GiB BSD swap ada0p5
Code: Select all
ghostbsd@livecd ~> gpart show -p
=> 34 976773101 ada0 GPT (466G)
34 2014 - free - (1.0M)
2048 1048576 ada0p1 efi (512M)
1050624 104857600 ada0p2 ms-basic-data (50G)
105908224 32768 ada0p3 ms-reserved (16M)
105940992 62914560 ada0p4 freebsd-ufs (30G)
168855552 4194304 ada0p5 freebsd-swap (2.0G)
173049856 41943040 ada0p6 linux-swap (20G)
214992896 62914063 ada0p7 linux-data (30G)
277906959 497 - free - (249K)
277907456 62914560 ada0p8 linux-data (30G)
340822016 62914560 ada0p9 linux-data (30G)
403736576 62914560 ada0p10 linux-data (30G)
466651136 62914560 ada0p11 linux-data (30G)
529565696 62914560 ada0p12 linux-data (30G)
592480256 62914560 ada0p13 linux-data (30G)
655394816 62914560 ada0p14 linux-data (30G)
718309376 62914560 ada0p15 linux-data (30G)
781223936 62914560 ada0p16 linux-data (30G)
844138496 132634624 ada0p17 linux-data (63G)
976773120 15 - free - (7.5K)
After re-reading both the GhostBSD and FreeBSD installation guides, and fruitlessly searching this forum and the internet generally for a solution, I decided to carry on and created two more partitions, a / and a swap, into which I installed Linux Mint. In Mint I was able to mount the GhostBSD partitition (/dev/sda4). I confirmed there was a /boot folder which contained both loader & loader.efi files. Using efibootmgr I confirmed that there was no entry for GhostBSD in the UEFI, only ones for Windows and Mint.
I investigated further using Mint. After mounting the ESP, in the folder /boot/efi/EFI/Boot, there is a file refind.conf. At the tail of this is a GRUB-like entry for GhostBSD. I copied this and added it to my grub.cfg in Mint. As root, I then ran update-grub. However, this didn't work either. GRUB gave me the following:-
error: can not find command `loader'.
error: can not find command `icon'.
Updating Grub separately detects GhostBSD as an "unknown Linux distribution on /dev/sda4", but as I was already aware, this does not automatically add a menu entry. I also tried to boot using the following entries gleaned from various sources, but again none worked.
Code: Select all
menuentry "GhostBSD - refind way" {
loader \EFI\Boot\bootx64-trueos.efi
icon \EFI\Boot\icons\os_ghostbsd.png
}
menuentry "GhostBSD - shotgun way" {
set root=(hd1,gpt4)
chainloader +1
}
menuentry "GhostBSD - easy way" {
insmod ufs2
set root=(hd1,gpt4,a)
kfreebsd /boot/loader
}
menuentry "GhostBSD - direct way" {
insmod ufs2
set root=(hd1,gpt4,a)
search --no-floppy --fs-uuid --set 5d2a4b064b8c7824
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
# kfreebsd_module /boot/splash.bmp type=splash_image_data
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0p4
set kFreeBSD.vfs.root.mountfrom.options=rw
}
To summarize:-
1) Why could I not dual-boot GhostBSD with Windows 10? What did I miss or do wrong?
2) Can I now install a boot loader/manager from the GhostBSD LiveUSB and would that also boot Linux?
3) Could someone please give me the correct syntax of a menu entry for GhostBSD in GRUB with Linux?
Thanks in advance.