Subject: Re: A FreeBSD problem (off topic ?)
To: Steinar Hamre <>
From: Rakhesh Sasidharan <>
List: netbsd-users
Date: 08/17/2000 18:00:35
> (ok, _now_ we're getting off topic)
Should I stop sending a copy to the list in that case, and just mail to
you directly ?  

> > Actually, the problem is slightly more technical.  I know how FreeBSD
> > handles disklabels, but what I (more precisely) want to know is how to
> > construct one.  That is, when I installed NetBSD after installing FreeBSD,
> > FreeBSD somehow automatically recognized the partitions in the NetBSD
> > slice and made the entries etc for it.  I wan't a similar thing for my
> > extended partitions.
> You have 4 primary partitions. One (and only one) of these may have
> partition id 5 "Extended DOS" and is partitioned futher in a "linked
> list" manner into "logical" (sub)partitions.

I had read this (very informative) "How-It-Works" series which is included
along OpenBSD which explains about "Extended DOS" and the "linked list"
manner.  And that's one more reason I was a bit vary about putting a
disklabel on the extended partition.
> FreeBSD normally handles logical partitions by assigning them
> partition number 5 and upwards (just like Linux (and HURD (acctually
> the HURD partitioning system is modeled very closely after FreeBSD))).
> Use /dev/da0s5 and so on for logical partitions. If you lack a device,
> Note that although FreeBSD fdisk cannot create logical partitions,
> FreeBSD have no problem using them, and all primary and logical
> partitions can be subpartitioned further with a disklabel (but you do
> not put a disklabel on the extended partition itself), resulting in
> partition names like /dev/da2s16f. I'm using this technique to create
> 62 partitions on a single disk. (with a maximum of 7 usable partitions
> each disklabel, I need at least 9 "PC" partitions).

Just to summarize, you mean to say I can have an "extended DOS partition,"
then have a couple of "logical drives" in that, and then subpartition them
furthur using disklabel.  Is that correct ?

> >  Coz, I had OpenBSD long ago, and FreeBSD didn't automatically
> > figure the OpenBSD slice, and then I had to use this
> I *think* FreeBSD did not figure the OpenBSD disklabel because either
> it is not looking for a disklabel (OpenBSD or not) in "PC"-partitions
> with the new OpenBSD partition id and/or it don't know how to use the
> OpenBSD disklabel itself.
> If you create a partition with the NetBSD partition id and NetBSD
> disklabel (which both happen to also be the _old_ OpenBSD partition id
> and disklabel format), then I think you can install OpenBSD on top of
> that and access those (sub)partitions from FreeBSD.
I shall check that out later, and get back to you.  But, just as a doubt,
NetBSD earlier had a partition id of 165, and then they changed it to 169.
OpenBSD has an id of 166.  I was under the impression that NetBSD changed
their id recently, and so FreeBSD should know how to handle the OpenBSD id
more easily coz it has been around for a long time.  Are things different
then ?

> > technique to get things to work.  But then, that spoilt OpenBSD's view of
> > things (as you said earlier, disklabels are treated different in FreeBSD
> > and Net/OpenBSD), and I had to edit things once more there to make things
> > work.
> I do not understand what you where trying to get to work or exactly
> what you did to resolve this, but generally installing a FreeBSD
> disklabel on anything but a FreeBSD partition is a very bad idea. It
> seems to me you where replasing the OpenBSD disklabel with the FreeBSD
> one (Then fixing it from OpenBSD, which probably converted it to a
> old-style OpenBSD disklabel or something). I probably don't want to
> know exactly what you did. ;-)

You got the picture right.  This is what I did.  I needed to access
OpenBSD from FreeBSD, and I don't have any net access in my room (where my
machine is), and so I tried it out.  Oops, eh! ;-)
> > Is this the right way to do things ?  Or is there someother way in which I
> > could have got FreeBSD to recognize my OpenBSD side ?  And how should I go
> > abt getting it to recognize my Linux logical drives ?  If I just type
> > 'disklabel -e wd0s3' (where wd0s3 is the Linux part), it gives me some
> "Logical partitions" in FreeBSD use "PC"-partition number 5 and
> upwards.

I haven't tried, but I ask: so typing 'disklabel -e wd0s5' should let me
edit the disklabel of that logical drive ?  

BTW, could you give me some source from where I can learn more abt
disklabels, and how exactly they are used ?  I read (and re-read) the
manpages, but I am still not exactly clear on the concepts.  Some websites
or documents something ...

There was soemthing else I wanted to ask - but forgot.  Thanks a lot for
your comments anyways.  I shall check them up today/tomm, and get back to
you for more. ;-)