Comment 9 for bug 324987

Revision history for this message
TJ (tj) wrote : Re: Kernel *loses* partitions at partitioning stage; installer fails

Tested with Jaunty alpha-4 live-CD (amd64) in a kvm-83 virtual machine with one 5368MB qcow2 disk image with empty partitions pre-defined using fdisk -u /dev/nbd0.

I decided to check the partition table created by fdisk using cfdisk. It reported problems. Unfortunately the exact message scrolled out of the terminal buffer before I could copy it, but it was something like:

 "Bad primary partition 3: Partition ends in the final partial cylinder"

Thinking back to when the physical 400GB hard disk partition table was created I realised that an fdisk induced problem must have occurred. Initially the original partition table from the 200GB disk was written to the 400GB drive using dd.
Then I used fdisk *in sector mode* (fdisk -u /dev/sda) to remove partitions 3+ and recreate them with sizes more appropriate to the larger disk.

To test my theory, on the VM guest qcow2 disk image I wiped the partition table (which was also created using fdisk -u /dev/nbd0) and recreated it with fdisk in *cylinder* mode (fdisk /dev/nbd0).

This time the manual partitioner was successful and the installation succeeded in the VM guest.

I've looked at the partman log from the failed sessions and I don't see any problems with the reported partition start/end points (they are specified in absolute byte offsets from the start of the disk). There don't appear to be any overlaps and certainly nothing that could be described as "Partition ends in the final partial cylinder".

It makes me wonder if the same libraries used by partman to write the partition table are also used by cfdisk.

It would make sense to at least capture the error in ubiquity and report it to the user.