Page 1 of 1

Booting from GRUB2

Posted: Thu Jul 02, 2020 12:57 am
by quonsar
Hi all!

I'm booting a couple versions of Ubuntu from partitions on /dev/sda. I have installed GhostBSD on an empty drive, /dev/sde.
I chose ZFS and the install appeared to go fine. Looking at the GhostBSD drive, there appear to be 3 partitions now, the only one being recognized is the ZFS partiton, I have tried a number of approaches to add that drive to my /etc/grub.d/40_custom, targeting those different partitions but so far no luck booting. Here is what I have:

Code: Select all

menuentry "GhostBSD" --class freebsd --class bsd --class os {
    insmod zfs
    insmod bsd
    search -s -l zroot
    kfreebsd /@/boot/zfsloader
    kfreebsd_loadenv /@/boot/device.hints
}
The error I am getting is 'no such device zroot'.

No UEFI, strictly old school. The GhostBSD drive was, before install a single GPT partition.

Any guidance? THANKS!

Re: Booting from GRUB2

Posted: Thu Jul 02, 2020 1:06 am
by mapsware
If the GhostBSD drive has 3 partitions, it must be

EFI partition
FreeBSD-ZFS
SWAP

You need to launch /EFI/BOOT/BOOTX64.EFI

Code: Select all

user@host ~% gpart show
=>        40  3907029088  ada0  GPT  (1.8T)
          40      532480     1  efi  (260M)
      532520  3897387008     2  freebsd-zfs  (1.8T)
  3897919528     9099264     3  freebsd-swap  (4.3G)
  3907018792       10336        - free -  (5.0M)

Re: Booting from GRUB2

Posted: Thu Jul 02, 2020 1:17 am
by quonsar
Assume I'm a total idiot, because I am. How do I plug that into GRUB2?

Re: Booting from GRUB2

Posted: Thu Jul 02, 2020 1:46 am
by quonsar
The three partitions are:

Code: Select all

Partition number (1-3): 1
Partition GUID code: 83BD6B9D-7F41-11DC-BE0B-001560B84F0F (FreeBSD boot)
Partition unique GUID: 360B92BF-BB88-11EA-B25C-1CB72CAF8DB6
First sector: 40 (at 20.0 KiB)
Last sector: 551 (at 275.5 KiB)
Partition size: 512 sectors (256.0 KiB)
Attribute flags: 0000000000000000
Partition name: ''

Partition number (1-3): 2
Partition GUID code: 516E7CBA-6ECF-11D6-8FF8-00022D09712B (FreeBSD ZFS)
Partition unique GUID: 376A490B-BB88-11EA-B25C-1CB72CAF8DB6
First sector: 552 (at 276.0 KiB)
Last sector: 1870139943 (at 891.8 GiB)
Partition size: 1870139392 sectors (891.8 GiB)
Attribute flags: 0000000000000000
Partition name: ''

Partition number (1-3): 3
Partition GUID code: 516E7CB5-6ECF-11D6-8FF8-00022D09712B (FreeBSD swap)
Partition unique GUID: 38BDF2F4-BB88-11EA-B25C-1CB72CAF8DB6
First sector: 1870139944 (at 891.8 GiB)
Last sector: 1875374631 (at 894.2 GiB)
Partition size: 5234688 sectors (2.5 GiB)
Attribute flags: 0000000000000000
Partition name: ''

Re: Booting from GRUB2

Posted: Thu Jul 02, 2020 4:51 pm
by mapsware
The 3 partitions are GPT and are of type

FreeBSD-Boot
FreeBSD-ZFS
FreeBSD-SWAP

I do not use GRUB, but you need to make a chainloader to the FreeBSD-Boot partition

Re: Booting from GRUB2

Posted: Sun Aug 23, 2020 10:18 am
by wb7odyfred
from Grub> prompt, issue "ls" commands to view files. this is what I found that help me boot the REBOOTX64-REFIND file and select Manjaro Linux or GhostBSD 20.0x OS

Code: Select all

ls
ls (hd0,gpt1)
ls (hd0,gpt1)/
ls (hd0,gpt1)/efi/boot
set root='(hd0,gpt2)'
chainloader (hd0,gpt1)/efi/boot/REBOOTX64-REFIND.EFI
boot

Read the GhostBSD wiki
https://wiki.ghostbsd.org/index.php/How_To