GNOME Bugzilla – Bug 337244
Entire disk shown as unallocated - parted says overlapping partitions
Last modified: 2009-12-03 23:19:08 UTC
Please describe the problem: Hardware: Dell Inspiron 5160 with 60 GB hard drive on hdc. Initial repartitioning was done with Acronis Disk Director 9; the original Dell diagnostic and backup paritions were left intact. fdisk output is as follows: Disk /dev/hdc: 60.0 GB, 60011642880 bytes 255 heads, 63 sectors/track, 7296 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdc1 1 5 40131 de Dell Utility /dev/hdc2 * 7 1573 12586924 7 HPFS/NTFS /dev/hdc3 6839 7295 3670852+ db CP/M / CTOS / ... /dev/hdc4 1574 6838 42291112+ f W95 Ext'd (LBA) /dev/hdc5 1574 3532 15735636 b W95 FAT32 /dev/hdc6 3533 3663 1052226 82 Linux swap /dev/hdc7 3664 5230 12586896 83 Linux /dev/hdc8 5231 6838 12916228+ 83 Linux Partition table entries are not in disk order The livecd eventually boots OK but does hang a little while on the synaptics touchpad line. Gparted detects hdc but reports the entier drive as unallocated, i.e. no partitions are detected. From within the livecd, fdisk -l output is identical to the above. Steps to reproduce: 1. Happens every time. 2. 3. Actual results: No partitions are detected on hdc and the entire drive is reported as unallocated. Expected results: I would expect the partitions to be detected on hdc. Does this happen every time? Yes. Other information: I assume the anomolous behavior is due to the fact that the partition table entries are not in disk order as reported on the last line of the fdisk output.
what is the output (on the livecd) of: fdisk -lu /dev/hdc and parted /dev/hdc <press p>
I upgraded the original hard drive from 60GB to 100GB but the problem persists. Not surprising since I essentially cloned the 60GB drive before installing the 100GB drive. fdisk -lu output is as follows: Disk /dev/hdc: 100.0 GB, 100030242816 bytes 255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/hdc1 63 80324 40131 de Dell Utility /dev/hdc2 * 96390 25270244 12586927+ 7 HPFS/NTFS /dev/hdc3 109852470 117194174 3670852+ db CP/M / CTOS / ... /dev/hdc4 25270245 195366464 85048110 f W95 Ext'd (LBA) /dev/hdc5 25270308 56741579 15735636 b W95 FAT32 /dev/hdc6 56741643 58846094 1052226 82 Linux swap / Solaris /dev/hdc7 58846158 84019949 12586896 83 Linux /dev/hdc8 84020013 109852469 12916228+ 83 Linux /dev/hdc9 117194238 132455924 7630843+ 83 Linux /dev/hdc10 132455988 195366464 31455238+ b W95 FAT32 Partition table entries are not in disk order parted gave the following error message: Error: Can't have overlapping partitions.
it seems /dev/hdc3 is overlapping with the extended partition (/dev/hdc4). What kind of data is on there and how was it created? Getting rid of it (removing it using fdisk) would most likely fix this issue. Its kinda late over here and i'm tired, so double-check everything before you go ahead and remove /dev/hdc3 :-)
Did removing /dev/hdc3 work?
I haven't had time to do the necessary backup before deleting hdc3 and really don't know that I want to go down that road as there is a lot of other data on the drive now. To answer some of your prior questions. The original partition layout from dell consisted of three primary partitions, hdc1, hdc2 and hdc3. hdc1 appears to contain some dell diagnostics, hdc2, contained the winxp install and hdc3 seems to contain some dell restore files. Neither hdc1 nor hdc3 are visible from windows. When doing the initial linux install, hdc2 was shrunk with Acronis Disk Director 9 and extended FAT32, swap and linux reiserfs partitions were created on the resulting unallocated space from the hdc2 shrink using the same tool. Acronis has no problems dealing with the present partitions and reports no errors or abnormalities. The same can be said of mandriva's partitioning tool as used from a pclos bootable livecd. I assume it's a parted issue although cfdisk doesn't seem to like the extended partitions either.
plors: what should I do with this one?
well, the fact is the extended partition (/dev/hdc4) and the 'dell restore files' (/dev/hdc3) are overlapping each other. There reason this hasn't resulted in errors is the fact /dev/hdc3 fits neatly between 2 logical partitions ( /dev/hdc8 en /dev/hdc9 ). However, this situation is just plain wrong, partitions shouldn't overlap, because it's dangerous. If you one day decide to resize /dev/hdc8 and/or /dev/hdc9 you will be overwriting /dev/hdc3 or visa versa. My advice: - remove /dev/hdc3 using fdisk (if those restore files are important to you, back them up) - then start gparted and you will see a large chunk of unallocated space between /dev/hdc8 and /dev/hdc9, you can do anything you want with this unallocated space. E.g. you could create a new partition in it and store the restore files you backed up in it. The question remains wether libparted should read such 'broken' partitiontables anyway or stick with the current behaviour. I'm not sure what's best and will discuss this with the libparted devs. Hope this helps :) -
btw, this is really a gparted issue and has nothing to do with the livecd :)
I have the same problem. Gparted detects the entire drive as unallocated. max@lillemor:~$ fdisk -l /dev/hda Disk /dev/hda: 164.6 GB, 164696555520 bytes 255 heads, 63 sectors/track, 20023 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 16331 131178726 7 HPFS/NTFS /dev/hda2 16709 16714 48195 83 Linux /dev/hda3 16332 19884 28539472+ f W95 Ext'd (LBA) /dev/hda4 19885 20023 1116486 82 Linux swap / Solaris /dev/hda5 16332 16708 3028221 b W95 FAT32 /dev/hda6 16715 19884 25462962 83 Linux Partition table entries are not in disk order max@lillemor:~$ fdisk -lu /dev/hda Disk /dev/hda: 164.6 GB, 164696555520 bytes 255 heads, 63 sectors/track, 20023 cylinders, total 321672960 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 63 262357514 131178726 7 HPFS/NTFS /dev/hda2 268414020 268510409 48195 83 Linux /dev/hda3 262357515 319436459 28539472+ f W95 Ext'd (LBA) /dev/hda4 319436523 321669494 1116486 82 Linux swap / Solaris /dev/hda5 262357578 268414019 3028221 b W95 FAT32 /dev/hda6 268510536 319436459 25462962 83 Linux Parted reports that it can't have overlapping partitions. This disk I used acronis tools on to shrink the NTFS partition and make the FAT32 partition but the problem was there before that. /dev/hda2 is my ext2 boot partition. /dev/hda6 is my main ubuntu partition and /dev/hda1 is so full of stuff that I can't back it up. So how do I fix this problem?
Hello Patrick and Mårten, Are either of you still experiencing this problem with the latest versions of parted (either 1.8.8 or the unofficial 1.8.9)?
I've solved my problems by reformating the whole drive, so I can not check.
Thank you Mårten for the quick response. I am glad that you were able to find a solution. Patrick, from comment #3 it appears that the primary partition hdc3 is indeed nested within the extended partition hdc4 between logical partitions hdc8 and hdc9. This is not normal. Normally a disk with an MS-DOS Master Boot Record contains a partition table that can hold up to 4 primary partitions. Optionally, one of these primary partitions can be designated an extended partition. This single extended partition can contain multiple logical partitions. Each logical partition is "linked" to the next one using the an Extended Boot Record (EBR). It is abnormal, and definitely not suggested, to nest a primary partition within an extended partition. References: http://en.wikipedia.org/wiki/Disk_partitioning http://en.wikipedia.org/wiki/Master_boot_record http://en.wikipedia.org/wiki/Extended_Boot_Record
I think this bug is connected to: https://bugs.launchpad.net/ubuntu/+source/parted/+bug/96976
Created attachment 149052 [details] GParted displaying message Can't have overlapping partitions. In the both cases listed in this bug report, the problem is that the partition table has overlapping partitions. The parted project does not permit editing invalid partition tables. Parted reports this problem back to the user when they try to print the partition table layout. GParted will now capture this message from libparted and associate it with the "unallocated" partition that is shown to span the whole disk. The relevant git commit is: http://git.gnome.org/cgit/gparted/commit/?id=0fba953cd918a6e5c9ac100027f53446023de573 Please note that since GParted uses libparted (parted) to manipulate partition tables on devices, if parted cannot edit the partition table then GParted cannot edit the partition table. In this situation GParted should have at least provided a warning to the user similar to the way parted displayed a warning. Now this warning is conveyed to the user by GParted (See attached picture for an example).
The fix to this problem has been committed to the GNOME git repository for inclusion in the next release of GParted (0.5.1). Closing this bug.