From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 28 15:39:46 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 653921C2 for ; Sun, 28 Oct 2012 15:39:46 +0000 (UTC) (envelope-from mitchell@wyatt672earp.force9.co.uk) Received: from avasout07.plus.net (avasout07.plus.net [84.93.230.235]) by mx1.freebsd.org (Postfix) with ESMTP id BF3148FC08 for ; Sun, 28 Oct 2012 15:39:45 +0000 (UTC) Received: from i606.localnet ([87.114.227.42]) by avasout07 with smtp id Gffd1k0010vXEjb01ffehe; Sun, 28 Oct 2012 15:39:38 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=XOyyuHdE c=1 sm=1 a=D7118sq8BksopLMhW8NoUw==:17 a=tvFjYeeLK-cA:10 a=yRT9YeEI6sEA:10 a=KdljGRtMWWsA:10 a=8nJEP1OIZ-IA:10 a=7vtFykjVAAAA:8 a=jIxkZHDmzRUA:10 a=6I5d2MoRAAAA:8 a=MX4UKU3uv9fDRpXQw0QA:9 a=wPNLvfGTeEIA:10 a=SV7veod9ZcQA:10 a=D7118sq8BksopLMhW8NoUw==:117 From: Frank Mitchell To: freebsd-hackers@freebsd.org Subject: Re: How to boot FreeBSD and linux from FreeBSD MBR? Date: Sun, 28 Oct 2012 15:28:33 +0000 User-Agent: KMail/1.13.5 (Linux/2.6.32-5-686; KDE/4.4.5; i686; ; ) References: <508B6D9D.9050103@rawbw.com> In-Reply-To: <508B6D9D.9050103@rawbw.com> MIME-Version: 1.0 Message-Id: <201210281528.33449.mitchell@wyatt672earp.force9.co.uk> Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:39:46 -0000 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"