Comment 6 for bug 559110

Revision history for this message
nitrogen (i-am-nitrogen) wrote :

Possible cause (this affects me too, with the release version of 10.04 LTS):

The Windows 7 installer sometimes creates two partitions, a 100MB boot partition and the rest as the main OS partition (a.k.a. the C drive). The problem seems to stem from the fact that the first partition is *exactly* 100MB, and thus doesn't end on a cylinder boundary. This makes the second partition start on a non-cylinder-boundary sector. Running parted gives the following error:

   # parted
   (parted) print
   Error: Unable to satisfy all constraints on the partition.
   (parted)

Here's some sample output from fdisk -u -l:

   # fdisk -u -l /dev/sda

   Disk /dev/sda: 500.1 GB, 500107862016 bytes
   255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 512 bytes
   I/O size (minimum/optimal): 512 bytes / 512 bytes
   Disk identifier: 0x76692ca8

      Device Boot Start End Blocks Id System
   /dev/sda1 2048 206847 102400 7 HPFS/NTFS
   Partition 1 does not end on cylinder boundary.
   /dev/sda2 206848 174563327 87178240 7 HPFS/NTFS
   /dev/sda3 * 174578355 254421404 39921525 7 HPFS/NTFS
   /dev/sda4 254421405 976768064 361173330 f W95 Ext'd (LBA)
   /dev/sda5 254421468 258341264 1959898+ 82 Linux swap / Solaris
   /dev/sda6 258341328 315870029 28764351 83 Linux
   /dev/sda7 315870030 976768064 330449017+ 7 HPFS/NTFS

The correct behavior would be for partman/parted to warn about the odd partition layout and continue normally, rather than try to apply constraints on newly-created partitions to the data already on the disk. As I recall, this was the behavior in 9.04, as I used gparted on a 9.04 live CD to add new partitions to the drive in the first place.