Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 1995 10:16:52 -0600
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        nate@rocky.sri.MT.net, hackers@FreeBSD.org
Subject:   Re: Diskslice naming convention?
Message-ID:  <199509271616.KAA17447@rocky.sri.MT.net>
In-Reply-To: <199509271600.CAA29766@godzilla.zeta.org.au>
References:  <199509271600.CAA29766@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509271616.KAA17447>