Date: Thu, 28 Sep 1995 03:17:20 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, nate@rocky.sri.MT.net Cc: hackers@FreeBSD.org Subject: Re: Diskslice naming convention? Message-ID: <199509271717.DAA32286@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509271717.DAA32286>