[patch] NetBSD disklabel support for geom_bsd
Paul Mather
paul at gromit.dlib.vt.edu
Fri Mar 17 22:58:58 UTC 2006
Dmitry Pryanishnikov <dmitry at atlantis.dp.ua> wrote:
> Look at my HDD layout from the POV of FreeBSD and NetBSD (I'll show
> some
> parts sufficient to understand the idea), start and size are in disk
> sector
> units:
>
> HDD area FreeBSD NetBSD Description in the
> Start Size device device FreeBSD terms
>
> 0 312579695 ad0 wd0d Whole HDD
> 63 2088387 ad0s1 wd0e First slice (DOS)
> 147942585 81931500 ad0s3 wd0c Third slice (NetBSD)
> 147942585 2097648 ad0s3a wd0a Partition 'a' of the 3rd
> slice
> 150040233 2097648 ad0s3b wd0b Partition 'b' of the 3rd
> slice
>
> Of course, you'll get ad0s3a,b only after applying my patch, otherwise
> they
> aren't accessible from the FreeBSD.
>
> I hope you'll see what they do:
>
> 1. NetBSD's 'c' partition describes NetBSD slice (always?).
> 2. NetBSD's 'd' partition describes the whole HDD (always?).
AFAIK, statement (2) above holds only for a few architectures.
According to the NetBSD disklabel man page, the "d" partition refers to
the whole disk only on i386, hpcmips and arc platforms. On the rest,
the whole disk is referred to by the "c" partition.
I run NetBSD/alpha, and I've always used the "c" partition to refer to
the whole "raw" disk. (I usually use the "d" partition for /var
or /usr.) Furthermore, on NetBSD/alpha there's no concept of "slices,"
so far as I'm aware.
Here is the partition table for drive sd0 on my NetBSD/alpha system:
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 262144 0 RAID # (Cyl. 0 - 115*)
b: 524288 262144 RAID # (Cyl. 115*- 347*)
c: 8380080 0 unused 0 0 # (Cyl. 0 - 3707)
d: 3483168 786432 RAID # (Cyl. 347*- 1889*)
e: 4110480 4269600 RAID # (Cyl. 1889*- 3707)
(Most of my system is mirrored via RAIDframe.)
I don't know if FreeBSD/alpha has the notion of slices, as it's not
supported on my Turbochannel alpha and so I've never run it...
Cheers,
Paul.
--
e-mail: paul at gromit.dlib.vt.edu
"Without music to decorate it, time is just a bunch of boring production
deadlines or dates by which bills must be paid."
--- Frank Vincent Zappa
More information about the freebsd-current
mailing list