Here is a recipe to reproduce the error. I developed this procedure in debian installer, run inside vmware with a new 2GB hard disk image (not yet partitioned). The procedure starts when the installer has been run up to hardware detection and the main menu is shown with partman selected.
Due to some weirdness in fdisk, I had to create the deviating partition in two steps alongside a second, smaller partition (if not, I ended up with different from normal CHS numbers). - Switch to VT2 - fdisk /dev/sda - n, 1, p : create new primary partition - 1 : set first cylinder to 1 - 200 : set last cylinder to 200 - n, 2, p : create new primary partition - default : set first cylinder to 201 - default : set maximum size of partition (261) - d, 1 : delete first partition - u : change display/entry units to sectors - n, 1, p : recreate new partition - 2048 : set first sector to 2048 (just like Vista does) - default : set maximum size of partition - w : write partition table to disk This leaves me with the following partitioning: Disk /dev/sda: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 200 1605476 83 Linux /dev/sda2 201 261 489982+ 83 Linux or in sectors: Disk /dev/sda: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 2048 3212999 1605476 83 Linux /dev/sda2 3213000 4192964 489982+ 83 Linux Next, run the attached test script. It will resize the first partition found on the first disk device to 1 GB. Afterwards, the partition has changed as follows: Disk /dev/sda: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 122 979933+ 83 Linux /dev/sda2 201 261 489982+ 83 Linux or in sectors Disk /dev/sda: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/sda1 63 1959929 979933+ 83 Linux /dev/sda2 3213000 4192964 489982+ 83 Linux The script is just some snippets from partman put together, so it matches what actually happens in partman pretty well (in a somewhat simplified way of course).
ResizeTest
Description: application/shellscript
pgpbrwzskE9SG.pgp
Description: PGP signature