From owner-freebsd-hackers Wed Sep 27 09:15:40 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA05754 for hackers-outgoing; Wed, 27 Sep 1995 09:15:40 -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 JAA05739 for ; Wed, 27 Sep 1995 09:15:33 -0700 Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id KAA17447; Wed, 27 Sep 1995 10:16:52 -0600 Date: Wed, 27 Sep 1995 10:16:52 -0600 From: Nate Williams Message-Id: <199509271616.KAA17447@rocky.sri.MT.net> To: Bruce Evans Cc: nate@rocky.sri.MT.net, hackers@FreeBSD.org Subject: Re: Diskslice naming convention? In-Reply-To: <199509271600.CAA29766@godzilla.zeta.org.au> References: <199509271600.CAA29766@godzilla.zeta.org.au> Sender: owner-hackers@FreeBSD.org Precedence: bulk Bruce Evans writes: [ Graphical representation deleted ] >> Is this right? > > Yes, except the gaps where the secondary boot records are. Right, I'm thinking logically right now and not physically. > >And the numbering scheme for the slices > 4 is determined by how they > >fall in the first 4 slices, correct? > > Recursively. How do you mean? If I have 4 slices inside of the fdisk partition 1, the first slice in fdisk partition 2 would be (5, 6, 7, 8 are in 1) slice 9. Is that what you mean by recursively? > >disklabel automatically translated /dev/sd0 -> /dev/rsd0c > > Disklabel automatically translates sd0 -> /dev/rsd0c. /dev/sd0 is a > completely different device. I'm still lost. I *understand* that /dev/rsd0c and /dev/sd0 are different (one's a block device, the other is a character device), but how *are* they different in what parts of the disk they represent? I do know that rsd0 represents the entire disk as a character device. Does sd0 represent the entire disk as a block device? If so, why does disklabel translate sd0 -> rsd0c? > This should not cause any confusion because /dev/sd0 didn't exist > before there were slices, and the disklabel man page never refers to > it. It does cause confusion :-(. It's obviously causing me great confusion. > ># dd if=/dev/sd0 of=/dev/null > > >But if I specifically hard-code in the device > > ># dd if=/dev/sd0c of=/dev/null > > >I should get the same results. > > No, they are completely different devices. Look at them with ls -l. I know, but do the above commands produce the same results (modulo the block and character device differences). > >Is there anyway to determine [ A DOS slice ] outside of sysinstall? > > Many. Try > > od -c /rsd0sY | head -1 | cut -c 24-44 > dd if=/dev/rsd0sY | file - # sort of; could be improved *grin*. I could do this myself, but this is not recommended for a newbie. Is there an 'fdisk' type of way? Would it be possible to modify/re-write fdisk to recognize these things? If possible, how much work would be required to do it? Nate