[ltp] Copying Files

Jeffrey L. Taylor linux-thinkpad@linux-thinkpad.org
Tue, 7 Dec 2004 11:19:14 -0600


Quoting Bob Alexander <bob@ngi.it>:
> Jeffrey L. Taylor wrote:
[snip]
> >This last line seems odd to me.  Usually the extended partition is
> >hda4.  This may be why Linux gags on it.  IF you have a copy of the
> >disk to play with, see if you can change it to hda4.
> >
> >HTH,
> > Jeffrey
> >
> > 
> >
> 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.
> 
> For example my setup is as follows:
> 
> 240 heads, 63 sectors/track, 9914 cylinders
> Units = cylinders of 15120 * 512 = 7741440 bytes
> 
>   Device Boot      Start         End      Blocks   Id  System
> /dev/hda1   *           1        4063    30716248+   7  HPFS/NTFS
> /dev/hda3            4064        9914    44233560    f  W95 Ext'd (LBA)
> /dev/hda5            4064        8822    35978008+   b  W95 FAT32
> /dev/hda6            8823        8958     1028128+  82  Linux swap / Solaris
> /dev/hda7   *        8959        9433     3590968+  83  Linux
> /dev/hda8            9434        9914     3636328+  83  Linux
> 
> and reflects:
> 
> 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
> My active Linux partition /dev/hda7
> A "mirror" Linux for other uses on /dev/hda8
> The Linux swap on /dev/hda6
> 
> HTH,
> Bob
> 
> PS Quiz: Why is it that my "Data" partition is on /dev/hda3 ? :) (I know 
> the answer ... 10 point for the first discovering it 8->).
> 

IIRC, the logical partitions are contained in the extended partition.
E.g., hda5 - hda11 are contained in hda4.  hda1 is a primary partition.

# fdisk -l /dev/hda

Disk /dev/hda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1      1310  10522543+   7  HPFS/NTFS
/dev/hda4   *      1311     10011  69890782+   5  Extended
/dev/hda5          1311      1964   5253223+  83  Linux
/dev/hda6   *      1965      3760  14426338+  83  Linux
/dev/hda7          3761      3890   1044193+  82  Linux swap
/dev/hda8          3891      5686  14426338+  83  Linux
/dev/hda9          5687      7476  14378143+  83  Linux
/dev/hda10         7477      9434  15727603+  83  Linux
/dev/hda11         9435     10010   4626688+  83  Linux