PDA

View Full Version : cannot dualboot with pc-bsd



frankyboynl
February 3rd, 2015, 10:00 AM
hello, I am trying to dualboot my laptop with ubuntu,windows and pc-bsd. I adapted the menu-entry as follows:


menuentry "PC-BSD (on /dev/sda4)" {
insmod ufs
set root='(hd0,4)'
search --no-floppy --fs-uuid
chainloader +1
}

and ran grub-update, but when I select pc-bsd from the boot menu, it says:


file /boot/grub/ufs.mod not found

tokyobadger
February 3rd, 2015, 12:50 PM
I think the error is coming because you should have insmod ufs2 (not ufs)

more info here (http://unix.stackexchange.com/questions/109272/add-freebsd-to-grub2-boot-menu)

frankyboynl
February 3rd, 2015, 01:22 PM
I changed it to ufs2, but now I get the error code: error: one argument expected. When I press enter, it says NO UFS...



grtz, Frank

tokyobadger
February 3rd, 2015, 01:56 PM
three options here (https://blog.debiania.in.ua/posts/2013-09-30-dualbooting-debian-and-freebsd.html) - when I did this before I called the FreeBSD bootlaoder via the chainloading option which is the most straightforward
/dev/sda4 (hd0,4) looks correct - I suspect it's because you are mixing several approaches (1 & 2 in the above link) to call the PC-BSD bootloader

menuentry "PC-BSD (on /dev/sda4)" {
set root='(hd0,4)'
chainloader +1
}
in /etc/grub.d/40_custom

sudo update-grub
post #24 in this thread also shows all 3 ways (https://forums.freebsd.org/threads/freebsd-accessed-via-grub2.5918/)

frankyboynl
February 3rd, 2015, 02:17 PM
when I tried as stated above, I get the following: not ufs no /boot/loader


grtz, Frank

tokyobadger
February 3rd, 2015, 02:27 PM
can you show output of sudo fdisk -l

tokyobadger
February 3rd, 2015, 02:38 PM
ok, plugged in an old hdd from when I was dual-booting ubuntu and FreeBSD and the /etc/grub.d/custom_40 entry looks like this

menuentry "FreeBSD"{
insmod ufs2
set root=(hd1,1)
chainloader +1
}


And it was working - last modified 13 Oct 2012 - obviously the set root line will need to change for you this was /dev/sdb1

frankyboynl
February 3rd, 2015, 02:58 PM
the bsd is located on /dev/sda4, so how wil the grub-file need to look?


grtz, Frank

tokyobadger
February 3rd, 2015, 03:01 PM
you have it correct as I understand

set root=(hd0,4)
but maybe drop the ' ' - my working entry didn't have those

frankyboynl
February 3rd, 2015, 03:31 PM
strange, when I do that it gives again the error code: not ufs...


grtz, Frank

oldfred
February 3rd, 2015, 04:38 PM
Remove the search line also. That overrides the set root command as it searches for the correct UUID, if set root command not correct. But you do not even have the UUID in the command, so that is failing.

frankyboynl
February 3rd, 2015, 04:57 PM
ok, so I tried to use boot-repair, but that resulted in 2 BSD entries, which both didnt work. Also I do not know exactly what you mean by search line..



grtz, Frank

frankyboynl
February 3rd, 2015, 08:04 PM
tried the following:


menuentry 'PC-BSD' {
insmod zfs
search -s -l tank1 --hint hd1,gpt63
kfreebsd /boot@/loader
}


now it says on startup: file boot not found


grtz, Frank

oldfred
February 3rd, 2015, 08:19 PM
In post #1 you have a search line.
Most examples that have worked just had the set root line.

For FreeBSD I have seen this:
menuentry "FreeBSD" {
insmod ufs2
set root=(hd0,1)
chainloader +1
}

But if using zfs you also need the insmod zfs as shown above.

frankyboynl
February 3rd, 2015, 09:09 PM
I tried the above, but I keep getting the following:

not ufs
FreeBSD/x86 boot
Default : 0,ad(0.a)/boot/loader
boot: not ufs
No /boot/loader



grtz, Frank

oldfred
February 3rd, 2015, 09:38 PM
Then there are more differences with PC-BSD and Free-BSD on how they are configured.
It looks like it must be a MBR primary partition or gpt partitioned and does use grub to boot.

And it looks like it does not use ufs.

menuentry "PC-BSD 9.1" {
set root='(hd0,2)'
chainloader +1
}


https://pcbsd.org/showthread.php?t=22998

Post the Summary report from Boot-Repair.

frankyboynl
February 3rd, 2015, 10:14 PM
http://paste.ubuntu.com/10041458/

oldfred
February 3rd, 2015, 10:37 PM
Your Windows is hibernated or needs chkdsk. Best not to hibernate Windows if dual booting. Even if two copies of Windows.

You are using zfs. So you will need the insmod zfs. But not sure how well grub/Linux support zfs. Last I saw was that it was all experimental.

frankyboynl
February 4th, 2015, 08:19 PM
ok, I give up, instead of using freebsd I now used that partition to test opensuse. Thanks a lot anyway..


grtz, Frank