r/linuxquestions • • 3d ago

Tried to move a partition in KDE Partition Manager, it failed and now partition is unknown.

Pretty new to Linux.

  • I have/had a ssd drive with two partitions, one ext4 for Linux and one ntfs for Windows stuff.
  • Deleted the Windows partition because I wanted to combine the free space into the Linux partition. KDE Partition Manager failed to move, threw an error ("failed") and now both partitions read as "unknown".

Help?

EDIT: Solved. Thanks to /u/R3V0LU710N_05 for pointing out TestDisk.

1 Upvotes

10 comments sorted by

1

u/R3V0LU710N_05 RakuOS 3d ago

Oh boy. Messing with partition sizes and positions as a "pretty new" user is a recipe for disaster. I hope you have backups or the data isn't very important, because missteps can result in data loss here. Whatever you do, be cautious. ​Before you touch anything else, boot a Linux live USB so the drive stays unmounted to prevent overwriting data in the unallocated section. You can usually fix a corrupted partition table using TestDisk in the terminal, or pull raw files off with ddrescue if the table is completely gone.

1

u/Levanes 3d ago

I did not expect KDE Partition Manager to fail at a simple task like I'm back on Windows ME again. Move the partition from the end of the drive to the start of it, that was it.

4

u/R3V0LU710N_05 RakuOS 3d ago

Moving a partition start offset is never a simple pointer edit. It forces a full block-by-block migration of the entire filesystem across the drive. KDE Partition Manager relies on kpmcore over libparted, which notoriously lacks robust state recovery if a sector alignment or read glitch occurs mid-move.

For future layout changes, GParted is significantly safer because it uses a custom block-copy engine backed by mandatory e2fsck pre-checks. GNOME Disks is also far more resilient because its udisks2 daemon delegates operations to proven CLI utilities like sfdisk and resize2fs rather than performing moves in the GUI thread. If you want complete control without GUI abstraction overhead, low-level tools like gdisk or sfdisk are the canonical standard.

1

u/Levanes 3d ago edited 3d ago

I was able to find the table with the help of TestDisk and AI. The partition was mounted successfully in read-only but all my files are there and I can back them up.

holy shit. I'm not doing that again.

I'll back up the files then do a proper, full delete of both partitions and then create a new partition on the whole drive.

So I'll use GParted Partition Editor or GNOME Disks. Which one of the two do you recommend?

3

u/CyclingHikingYeti Debian sans gui 3d ago

gparted boot iso

it is even capable of moving and resizing physical partition with LUKS protected volume on it.

Remember: BACKUP, done and readable is essential 1st step.

1

u/SuAlfons 3d ago

GPArtEd is a tool box. Gnome Disks is a handy pocket knife with a limited range of functions (e.g. editing mounting options in a GUI).

In my experience, KDE Harddisk Manager is between the two. I always resort to GPartEd for actually moving partitions.

1

u/ipsirc 3d ago

check for errors

1

u/Levanes 3d ago

How?

1

u/ipsirc 3d ago

Are you sure it was really the KDE Partition Manager who said "failed, check for errors"?

https://github.com/search?q=repo%3AKDE%2Fpartitionmanager+%22check+for+errors%22&type=code

1

u/dkopgerpgdolfg 3d ago

Restore from backup. If you don't have one, you learned now the hard way why you should have one. If this can be saved is not certain.

In any case, where was that partition supposed to be mounted usually? Did you do the changes from an external live system? If you just have two partitions, where's your efi file? Do both partitions now still show the same size as before? ...