[SOLVED] Can't delete HDD partition. Error: Can't have overlapping partitions.
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't delete HDD partition. Error: Can't have overlapping partitions.
Booting Windows XP PC with Linux Mint 18.3 bootstick to re-partition a ST380215A 80GB HDD and get a dual boot system.
I want to increase the Windows 21GB NTFS partition size to use most or all of this HDD as I have a second ST380215A 80GB on which to install Linux. Its just a blank partition and is ok.
There was an old Ubuntu system on the other partition(s) on the Windows 80GB HDD (installed after windows destroyed by malware) but somehow this part of the HDD ended up with multiple and overlapping partitions. The windows 21GB partition was ok so as advised I installed a fresh Windows XP SP3 on that 21G partition first then removed all the data from the Ubuntu partition booted with Linux Mint 18.3 USB to re-partition the remaining 60g of that drive.
One screen reported the whole 80GB drive was NTFS but I had comments that Linux could not be installed on NTFS partition but it appears it was and it worked! There are at least 4 partitions reported by Linux 'Discs' utility which used to show the overlapping partitions but now does not show it visually like that. The partitions reported (GUI) are..
so delete the partitions that are not part of your windows xp OS then merge that into it, using windows to do so. Because if you're going to have window take back that space its best you let windows do it. then you can set up your other hdd for Linux how ever you like.
Can't delete 'accidental' posts.. (sins of the soul) Ok..
My Windows XP does not have a partitioning tool and I can't find one in all my old Windows utilities.. thanks for the help however I think I will stay with the Linux tools and methods I just think they are more rigorous and reliable..
Last edited by Gyroman; 01-29-2018 at 05:11 PM.
Reason: trying to delete accidental post
looks like sda3 is located within sda2 (the end block is the same). but sda3 is a primary partition, cannot be inside an extended partition.
It looks like you modified the end of the extended partition and now your partition table is invalid. You need to restore the original value (somewhere 153772031) and check consistency again. Afterward we can try to resize it again
Finally, run "sfdisk --force /dev/sda </tmp/parts" to write the updated partitioning back to the drive. You should now have consistent partitioning that your GUI tools will accept.
Hi. Sometimes partition tool show primary partitions and logical partitions like diferent ones, but logical partitions always must be a part of one primary partition (for example:
/dev/sda: 40Gb
/dev/sda1: 10Gb
/dev/sda2: 16Gb
/dev/sda5: 9Gb
/dev/sda6: 7Gb
free space: 14Gb
(sda5 and sda6 are within sda2)
But if you have a drive with a MS NTFS plus other partitions, must be a better option to delete partitions (wich you dont use) and/or format them for data use only (is more easy to recover data from a partition without OS, because if you have a problem, you simple format and reinstall OS and data was safe out OS partition).
ran sfdisk -d /dev/sda/ >/tmp/parts and all looking good.. block numbers are spot on however there is no sda4 but I don't think that will matter.. But no vim or gedit..
What is the file editor on a Mint USB bootstick..?
ran sfdisk -d /dev/sda/ >/tmp/parts and all looking good.. block numbers are spot on however there is no sda4 but I don't think that will matter.. But no vim or gedit..
What is the file editor on a Mint USB bootstick..?
Whoa the output looks scary.. (even though I can loose the whole disk)..
try to reboot with Windows.. No go "Disc error".. rebooting with Mint bootstick.. that's ok but GUI Disks shows same picture as before..
Here's output of fdisk -l /dev/sda..
That final result is similar, but not the same as what you had before. Note that partition 2 now properly ends before the start of partition 3. You have to read those numbers pretty carefully to notice that.
Your sfdisk is somewhat noisier than my version, but nothing looks amiss. No, there is no partition 4. That partition 4 in the dump output (with all zeros) is just a placeholder for the nonexistent primary partition 4. There are 4 slots in the primary partition table, whether you are using all of them or not. The way Linux numbers partitions, logical partition numbers start with 5.
You will get that "Device or resource busy" error at the end if any partition on that drive is mounted or if you had another paritioning tool looking at that drive.
It looks like the problem with Windows not booting is because sfdisk gratuitously changed the disk identifier from 0xf460f460 to 0x74b97029. Windows gets very upset about that. You can try using fdisk to change that back. In the "expert" menu ("x" command to get there) it's the "i" command. I hope your version of fdisk is better than mine at that. Mine claims to make the change, but it never shows up on the disk. I have to resort to a hex editor to adjust that. The identifier is 4 bytes starting at offset 0x1B8 in the MBR. It's little-endian -- byte order reversed from what fdisk displays. Good luck with that.
It looks like the problem with Windows not booting is because sfdisk gratuitously changed the disk identifier from 0xf460f460 to 0x74b97029. Windows gets very upset about that. You can try using fdisk to change that back. In the "expert" menu ("x" command to get there) it's the "i" command. I hope your version of fdisk is better than mine at that. Mine claims to make the change, but it never shows up on the disk. I have to resort to a hex editor to adjust that. The identifier is 4 bytes starting at offset 0x1B8 in the MBR. It's little-endian -- byte order reversed from what fdisk displays. Good luck with that.
I am going to need some specific help here.. can't see 'x' on man fdisk I also know nothing about GPT or how to verify GPT or MBR etc..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.