I had 3 partitions on my hard drive and I tried to merge sda5
with sda6
but for some reason gparted
crashed. Now when I try to mount sda5
, all I find in it is lost+found
.
I’m running Lubuntu 14.04.
-
i don't want to recover the data i wan't how to fix the partition s i cant mount it again– unfamousFeb 25, 2015 at 21:27
-
If you're not interested in recovering the data on your partitions, just delete them and then remount them! Warning this will delete all of your data!– FabbyFeb 25, 2015 at 22:05
1 Answer
The crash during a partition merge likely damaged the file system. That's why you should create backups beforehand.
The easiest “fix” is to re-format the partition, if you don't care about any data that may be recoverable.
If you're lucky, you can salvage most of the data with
fsck
, but you should create a raw copy of/dev/sda5
and work on the image, in casefsck
makes things worse.You can run
fsck /path/to/image
directly on the image file, but if you want to access the (hopefully) recovered files, you need to mount it with theloop
option:sudo mount -r -o loop /path/to/image /path/to/mountpoint
This mounts the image read-only, since you only want to look at and salvage its data and not modify it (accidentally).
Lastly, if
fsck
doesn't help, you can try more low-level data recovery (assuming the partition contained an ext4 file system). You can use the (unaltered) disk image again, that you may have created earlier, in case you re-purposed the disk space for something else in the mean time.
In any case you should re-format the partition in the end. Don't keep using an obviously broken file system, even if you can fix it enough to salvage your data.