From owner-freebsd-questions@FreeBSD.ORG Sun Jun 12 16:02:51 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 2B18A106566C for ; Sun, 12 Jun 2011 16:02:51 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 71CFE8FC24 for ; Sun, 12 Jun 2011 16:02:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id p5CFk8jE080707; Mon, 13 Jun 2011 01:46:09 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 13 Jun 2011 01:46:08 +1000 (EST) From: Ian Smith To: perryh@pluto.rain.com In-Reply-To: <20110612120037.8D5AD1065696@hub.freebsd.org> Message-ID: <20110613001607.J34384@sola.nimnet.asn.au> References: <20110612120037.8D5AD1065696@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: Query about FreeBSD and primary partitions requirements 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, 12 Jun 2011 16:02:51 -0000 In freebsd-questions Digest, Vol 366, Issue 8, Message: 5 On Sat, 11 Jun 2011 14:23:48 -0700 perryh@pluto.rain.com wrote: > Matthew Seaman wrote: > > > On 11/06/2011 08:18, Bret Busby wrote: > > > the current FreeBSD Handbook ... states > > > "FreeBSD must be installed into a primary partition." > > > > > > However, in the last couple of days, I have been advised that > > > FreeBSD can be installed in, and, quite happily runs in, a > > > logical partition within an extended partition. > > > > > > Has anyone other than the person who advised me of that, tested > > > the installation and operation of FreeBSD, within a logical > > > patition of an extended partition ...? > > > > FreeBSD can mount and use filesystems created on partitions inside > > 'extended partition' type slices (cue standard exposition of the > > difference between partitions and slices in FreeBSD-speak.) True. > > > > However, I believe that you may well have difficulty *booting* > > FreeBSD unless the kernel (ie. /boot) can be read from a primary > > partition. > > I presume the purpose of boot0ext.S is to build a boot0 (FreeBSD MBR) > variant capable of booting from what MS call an "extended partition" > -- boot0.S being used when booting from a "primary partition" -- but > I've never tried to use it. I'm having enough "fun" trying to boot > from a _different_ "unusual" configuration. Diffing boot0.S and boot0ext.S shows the latter to be a two-sector (1KB) boot with more detailed strings about different partition types, some difference in SIO code, support for 'BIOS EDD extensions' and CHS vs LBA (ie, older stuff) but nothing I could spot towards decoding 'extended partitions'; it seems from CVS logs to have been kept as a nod to jhk's original 2-sector boot0 code, and hasn't been touched for 7 years. Having run OS/2 for several years before moving to FreeBSD in '98 I had to learn about mounting 'drives' within 'extended partitions' as adXs5, adXs6 etc, to recover about 7 OS/2 filesystems from 2 disks. Last I looked the HPFS code was still in the tree, only needing compiling; very similar to the (old) NTFS code by the same author, it worked fine R/O. Anyway, space allocation within the 'extended partition' is implemented as a linked list, so booting from one of these used to need something like OS/2's boot manager (itself consuming a small primary partition) or GRUB ono to chase down and load the desired boot partition, assuming you managed from the command line to newfs it as UFS in the first place (?) > > Also, I don't think sysinstall(8) groks extended partitions very > > well, > > if at all ... Not at all; sysinstall just sees it as a primary partition (ie FreeBSD slice) of type 0x05 (IIRC) ie as a non-bootable partition, completely ignored by boot0{,ext} or any 'normal' MBR code for that matter .. the FreeBSD convention of naming these as s5 etc is a convenient fiction. > > so you will probably have some fun doing the actual installation. > > Indeed. Best left as an exercise for the (morbidly curious) student :) cheers, Ian