From owner-freebsd-questions@FreeBSD.ORG Sun Jun 26 18:55:36 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87939106566B for ; Sun, 26 Jun 2011 18:55:36 +0000 (UTC) (envelope-from gyrd-se@thanelange.no) Received: from sakura.nani.no (sakura.nani.no [195.204.164.110]) by mx1.freebsd.org (Postfix) with SMTP id E23B78FC08 for ; Sun, 26 Jun 2011 18:55:35 +0000 (UTC) Received: (qmail 97873 invoked by uid 89); 26 Jun 2011 20:28:53 +0200 Received: from cm-84.208.141.195.getinternet.no (HELO parvati.thanelange.no) (gyrd-se@thanelange.no@84.208.141.195) by sakura.nani.no with SMTP; 26 Jun 2011 20:28:53 +0200 Date: Sun, 26 Jun 2011 20:28:52 +0200 From: Gyrd Thane Lange To: perryh@pluto.rain.com Message-ID: <20110626202852.6765f935@parvati.thanelange.no> In-Reply-To: <4e05220e.GBAaOafCcTgMjymv%perryh@pluto.rain.com> References: <4D7F86D5012E084A@> <4e05220e.GBAaOafCcTgMjymv%perryh@pluto.rain.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: doug@safeport.com, freebsd-questions@freebsd.org Subject: Re: Dual Boot 8.2 and Windows 7 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2011 18:55:36 -0000 On Fri, 24 Jun 2011 16:47:26 -0700 perryh@pluto.rain.com wrote: > doug@safeport.com wrote: > > > If FreeBSD can be installed in an extended partition, > > that would be a very useful howto. > > _Installing_ it in an "extended partition" is easy enough. > geom(8) understands "extended partitions" (although sysinstall > does not, so you need to install using Fixit# as for other > non-sysinstall cases such as ZFS). > > The problem is _booting_ it. The code in i386/boot2 and > lib/libstand is written to find the / (or /boot) FS on a > BSD partition of an fdisk "primary partition" (aka slice), > or in a GPT partition, and would need additions to handle > fdisk "extended partitions". Some years ago I ran into a similar problem. I ran out of primary partitions (using MBR-speak) and had to move FreeBSD into an extended partition. Here the simple patch I wrote for the FreeBSD boot loader: To update your source use: patch -d /usr/src/sys/boot/i386/libi386/ < boot_loader.diff The FreeBSD loader has since a very long time ago attempted to work with MBR extended partitions but a simple logical error has prevented it from succeeding: How it normally works. ----- | 1 | ----- | 2 | -- ----- | | | | ----- <- | 5 | ----- | | -- ----- | | | | ----- <- | 6 | ----- | | ----- How /boot/loader (incorrectly) works. ----- | 1 | ----- | 2 | -- ----- | | | | ----- <- | 5 | ----- | 6 | -- ----- | | | | ----- <- | 7 | ----- | 8 | ----- It has been a long time since I installed my system but I seem to remember that all that is required is to copy the /boot/loader binary from a patched system onto the newly installed one. (I have included a copy of my /boot/loader at the URL above.) The next challenge is to find a boot manager that will pick up FreeBSD in an extended partition. For myself I use a self patched GRUB. (GRUB also nearly worked out of the box, but had a different problem.) You're welcome to have those patches as well if you need them. Lastly I have the following in my kernel configuration file: include GENERIC ... nooptions GEOM_PART_BSD nooptions GEOM_PART_MBR options GEOM_BSD options GEOM_MBR That is because I am not fond of the new mangled device names, but prefer the old ones. Hope any of this helps. Best regards, Gyrd ^_^