Subject: Re: putting a NetBSD disklabel on an IDE partition other than the 4th
To: None <perry@piermont.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-i386
Date: 11/06/1998 14:11:08
"Perry E. Metzger" <perry@piermont.com> writes:

>Mirian Crzig Lennox writes:
>> So, is there any way to tell disklabel what IDE partition to write the
>> disklabel on (so that I can write a real, functional label to
>> partition 2)?  I tried RTFM without success.

>1) Use fdisk to set the MBR of whatever MBR partition you want (say 2) 
>to 169 decimal.
>2) "use disklabel". It will be perfectly happy. Your problem might be
>that you don't grok how to use disklabel, but that is why we have
>sysinst -- to do this for you.


Mirian,

NetBSD is in the middle of switching partition IDs from the value used
by the original 386BSD (also used by FreeBSD) to a unique ID, not
least so that FreeBSD and NetBSD can coexist on the same disk.

And (Perry's advice notwithstanding), sysinst doesnt fully support the
new labels yet.  sysinst _will_ find and install to an MBR partition
with ID 169, , if you create one id 169 with some other tool first
(eg., linux fdisk).

But it doesnt let you create an id-196 partition _de novo_.


The other gotcha is that i _think_ you are confusing MBR partitions
(aka "slices" with BSD-style disklabels.  Linux has no equivalent of
BSD disklabels. The BSD disklabel lives within the first 8k of the BSD
portion of your drive.  The BSD disklabel tells the BSD kernel how
your drive is partitioned up. You get 8 (BSD) partitions which you can
use to refer to the entire disk, to other MBR slices, or to BSD
"partitions", which are subsets of the BSD slice. The BSD kernel knows
nothing about the MBR, except just enough to find the BSD partition
and read the disklabel (or fake up a semi-reasonable one, if there's
no disklabel at all.)

On i386, you get six usable BSD partitions, since "d" is reserved to
mean the entire disk, and "c" means the whole BSD slice".

Yes, the terminology is confusing...