Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2012 15:28:33 +0000
From:      Frank Mitchell <mitchell@wyatt672earp.force9.co.uk>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to boot FreeBSD and linux from FreeBSD MBR?
Message-ID:  <201210281528.33449.mitchell@wyatt672earp.force9.co.uk>
In-Reply-To: <508B6D9D.9050103@rawbw.com>
References:  <508B6D9D.9050103@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Yuri, I've been through this too.

The short answer is to install LILO everywhere, once for each time you install 
a version of Linux. I discovered this from System Rescue CD, which is an 
obvious piece of kit for this situation.

Currently I have the FreeBSD Boot Selector in my MBR, installed from PC-BSD. 
This means I can boot my four Primary Partitions using F1, F2, F3, F4.

F1 actually boots my dedicated Data Partition #1, which is formatted Ext2 so 
other systems can access it. I installed GRUB here when I installed Debian, 
and it works. Other times, Debian says this is dangerous, but not when first 
installing. From here, GRUB can boot Linux versions on other partitions.

F2 boots PC-BSD as usual, on Primary Partition #2.

F3 boots Debian on Primary Partition #3, using LILO, which I installed on 
Partition #3 with that Debian release. LILO makes Linux start much like BSD.

F4 boots another Debian on Logical Partition #6, using LILO installed on 
Primary Partition #4. This works even though Partition #4 is an Extended DOS  
Partition acting as a container. I installed LILO on Logical Partition #6 too, 
because System Rescue CD suggests this. Logical Partition #5 is my Linux Swap.

Using F1 I can boot everything from GRUB too, which would have been essential 
if I'd had alot of Linuxes in my Extended DOS Partition. Debian's GRUB install 
seems to detect other Linuxes okay, but it doesn't see BSDs. Though GRUB will 
boot PC-BSD too:

In GRUB, press 'c' to get the GRUB Command Line.
"ls -lh" gives information on all my Partitions.
"chainloader (hd0,msdos2)+1" accesses PC-BSD on Primary Partition #2.
"boot" boots my PC-BSD.

BUT: I discovered there was a problem when I had two BSD releases in two 
Primary Partitions. When I wanted the second BSD, GRUB always booted the first 
one. This looks like a bug in GRUB.

Also I'm sure this whole scheme falls apart if you start moving or resizing 
your partitions.

Yours truly: Frank Mitchell

On Saturday 27 October 2012 06:14:05 Yuri wrote:
> When I installed ubuntu on another partition, it overwrote BSD MBR with
> grub one.
> Now grub boots ubuntu without even asking what to boot.
> When I tried to restore BSD MBR, BSD boots but linux doesn't. This is
> because there is no bootable PBR in linux partition.
> When I tried to install grub into PBR on its own partition, like someone
> online suggested, it refused with the message that this is dangerous, etc.
> 
> So is there a way to boot both linux and BSD from BSD MBR (by pressing
> F2 or whatever)?
> Are there quick instructions anywhere?
> I just don't want grub to take over the boot process.
> 
> Yuri
> 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210281528.33449.mitchell>