On 03/17/2010 10:45 PM, Linas wrote:
Which complained about a dos compatibility flag and that I should change the display/entry units to sectors. This showed me a small bit of unused space above my last logical partition (/dev/sda12)...
Don't worry about that for now, that could only come back to bite you if you had a new disk with 4KB sectors (or an SSD that I think prefers writes to be aligned with pages ... or something like that).
=> FATAL ERROR: Bad primary partition 3: Partition ends after end-of-disk => Press any key to exit cfdisk
cfdisk can complain if _anything_ isn't as it wants it to be. cfdisk is easier to use than fdisk but complains a lot if the partition table deviates a little from the most compatible "format" possible.
Because that's my extended partition... And a close look at the ending cylinder/sector of /dev/sda4 is a slightly higher number than it reports the total cylinders/sectors to be...
I take it that the first listing is in sectors, if you look closely you will see that your last partition (swap) end before the end of the disk so you're safe, the extended partition is just a placeholder for other partitions, so if the partitions do not try to use space that doesn't exist it should be ok. However I would still try to rectify the ending of the extended partition. Backup all your data and try to shrink that extended partition until it fits in your disk.
I find an oddity on your paritition table, though. You say that /dev/sda4 is an extended partition (and you do have logical partitions) but it is listed by fdisk as having type 0xf (W95 Ext'd (LBA)) instead of 0x5 (Extended). I suspect that after testdisk restoring, some old entries got loaded? If that's really a wrong entry, you can do the fdisk delete/recreate tip to force its length to be inside the disk limits. However, fdisk won't allow you to set a partition type of 5, which is a pity when you *really* know what you are doing.
Type 0xf is also ok, it all depends on which program created the partition table initially, I'm not sure but I think gparted used to set extended partitions to 0xf and so do many other programs. fdisk should be able to change the type to 5 but if it can't then give sfdisk a try but make sure all your data is safe.