LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-21-2014, 01:57 PM   #1
caveman86
Member
 
Registered: Nov 2014
Location: Adelaide, South Australia
Distribution: Slackware 14.1 x64, LFS 7.6 x64
Posts: 83

Rep: Reputation: 8
Dual booting with FreeBSD issues


I am having issues getting Grub2 to work to allow me to dual boot with Slackware 14.1 . Here is info from the terminal I hope this helps sort it out as I have freebsd listed in the menu but when I select it the computer just reboots.

Quote:
bash-4.2# os-prober
No volume groups found
/dev/sda1:unknown Linux distribution:Linux:linux
/dev/sda3:Slackware Linux (Slackware 14.1):Slackware:linux
bash-4.2#
I edited the /etc/grub.d/40_custom file and added this
Quote:
menuentry "FreeBSD" --class freebsd --class bsd --class os {
insmod ufs2
insmod bsd
set root=(hd0,1)
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0s1a
set kFreeBSD.vfs.root.mountfrom.options=rw
set kFreeBSD.hw.psm.synaptics_support=1
}
There are some variations if I am doing something wrong please let me know its frustrating me bigtime I have done all the standard updating steps for grub like when I add a new kernel etc to no avail please help cheers
 
Old 12-21-2014, 02:07 PM   #2
caveman86
Member
 
Registered: Nov 2014
Location: Adelaide, South Australia
Distribution: Slackware 14.1 x64, LFS 7.6 x64
Posts: 83

Original Poster
Rep: Reputation: 8
.

I also tried this too in the 40_custom file to no avail

