Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 1995 02:00:20 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, nate@rocky.sri.MT.net
Cc:        bde@FreeBSD.org, hackers@FreeBSD.org
Subject:   Re: Diskslice naming convention?
Message-ID:  <199509271600.CAA29766@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>So, we have:

>Entire disk:
>+------------------+------------------+------------------+------------------+
>|                  |                  |                  |                  |
>|     Slice 1      |     Slice 2      |     Slice 3      |     Slice 4      |
>|                  |                  |                  |                  |

>And possibily (can be divided as many times as necessary)
>                  
>                   Single slice
>                   +-------+-------+---+
>                   |       |       |   |
>                   | S 5   |  S 6  | 7 |
>                   |       |       |   |

Yes, except the gaps where the secondary boot records are.

>And the numbering scheme for the slices > 4 is determined by how they
>fall in the first 4 slices, correct?

Recursively.

>As I read the explanation, they are the same (other than the raw vs. block interaction).  

>disklabel automatically translated /dev/sd0 -> /dev/rsd0c

Disklabel automatically translates sd0 -> /dev/rsd0c.  /dev/sd0 is a
completely different device.  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 :-(.

># 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.

>> >Ok.  How do I know which slice is the DOS slice?  (This get's back to
>> >the determination of the numbering scheme 1-30)
>> 
>> Look at sysinstall or libdisk/tst01 output for slices labeled as `fat".
>> The numbering corresponds to a particular linearization of the tree of
>> extended partitions so the relative order may vary with the OS.

>Is there anyway to determine this outside of sysinstall?

Many.  Try

	od -c /rsd0sY | head -1 | cut -c 24-44
	dd if=/dev/rsd0sY | file -	# sort of; could be improved

Bruce



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