From owner-freebsd-hackers Wed Sep 27 07:44:44 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA02494 for hackers-outgoing; Wed, 27 Sep 1995 07:44:44 -0700 Received: from rocky.sri.MT.net (sri.MT.net [204.94.231.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id HAA02484 ; Wed, 27 Sep 1995 07:44:37 -0700 Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id IAA17099; Wed, 27 Sep 1995 08:45:43 -0600 Date: Wed, 27 Sep 1995 08:45:43 -0600 From: Nate Williams Message-Id: <199509271445.IAA17099@rocky.sri.MT.net> To: Bruce Evans Cc: hackers@FreeBSD.org, nate@rocky.sri.MT.net, bde@FreeBSD.org Subject: Re: Diskslice naming convention? In-Reply-To: <199509270621.QAA08365@godzilla.zeta.org.au> References: <199509270621.QAA08365@godzilla.zeta.org.au> Sender: owner-hackers@FreeBSD.org Precedence: bulk Bruce Evans writes: > >So, am I right in saying that other than the 'compatability' slice of > >/dev/xd#a for the root partition, the naming scheme is as follows: > > >X = generic device name. > ># = disk number > >Y = slice number (ie; one of the 4 'fdisk' partions') > > >Xd#asY (where 'a' could be any lower-case letter 'a-h') > > No, Y may be any fdisk partition or logical drive, and 'a' follows the > slice number. Whoops, you're right. (of course) Xd#sYa (where 'a' could be any lower-case letter 'a-h'). > >BTW - Are slices named 1-4 or 0-3? > > No, slices are named 1-30. Ok. How do the 'fdisk' slices (of which there can only be 4) relate to the 30 slices available in FreeBSD. Excuse me for using DOS terminology for a minute, but if I understand correctly, we can use 'extended' partitions inside of 'primary' partitions. However, 30/4 isn't a real number, so where does the magic number 30 come from? > >Anyway, we create a FreeBSD slice by setting it's ID to 0xA5. Then, we > >build a disklabel onto this 'slice' which gives us individual partitions > >on that slice. Are there any 'special' partitions in this disklabel? > > c. > > >How would I read the *entire* FreeBSD portion of the slice? How about > > There is no such thing as a `portion' of a slice. (Would a portion be > smaller or larger than a partition? :-).) `dd if=/dev/rxd#sY' or `dd > if=/dev/rxd#sYc' reads the entire slice sY. These devices are > identical. /dev/MAKEDEV creates both for convenience. The c partition > is special whether there is a disklabel describing it or not. If there > is a disklabel, the c partition should match the whole slice. > > >the entire disk? How do I create a FreeBSD partition which accesses a > >DOS slice? > > `dd if=/dev/rxd#' reads the entire disk. /dev/rxd# is a completely > different device from /dev/rxd#c. These devices are often confused > because disklabel automatically translates from `xd#' to /dev/rxd#c'. Ahh, so these are equivalent # dd if=/dev/sd0c of=/dev/null # dd if=/dev/sd0 of=/dev/null (Read the entire slice) Vs. # dd if=/dev/rsd0 of=/dev/null (Read the entire disk) > You can't create a FreeBSD partition which accesses a DOS slice. Just > access the DOS slice directly. Ok. How do I know which slice is the DOS slice? (This get's back to the determination of the numbering scheme 1-30) Nate