Date: Wed, 27 Sep 1995 09:31:51 -0600 From: Nate Williams <nate@rocky.sri.MT.net> To: Bruce Evans <bde@zeta.org.au> Cc: nate@rocky.sri.MT.net, bde@FreeBSD.org, hackers@FreeBSD.org Subject: Re: Diskslice naming convention? Message-ID: <199509271531.JAA17253@rocky.sri.MT.net> In-Reply-To: <199509271509.BAA28013@godzilla.zeta.org.au> References: <199509271509.BAA28013@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans writes: > >Ok. How do the 'fdisk' slices (of which there can only be 4) relate to > >the 30 slices available in FreeBSD. Excuse me for using DOS terminology > > The `fdisk' slices (primary DOS partitions) are the first 4 of the 30. > > >for a minute, but if I understand correctly, we can use 'extended' > >partitions inside of 'primary' partitions. However, 30/4 isn't a real > >number, so where does the magic number 30 come from? > > Extended partitions aren't inside primary partitions. Each primary partition > may be an extended partition. Ahh, OK. We are using different terminology. I was using the terminology 'extended' partition to represent a DOS drive letter inside of an extended partition. > Each extended partition begins with a > secondary boot record with a partition table in it. The 4 entries in the > partition table may be `logical drives' or extended partitions. Each > extended partition begins with a secondary boot record... 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 | | | | | And the numbering scheme for the slices > 4 is determined by how they fall in the first 4 slices, correct? > I decided that 5 bits in the minor number were enough to reserve for the > slice number. 2^5 = 32 and 2 slice numbers are special. > > >> `dd if=/dev/rxd#' reads the entire disk. /dev/rxd# is a completely > >> different device from /dev/rxd#c. These devices are often confused > >> because disklabel automatically translates from `xd#' to /dev/rxd#c'. > > >Ahh, so these are equivalent > > ># dd if=/dev/sd0c of=/dev/null > ># dd if=/dev/sd0 of=/dev/null > > >(Read the entire slice) > > No, the devices are completely different, as was just explained. As I read the explanation, they are the same (other than the raw vs. block interaction). disklabel automatically translated /dev/sd0 -> /dev/rsd0c # 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. > >> You can't create a FreeBSD partition which accesses a DOS slice. Just > >> access the DOS slice directly. > > >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? Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509271531.JAA17253>