Subject: disklabel & odd partition boundaries.
To: None <netbsd-help@netbsd.org>
From: Richard Rauch <rauch@eecs.ukans.edu>
List: netbsd-help
Date: 01/04/2001 12:17:41
(In the unlikely event that it matters, the following is in the context of
an i386.  But, I think that the discussion should be machine independant.)


A while back, I (perhaps indirectly) asked if there was any harm in
setting up a disk partition to begin/end on an odd boundary (i.e., not on
a cylinder, nor even on a track, boundary).  My understanding was that
there was no problem, and up till now experience agreed with that.

I slipped in a GNU/LINUX partition starting at block 63, and extending
for 8,000,000 blocks (up to 8000063), to give me ~4GB of space on a ~20GB
drive for GNU/LINUX.  (The 63 offset was to accomodate the i386 BIOS,
which apparently likes to have a full track reserved for itself.) The
balance of the disk is given over to NetBSD.  The system installer made no
objection about these non-cylinder boundaries, that I recall, and all has
run well for a couple of weeks.

In reading a netbsd-users post, I thought that it was about time for me to
try getting NetBSD to read the GNU/LINUX filesystem.

Now, I've hit a wrinkle.  ``disklabel -e'' forces me to deal with
cylinders.  Since the GNU/LINUX boundary doesn't end on a cylinder (or,
due to the 63-block track at the beginnig, even BEGIN on a cylinder), I
can't readily tell NetBSD where to find the GNU/LINUX filesystem.

The system installer let me describe the partitions in terms of sectors.
Unfortunately, it does not appear that the system installer uses the
disklabel program to write the disklabel...  Is there a simple way to use
disklabel to do what I want, here?

I had hoped that ``disklabel -t -e /dev/wd0'' would let me edit in the
``disktab'' style display.  Unfortunately, in combination with ``-e'',
disklabel seems to act as if ``-t'' were never specified.


(Or, contrary to the impression that I received when raising the topic
before, am I just asking for trouble by having partitions that don't
respect cylinder boundaries?  If so, and this is almost certainly
i386-specific, should I repartition with BIOS-level fake geometry
cylinders, or real cylinders?)


  "I probably don't know what I'm talking about." --rauch@eecs.ukans.edu