Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2002 16:47:26 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        walt <wa1ter@hotmail.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: GEOM question
Message-ID:  <20021016161837.B4090-100000@gamplex.bde.org>
In-Reply-To: <3DAC737D.1020504@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 15 Oct 2002, walt wrote:

> bde@zeta.org.au (Bruce Evans) writes:
>
>  > On Tue, 15 Oct 2002, walt wrote:
>
>  > > Well, disklabel won't work on an extended/logical partition...
>
>  > Um, disklabel works on any slice.  E.g.:
>
> We have a semantic problem, as often happens when the DOS and BSD worlds collide.
>
> s3 is a 'slice' which is the same as a 'DOS primary partition' and yes, disklabel
> works on any 'primary' partition.

It works on anything that resembles a disk.  All slices of disks resemble
disks, and 'DOS logical drives' are mapped to slices.  There is nothing
special about the slices for 'DOS primary partitions' and 'DOS logical
drives' as far as disklabel can tell.

> My new BSD filesystem is on ad2s8, which is a DOS 'logical' partition in my
> 'DOS-extended' (primary) partition ad2s4:
>
> #fdisk ad2
> The data for partition 4 is:
> sysid 15 (0x0f),(Extended DOS (LBA))
>
> The logical drive is numbered 's8' because it is the 4th 'logical' drive in
> the 'extended DOS' slice, and the 'logical' drives are numbered beginning
> with s5 and work upwards from there, and they don't show up in FBSD's fdisk,
> unfortunately, though they do show up in /dev.  The 'primary' partitions are
> numbered 1 thru 4 only.
>
> I think we have M$ (and perhaps IBM) to thank for this marvelous feature
> of the PC which has caused so many headaches over the decades.

Actually, we have Linux to thank for providing an fdisk that supports
extended partitions and logical drives, so that we don't need to fix
update FreeBSD fdisk to get a free fdisk that supports them :-).

> If there is a way to create 'logical' partitions in FreeBSD I'm not aware
> of it.  I usually use PartitionMagic to do all the grunt work of creating
> and resizing such partitions.  And now I can use them as native BSD ufs
> filesystems, which I never knew until now.  Cool!

I haven't used extended partitions for many years.  I would boot Linux or
DOS to create them.  The Linux fdisk binary that I have handy (a version
from 1997) used to run well enough under FreeBSD to at least display
everything.  It is now broken by linkage problems (it wants to use the
FreeBSD libc.so.5).  I never tried it to create partitions, but would
expect it to work.

Once logical drives are created, you can just use them.  This was a
design goal in the origianl version of the slice code in 1995.  (Don't
use extended partitions directly.  It is easy to make a mess by
clobbering the pointers to the logical drive within them.)

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021016161837.B4090-100000>