Quote:
[menuentry "FreeBSD (/boot/loader)" {
insmod ufs2
set root=(hd0,1,a)
kfreebsd /boot/loader
}
Comes up no such partition
 
Old 12-21-2014, 02:19 PM   #3
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 265
Blog Entries: 2

Rep: Reputation: 34
I run both FreeBSD and Slackware, but not on the same machine. My next step would be to install the Slackware Grub loader. See here. From there try to add FreeBSD.

For troubleshooting, I've set up a camera to capture the screen as FreeBSD boots.

Which did you install first, Slackware or FreeBSD?

HTH.

-JJ
 
Old 12-21-2014, 02:21 PM   #4
caveman86
Member
 
Registered: Nov 2014
Location: Adelaide, South Australia
Distribution: Slackware 14.1 x64, LFS 7.6 x64
Posts: 83

Original Poster
Rep: Reputation: 8
Solved

I made an Error resulting in Grub unable to find the partition

Quote:
[menuentry "FreeBSD (/boot/loader)" {
insmod ufs2
set root=(hd0,1,a)
kfreebsd /boot/loader
}
and it worked properly when I put it to this

Quote:
[menuentry "FreeBSD (/boot/loader)" {
insmod ufs2
set root=(hd0,1)
kfreebsd /boot/loader
}
Cheers
 
Old 12-21-2014, 02:28 PM   #5
caveman86
Member
 
Registered: Nov 2014
Location: Adelaide, South Australia
Distribution: Slackware 14.1 x64, LFS 7.6 x64
Posts: 83

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by jjthomas View Post
I run both FreeBSD and Slackware, but not on the same machine. My next step would be to install the Slackware Grub loader. See here. From there try to add FreeBSD.

For troubleshooting, I've set up a camera to capture the screen as FreeBSD boots.

Which did you install first, Slackware or FreeBSD?

HTH.

-JJ
I sorted it but using a camera is a smart idea I oten use my smartphone camera to catch the text on my linux startups if I need to +1 to ingenious thinking as the text does scroll really fast.
 
Old 12-21-2014, 02:41 PM   #6
caveman86
Member
 
Registered: Nov 2014
Location: Adelaide, South Australia
Distribution: Slackware 14.1 x64, LFS 7.6 x64
Posts: 83

Original Poster
Rep: Reputation: 8
It is not working again grrr

Now it decided it can't find the partition does this mean either Grub is corrupted or my Hard disk is possibly about to fail.
 
Old 12-22-2014, 05:36 AM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
If Grub doesn't work, you could always try setting up boot0 via boot0cfg to load Slackware.
 
Old 12-22-2014, 11:19 AM   #8
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, 9front
Posts: 316

Rep: Reputation: Disabled
You
might also give Grub's vanilla chain loader a try. I recall once using
Grub to dual boot with OpenBSD and the OpenBSD specific Grub loader
didn't work while the chain loader did. (If I were better I would have
debugged that.) I'm now dual booting Slackware and OpenBSD using Lilo
using its chain loader which works perfectly.
 
Old 12-22-2014, 06:18 PM   #9
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
The problem with using Grub is, Grub usually doesn't work with FreeBSD without patches. PC-BSD got it to work somehow with 2.02beta2(?) I think, but they also have a special 40-custom file as well.

Because of this, Grub isn't well suited for usage with FreeBSD even if you use the Slackware or BSD/ports version. The Slackware version is actually still 2.00 so it doesn't detect UFS2 or ZFS well. 2.02beta2 is supposed to have some better ability to detect ZFS and UFS2 partitions, but I haven't heard too much on the subject, even around FreeBSD's mailing list.

The best, and actual recommended FreeBSD option, is to use the FreeBSD default boot0 bootloader which will do the work for you better than Grub will.
 
Old 12-22-2014, 07:00 PM   #10
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
Quote:
Originally Posted by thirdm View Post
I'm now dual booting Slackware and OpenBSD using Lilo
using its chain loader which works perfectly.
Same here, but I installed FreeBSD.
Lilo doesn't work with zfs (according to PC-BSD documentation).
I don't know about ufs2, but with ufs Lilo works ok.
 
Old 12-23-2014, 06:24 AM   #11
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
UFS2 should work with LILO.
 
Old 12-23-2014, 07:23 AM   #12
caveman86
Member
 
Registered: Nov 2014
Location: Adelaide, South Australia
Distribution: Slackware 14.1 x64, LFS 7.6 x64
Posts: 83

Original Poster
Rep: Reputation: 8
I might have to try boot0 instead of Grub I have also tried Lilo but to no use either it had no issues with Slackware but when it come to finding my freebsd partition it doesn't exist.
 
Old 12-23-2014, 08:11 AM   #13
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
I think it would be helpful to know exactly how your disk(s) is partitioned and where and how FreeBSD is installed?

If you installed FreeBSD to GPT (often the default if you're using the whole disk with auto partitioning) then boot0cfg is not going to be much use. For GPT, multi-booting is going to be harder. I believe that grub2, installed in Linux, should be able to chainload to FreeBSD's bootloader, rather than you trying to bootstrap directly to the kernel.
 
Old 12-23-2014, 10:21 AM   #14
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
Quote:
Originally Posted by caveman86 View Post
I might have to try boot0 instead of Grub I have also tried Lilo but to no use either it had no issues with Slackware but when it come to finding my freebsd partition it doesn't exist.
If you installed FreeBSD in a primary partition with ufs (or ufs2 according to ReaperX7),
it would work like this, just like a windows partition configuration.
Code:
# FreeBSD
other = /dev/sdb2
  label = FreeBSD
  table = /dev/sdb
# FreeBSD bootable partition config ends
In my case, I installed to a usb hard disk (/dev/sdb) in a second primary partition.
When I boot FreeBSD I get that 'mountroot>' prompt. My first idea was that some usb module
was missing, but the problem was partitions naming. I just enter 'ufs:da0s2' (something like
this) and FreeBSD boots ok.

Slackware64 is installed in the first primary partition (/dev/sdb1) with Lilo installed
at the MBR of /dev/sdb.

This machine is a notebook with Vista in /dev/sda , so Vista always boots when the usb hd
isn't plugged in.
With the usb hd plugged in, Lilo takes control.
All this is with old MBR, I don't have experience with GPT or Lilo with EFI.
 
Old 12-25-2014, 12:57 AM   #15
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
If he used ZFS then LILO won't work period. He'll have to use a patched Grub2 or boot0. Grub2 even with 2.02~beta2 still has issues detecting ZFS properly, even when built with ZFS support with BSD or Linux (ZFS-On-Linux), and PC-BSD has a heavily patched Grub2-2.02~beta2 implementation. The native FreeBSD port has issues as well.

For this, boot0 is often the most recommended bootloader to use for FreeBSD installs.

Last edited by ReaperX7; 12-25-2014 at 01:01 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dual booting between Linux and FreeBSD doughyi8u *BSD 5 01-02-2012 04:16 PM
Dual Booting with FreeBSD 9 dive Slackware 14 10-31-2011 11:39 AM
dual booting with FreeBSD and Slackware paddy's not St.Pat Linux - Newbie 2 11-23-2009 07:47 AM
Dual Boot Slackware 13 with FreeBSD, but Issue Dual Booting PC-BSD Photon Blizzard *BSD 2 11-09-2009 11:55 AM
Dual Boot Slackware 13 with FreeBSD, but Issue Dual Booting PC-BSD Photon Blizzard Linux - Newbie 1 10-22-2009 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration