Configure booting for GhostBSD

Post your general questions or comments about GhostBSD here!

Configure booting for GhostBSD

Postby Jes » Thu Apr 13, 2017 5:04 pm

Hi all:

I have a problem since first time I installed Ghostbsd. It's about booting the system. The laptop I have ghostbsd installed has two SSDs. First one with Linux and Grub2. Second one with GhostBSD.

I have grub in the first disk configured to boot GhostBSD from the second disk. This works and it's the regular way I boot GhostBSD.

But I want to be able to boot GhostBSD from the second disk. And this is what I'm not able to configure.

The second disk has the following structure:

gpart show ada1
=> 34 488397101 ada1 GPT (233G)
34 6 - free - (3.0K)
40 204800 1 efi [bootme] (100M)
204840 471697408 2 freebsd-ufs [bootme] (225G)
471902248 16484352 3 freebsd-swap (7.9G)
488386600 10535 - free - (5.1M)

The efi slice is from installations with ZFS previous to install GhostBSD.

I've tried copying /boot/boot1.efi into the efi partition as BOOT/BOOTx64.EFI or efi/BOOT/BOOTx64.EFI. No success.

I've tried grub2-pcbsd doing this:

mount -t msdosfs /dev/gptid/5627a755-7a78-11e6-89fa-f0def16accb5 /boot/efi
grub-install --efi-directory=/boot/efi --removable --target=x86_64-efi --force /dev/ada1

but not success either.

Any has an idea how to deal with this?

Thanks in advance,

Jes
Jes
 
Posts: 23
Joined: Sun Dec 25, 2016 6:43 pm
Location: Spain
Has thanked: 11 times
Been thanked: 7 times

Configure booting for GhostBSD


Re: Configure booting for GhostBSD

Postby Jes » Sun Apr 16, 2017 7:28 pm

Unable to configure boot with EFI. I had have to change to Bios Boot mode and Grub.

From another distro (in my first disk) I delete the EFI partition to create a new one, with 1M and type "Bios Boot" (ef02 if I remember well from gdisk).

gpart show ada1:

=> 34 488397101 ada1 GPT (233G)
34 6 - free - (3.0K)
40 2048 1 bios-boot (1.0M)
2088 202752 - free - (99M)
204840 471697408 2 freebsd-ufs [bootme] (225G)
471902248 16484352 3 freebsd-swap (7.9G)
488386600 10535 - free - (5.1M)


Then, from GhostBSD I've installed the pcbsd version of grub2 (grub2 original didn't build the configuration with grub-mkconfig).

Code: Select all
pkg install grub2-pcbsd-2.02q_10


In /usr/local/etc/grub/40_custom add to the end:


Code: Select all
set timeout = 3
menuentry "GhostBSD 10.3" {
insmod ufs2
     set root = (hd1, gpt2)
     kfreebsd /boot/loader
}



Create /usr/local/etc/default/grub and put into:

Code: Select all
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true


This permits Grub saves the last menu entry selected.

Then generate an automatic configuration file with:

Code: Select all
grub-mkconfig -o /boot/grub/grub.cfg


To install

Code: Select all
grub-install --modules=part_gpt /dev/ada1


If everything goes ok the output should be like:

Code: Select all
Installing for i386-pc platform.
Installation finished. No error reported.


There is a small error when the custom menu entry is selected but after another "Enter" GhostBSD boots perfectly. I'd have to refine this custom entry.

If instead of Grub we want to use the FreeBSD boot loader, the Bios Boot partition should be "freebsd-boot" type and size 512K and type a501 (if I remember well). Then, from GhostBSD, we would do:

Code: Select all
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1


if the freebsd-boot partition is the first partition.

This page has helped me a lot:

http://wonkity.com/~wblock/docs/html/disksetup.html
Jes
 
Posts: 23
Joined: Sun Dec 25, 2016 6:43 pm
Location: Spain
Has thanked: 11 times
Been thanked: 7 times


Return to General Questions

Who is online

Users browsing this forum: No registered users and 3 guests