From owner-freebsd-hackers Wed Sep 27 10:21:37 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA07136 for hackers-outgoing; Wed, 27 Sep 1995 10:21:37 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id KAA07129 for ; Wed, 27 Sep 1995 10:21:22 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id DAA32286; Thu, 28 Sep 1995 03:17:20 +1000 Date: Thu, 28 Sep 1995 03:17:20 +1000 From: Bruce Evans Message-Id: <199509271717.DAA32286@godzilla.zeta.org.au> To: bde@zeta.org.au, nate@rocky.sri.MT.net Subject: Re: Diskslice naming convention? Cc: hackers@FreeBSD.org Sender: owner-hackers@FreeBSD.org Precedence: bulk >> >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? No, I just mean that the tree of slices is walked recursively to linearize it. It happens to be walked depth-first. This could give strange orders such as: 1 2 3 ext | ext 9 10 11 | 5 ext null null | 6 ext null null | 7 ext null null | 8 null null null but most fdisks generate a degenerate nearly linear tree such as: 1 2 3 ext | 5 ext null null | 6 ext null null | 7 ext null null | 8 null null null >> >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? /dev/rsd0c is the character device for the c partition on the first slice on sd0 with type 0xa5 (aka the compatibility slice). /dev/sd0 is the block device for the whole disk. >> ># 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). The areas of the disk described by the two devices can be the same in degenerate cases. >> >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? There's the fdisk inside sysinstall and in libdisk/tst01. It recognizes extended partitions but can't create them. Bruce