Alignment of partitions: I've heard that cfdisk makes a good effort to align the partitions well. I searched for what this means. This one criteria for aligning things: http://www.linux.com/howtos/Large-Disk-HOWTO-6.shtml . In short, if the partition has a partition table in it [1], then it starts at a cylinder bounary + 1 track (63 sectors?). Otherwise, it starts at the cylinder boundary. For linux, none of this matters, but if I'm making partition tables, I want to do it as elegantly as possible (and to be able to understand why it is done the way it is.)

[1] The first primary partition on a disk has a partition table at it's start. The other primaries don't. Each extended partition does.

Partition Table backups

sudo fdisk -lu /dev/hdc lists it with sectors, sudo fdisk -l /dev/hdc lists it with cylinders. I think I'll use sectors, just to be sure I don't miss anything. (sfdisk -d writes it out for later re-input, but I think that the fdisk output is more useful for this page.)

boltzmann

Disk /dev/hdc: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders, total 117210240 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1              63      192779       96358+  83  Linux
/dev/hdc2          192780    49030379    24418800    5  Extended
/dev/hdc3   *    49030380    89996129    20482875    7  HPFS/NTFS
/dev/hdc5          192843     9960299     4883728+  83  Linux
/dev/hdc6         9960363    49030379    19535008+  83  Linux

lefschetz

Note: lefschetz uses evms to manage RAID, you shouldn't go messing with it's partition table directly.

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *          63      192779       96358+  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/hda2          195552   156301487    78052968    f  W95 Ext'd (LBA)
/dev/hda5          195615     9961055     4882720+  83  Linux
/dev/hda6         9961119    11914559      976720+  82  Linux swap / Solaris
/dev/hda7        11914623    21680063     4882720+  83  Linux
/dev/hda8        21680127    84594383    31457128+  83  Linux
/dev/hda9        84594447   156301487    35853520+  83  Linux

zarankiewicz

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63       80324       40131   de  Dell Utility
/dev/sda2           80325   488279609   244099642+   5  Extended
/dev/sda5        39150468    43054199     1951866   82  Linux swap / Solaris
/dev/sda6        43054263   488279609   222612673+  83  Linux
/dev/sda7           80451      465884      192717   83  Linux
/dev/sda8          465948    19808144     9671098+  83  Linux
/dev/sda9        19808208    39150404     9671098+  83  Linux

Partition table entries are not in disk order

Recovery

The program dd_rescue (package ddrescue) is like dd, but has extra features that make it good for recovering from bad partitions. It can recover after reaching bad sectors (instead of stopping the transfer) and has other features to make recovery easier.

DebianNotes/Partitions (last edited 2008-03-10 01:38:18 by localhost)