Solved Cannot boot FreeBSD with GRUB

Gato Preto

New Member


Messages: 12

Hi folks!

I'm using GRUBv2 in a dual boot with GNU/Linux Debian and Win10. I've installed FreeBSD and followed many advices but I still cannot see 'FreeBSD' in the option list of GRUB in order to boot it

When I type as root in Debian,

# update-grub

Debian recognizes itself, recognizes Windows too and then says that there's an unknown Linux distro somewhere which I believe to be FreeBSD.

Thanks in advance!
 

Maxnix

Well-Known Member

Reaction score: 207
Messages: 330

I dubt that GRUB can detect and write an entry fo FreeBSD automatically. You can put the following entry in /etc/grub.d/40.custom and then update GRUB's configuration again:
Code:
menuentry "FreeBSD" {
set root=(hdX,Y)
insmod ufs2
kfreebsd /boot/loader
chainloader +1
}
where X is the number of the disk (numbering starts from 0), and Y is the number of the partition (or slice in FreeBSD terms) (numbering starts from 1).
 
OP
OP
G

Gato Preto

New Member


Messages: 12

Maxnix
I dubt that GRUB can detect and write an entry fo FreeBSD automatically. You can put the following entry in /etc/grub.d/40.custom and then update GRUB's configuration again:
Code:
menuentry "FreeBSD" {
set root=(hdX,Y)
insmod ufs2
kfreebsd /boot/loader
chainloader +1
}
where X is the number of the disk (numbering starts from 0), and Y is the number of the partition (or slice in FreeBSD terms) (numbering starts from 1).
Thanks for the answer. I've tried what you posted but without success.
I've created the /etc/grub.d/40.custom file, interestingly exists another file with a very similar name, /etc/grub.d/40_custom.

I've taken some screenshots than I think, can be helpful.

1st: https://imgur.com/a/IkNCo
2nd: https://imgur.com/pPjlIrU
3rd: https://imgur.com/a/DVc1O

Cheers!
 

bookwormep

Well-Known Member

Reaction score: 168
Messages: 294

There is another thread with similar dual-boot questions, see my post #10:

https://forums.freebsd.org/threads/60407/

You probably need to:

Code:
# chmod 755 /etc/grub.d/40_custom
Also, there is no spaces (except set root - is space) inside the second line of above file:

Code:
set root='(hd0,4)'
ASFAIK

Hope this helps.
 
OP
OP
G

Gato Preto

New Member


Messages: 12

There is another thread with similar dual-boot questions, see my post #10:

https://forums.freebsd.org/threads/60407/

You probably need to:

Code:
# chmod 755 /etc/grub.d/40_custom
Also, there is no spaces (except set root - is space) inside the second line of above file:

Code:
set root='(hd0,4)'
ASFAIK

Hope this helps.
I really want to thank you, now, FreeBSD appears in the GRUB's menu boot list and works just fine. Let's see now how I make wireless firmaware work! :beer:
 
Top