Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 1996 11:14:36 -0400 (EDT)
From:      Chuck Robey <chuckr@glue.umd.edu>
To:        Gary Chrysler <tcg@ime.net>
Cc:        Annelise Anderson <andrsn@andrsn.stanford.edu>, Steve Marmer <ids@interlog.com>, questions@FreeBSD.org
Subject:   Re: Panic mounting root
Message-ID:  <Pine.OSF.3.95.960806105423.26504A-100000@fiber.eng.umd.edu>
In-Reply-To: <32074437.67E@ime.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 Aug 1996, Gary Chrysler wrote:

> > > > But bootable partitions *must* be under cylinder 1024. (504M)
> > > > This is a limitation of the PC System BIOS boot code!
> > >
> > > I think this refers only to IDE/EIDE drives.  I have a 2.1G Conner
> > > fast scsi 2 installed as a second hard drive on an Adaptec 1542CF,
> > > and FreeBSD is running in the *last* 660 mb. on that drive (booting
> > > from the OS/2 boot manager).
> > 
> > Actually, it applies to both, but scsi drives all support more flexible
> > remapping of sectors to make them all fit under 1024 cylinders, so they
> > don't feel the pinch.  BTW, the whole partition DOES NOT have to be under
> > 1024 cylinders, just the boot sector of that partition.
> > 
> 
> Chuck, While we're on the subject I'd like to clear this up in
> my mind.
> 
> A FreeBSD slice is:	Sections of a partition??
> So properly stated:	Only the root slice needs to be under 1024.
> 			(If needed :)
> Is that about how it works.. I never fully understood the slice.
> The need to fully understand hasn't came upon me yet.. :)
> 
> I'm not a SCSI guru, But it is my understanding that SCSI's access
> in a LBA method.
> ie:	c:0 h:0 s:0 = LBA 0
> 	c:0 h:0 s:1 = LBA 1
> 	etc ...
> 	etc ...
> 
> It is also my understanding that most OS's (Advanced OS's) also use
> a LBA method.
> So if your drive uses CHS, The bios has to translate OS calls
> to/from CHS to write/read.
> 
> But like I said, I'm no guru on the internals of disk IO.
> I welcome the knowledge though.

I don't use IDE drives, and LBA refers ONLY to IDE drive remapping, so I'm
just a little hazy on it.  SCSI systems have no LBA as such.  SCSI
controllers have 2 options on remapping, depending on the size of the
drive, and that essentially removes any consideration, because the
remappings available move the entire drive inside 1024 cylinders.

Understand that the word 'partition' has two meanings here, which is the
base cause of all the confusion.  Dos partitions are areas of the disk set
aside and noted in partition tables.  The location of the partition tables
is set in stone, a standard.  For Unixes, on computers OTHER THAN pc
compatibles, this is also true.  The trouble comes in the way the standard
unix disk partitioning has been adapted to work with PC disks.

FOR PC DISKS, FreeBSD makes 'partitions' or slices (same meaning here) by
taking a dos partition and splitting it up.  Thus, multiple FreeBSD
partitions (or slices, I like slices much better for the word here) sit
inside a dos partition.  On an earlier machine of mine, I had 4 dos
partitions, where I used partition 1 for a small dos segment, and
partition 2 for FreeBSD.  FreeBSD then took that partition 2, and split it
into three of what it calls partitions, which has nothing in common with
the dos partition table at all.

FreeBSD keeps track of it's partitions using the disklabel, which might be
loosely called it's equivalent of a dos partition label.  The disklabel
resides inside one dos partition, and defines the slices (or partitioning)
that FreeBSD uses of it's dos partition.  On that older system of mine, I
had three FreeBSD slices, all of which sat in the second dos partition.

To get a new partition, on a new disk or something, to be useful to
FreeBSD, first you use your dos tool (or FreeBSD's sysinstall) to define
the dos partition.  That gives you an area on that disk that you can use
for FreeBSD.  Then, after you decide how you're going to use the FreeBSD
part (how many chunks are you going to cut it into, what size, what
filesystems you'll put there) then you disklabel the FreeBSD partition,
whic tells FreeBSD how to use it's partition.  If you're going to have any
of the FreeBSD slices bootable, then make sure that slice is below 1024
cylinders.  That means, of course, that at least part of the dos partition
that FreeBSD is using is also below 1024.

After you've disklabeled the FreeBSD slices, then you can newfs the slices
so that they can be used by FreeBSD.  You'll probably want to modify your
/etc/fstab so that FreeBSD will use the partition the way you want, either
for swapping, or for some mountable filesystem.

Have I completely confused you yet?

This problem wouldn't exist on, say, a DEC system, because the Unix
partitioning is the base system for the disk, but for PCs, they stick the
structure inside the dos partition structure, and then called it with
names guaranteed to cause confusion.

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@eng.umd.edu          | communications topic, C programming, and Unix.
9120 Edmonston Ct #302      |
Greenbelt, MD 20770         | I run Journey2 and n3lxx, both FreeBSD
(301) 220-2114              | version 2.2 current -- and great FUN!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.960806105423.26504A-100000>