Subject: Re: NetBSD and DOS Extended logical partitions
To: Frank van der Linden <frank@wins.uva.nl>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-help
Date: 03/29/2000 15:52:39
On Wed, 29 Mar 2000, Frank van der Linden wrote:

> On Wed, Mar 29, 2000 at 04:55:37PM +1000, Timshel Knoll wrote:
> > I'm a Linux user/developer interested in xBSD. I'm wondering
> > if NetBSD supports DOS Extended partitions, as it is one
> > of the major things that is stopping me from installing
> > Open/FreeBSD, as neither of these support extended/logical
> > partitions.
> 
> Unfortunately, they're not recognized at the moment. There's a patch
> to do it, and I will modify fdisk and the installer to handle them
> for the next release, but I suppose that doesn't help you much..

Support for _finding_ them isn't in the release, but it is possible to
add them to the disklabel and use them. Hint: the first logical
partition is offset by one cylinder from the extended partition.
Following is the output of "fdisk" and "disklabel" on my laptop, which
has a single logical partition in the extended partititon. Notice that
the start of f: in "disklabel" is exactly 63 sectors greater than the
start of partition 1 in "fdisk".

root% fdisk
NetBSD disklabel disk geometry:
cylinders: 7944 heads: 16 sectors/track: 63 (1008 sectors/cylinder)

BIOS disk geometry:
cylinders: 992 heads: 128 sectors/track: 63 (8064 sectors/cylinder)

Partition table:
0: sysid 6 (Primary 'big' DOS, 16-bit FAT (> 32MB))
    start 63, size 4185153 (2043 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder  519, head   0, sector  1
1: sysid 5 (Extended partition)
    start 4185216, size 1911168 (933 MB), flag 0x0
        beg: cylinder  519, head   0, sector  1
        end: cylinder  756, head   0, sector  1
...

root% disklabel wd0
# /dev/rwd0d:
type: unknown
...
  f:  1911105  4185279      MSDOS                        # (Cyl. 4152*- 6047)