Booting from GRUB2

Questions about the installation of FreeBSD
Post Reply
quonsar
Posts: 3
Joined: Thu Jul 02, 2020 12:44 am
Has thanked: 1 time
Been thanked: 0

Booting from GRUB2

Post 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!

mapsware
Posts: 25
Joined: Tue May 07, 2019 11:22 pm
Location: Hermosillo, Son. Mexico
Has thanked: 2 times
Been thanked: 1 time

Re: Booting from GRUB2

Post 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)

quonsar
Posts: 3
Joined: Thu Jul 02, 2020 12:44 am
Has thanked: 1 time
Been thanked: 0

Re: Booting from GRUB2

Post by quonsar »

Assume I'm a total idiot, because I am. How do I plug that into GRUB2?

quonsar
Posts: 3
Joined: Thu Jul 02, 2020 12:44 am
Has thanked: 1 time
Been thanked: 0

Re: Booting from GRUB2

Post 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: ''

mapsware
Posts: 25
Joined: Tue May 07, 2019 11:22 pm
Location: Hermosillo, Son. Mexico
Has thanked: 2 times
Been thanked: 1 time

Re: Booting from GRUB2

Post 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
These users thanked the author mapsware for the post:
quonsar (Thu Jul 02, 2020 7:44 pm)
Rating: 33.33%

Post Reply