*BSD News Article 51579


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!recepsen.aa.msen.com!zib-berlin.de!irz401!uriah.heep!not-for-mail
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Root partition and cylinder 1024
Date: 24 Sep 1995 22:49:22 +0100
Organization: Private FreeBSD site, Dresden.
Lines: 40
Message-ID: <444jp2$3nf@uriah.heep.sax.de>
References: <43utb3$d4v@seattle.polstra.com>
NNTP-Posting-Host: uriah.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

John Polstra <jdp@polstra.com> wrote:

>The question:  Does the _entire_ MBR slice containing FreeBSD's root
>filesystem need to reside below cylinder 1024 (i.e., begin _and_ end below
>that cylinder)?

No.  (Unless you've got an ancient drive [ST506, ESDI] that requires
bad144 bad sector handling.)

>Or, for example, would this work on a hypothetical 2000-cylinder disk:
>
>    MBR slices:
>	DOS:			cylinders    0 -  899
>	FreeBSD:		cylinders  900 - 1999
>
>    disklabel partitions:
>	root:			cylinders  900 - 1023
>	swap, usr, home:	cylinders 1024 - 1999

It would.  The BIOS must be able to load /kernel out of the root
partition (which is in the first FreeBSD slice).  The only way to
restrict the file /kernel to be below cylinder 1024 with all its
sectors is to restrict the root _file system_ (aka. partition, but
*not* the entire slice) below 1024.

>For that matter, would it work to have just the first few cylinders of
>the FreeBSD MBR slice be below cylinder 1024, with the root disklabel
>partition extending beyond that boundary?  It seems like, as long as
>the FreeBSD bootstrap code is below cylinder 1024, the BIOS should be
>able to find it, and the system should boot up OK.  Is that correct?

The bootstrap _and_ the file /kernel (or whatever you're going to
load).  The bootstrap loader does toggle back and forth between real
and protected mode, and uses the BIOS int 0x13 services to access the
disk.
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)