[ltp] Copying Files

Matt Graham linux-thinkpad@linux-thinkpad.org
Tue, 7 Dec 2004 12:39:53 -0500


On Tuesday 07 December 2004 12:10, after a long battle with technology, 
Bob Alexander wrote:
[ x86 partition structure ]
> Sorry but IIRC the picture is slghtly different:
> AFAIK an HD can contain max 4 partitions. The PRIMARY partitions are
> numbered /hdX1 to hdX4. The EXTENDED partition gets the /dev/hdX5
> identifier and the LOGICAL partitions into it get the /dev/hdX6 and
> onwards.

Nope.  There are only 4 partitions available on the x86 from the BIOS's 
viewpoint.  Several partition types (0x05 , 0x0f, 0x85) are generally 
recognized as "extended" and can contain logical partitions that may 
not be recognized by the BIOS.  If you want to have more than 4 
partitions on your system, you must have one primary partition of type 
0x05, 0x0f, or 0x85, and then use cfdisk to create logical partitions 
within that extended partition.  Confusing?  Sure.  Just remember that 
it's a workaround for brain-damage dating back to the mid-1980s, and 
you'll be OK.

> /dev/hda1   *       1        4063    30716248+   7  HPFS/NTFS
> /dev/hda3        4064        9914    44233560    f  W95 Ext'd
> /dev/hda5        4064        8822    35978008+   b  W95 FAT32
> /dev/hda6        8823        8958     1028128+  82  Linux swap
> /dev/hda7   *    8959        9433     3590968+  83  Linux
> /dev/hda8        9434        9914     3636328+  83  Linux

> A Windows XP primary partition (C:) as /dev/hda1
> A FAT32 "DATA" partition which I share amongst the two OSs /dev/hda3
> The EXTENDED "container" partition /dev/hda6
> The Linux swap on /dev/hda6

Look again; those 2 statements are contradictory.  /dev/hda3 is the only 
partition marked as extended.  /dev/hda6 is of type 0x82, "Linux Swap".

> PS Quiz: Why is it that my "Data" partition is on /dev/hda3 ?

It's not; it's on /dev/hda5 as is immediately obvious to anyone who 
looks at the fdisk -l listing.  If you try to mount /dev/hda3 
using /bin/mount , it'll say "(aren't you trying to mount an extended 
partition, instead of some logical partition inside?)".  Right--that 
could also be much clearer; something like "/dev/foo is an extended 
partition and probably cannot be mounted.  You want to mount one of the 
logical partitions inside /dev/foo."

-- 
   "Dreams?  Best leave dreams to those that can afford them."
   --Aunt Cordelia, _Wizard and Glass_, Stephen King
There is no Darkness in Eternity/But only Light too dim for us to see