Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I was resizing my partitions using GParted, my laptop battery ran out, and the process was interrupted.

Now, I am unable to mount the partition which I was trying to resize. I get the following error when I click to mount the partition on nautilus:

Error mounting:
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

How can I go about recovering my data? Is there a safe way to attempt to force-mount the partition in question? Any help towards recovering my data is sincerely appreciated.

share|improve this question
Please do share your syslog – Farid Nov 18 '12 at 13:56
This won't help you now, but it is not a good idea to partition discs while on battery power. Also for the future make a backup of all important data before trying anything risky (installing or upgrading an operating system, resizing or moving partitions, ...). – To Do Nov 18 '12 at 14:10
possible duplicate of How to recover a deleted NTFS partition with data – Ringtail Nov 18 '12 at 16:30
Thanks. That is not quite a duplicate, since my partition was ext4, not NTFS, and I did not delete the partition, but was in the process of moving it when my laptop shut off. What do you mean syslog? This happened a while ago, while I was using GParted from a CD. I have been using Ubuntu on the same drive, but on a smaller partition. The rest of the drive has remained intact. – user84207 Nov 20 '12 at 23:52
@ToDo The charger plug accidentally slipped off the laptop, and rather than giving me dire warnings, Ubuntu only remained silent. – user84207 Apr 19 '13 at 8:41
up vote 2 down vote accepted

Some months ago, @psusi said: "Your data is pretty much toast. At this point you need to restore from backup..."

I immediately called out such nonsense. My computer has only 4GB of RAM, whereas the partition being moved was around 350GB. If we assume that the "move partition" operation of GParted is algorithmically correct, 4GB is a limit on the amount of data that could possibly have been lost. (Otherwise, the "move partition" operation could not complete without loss of data). This is straightforward.

So, indeed, I was able to recover my directory tree, albeit a bit shuffled (since the move operation had been interrupted, a strange directory configuration resulted, where about half of my home directory was inside one folder).

The answer was testdisk, which was able to detect the filesystem in question. After this was detected, I copied the files onto an external HD. This experience has brought me closer to enlightenment with

share|improve this answer
Hi @user84207. I recently fell into some serious predicament. I lost all my hard disk data! I've been looking around on ways to recover some if not all of it, but to no much success. Testdisk hasn't done me much good. I was wondering how you went about it yourself. I would really greatly appreciate any help. I have posted this issue [HERE: Recover partition after GParted resizing interrupted by unexpected shutdown ](…) – Program-Me-Rev Feb 8 at 19:47
How did you lose the data? During a repartitioning? Did you try Testdisk? What did you expect and what failed? – user84207 Feb 17 at 5:27

Your data is pretty much toast. At this point you need to restore from backup. If you don't have backups, let this be a lesson to you to start making them. If there are still files you want to attempt to recover, pray, and try the photorec utility from the testdisk package.

share|improve this answer
"You data is pretty much toast..." No, it isn't. If the resizing algorithm is correct, the most amount of data I can theoretically have lost is the amount of RAM memory available in my system (otherwise, the resizing algorithm would not be able to move my partition without data loss). Please refrain from answering questions if you do not know what you are talking about – user84207 Nov 19 '12 at 16:37
@user84207, I just noticed you said resize, but I was thinking you said move before. In that case of move, then there is no way to recover the filesystem since there is no way to tell how much got moved before the crash. If this is an ext4 filesystem and you were only resizing it, and not moving, then I believe e2fsck can recover it. – psusi Nov 19 '12 at 18:37
Yeah, I was moving it. I think what I said still applies though. I mean, the data physically is still there, I only need a way to access it in the correct way. Perhaps I might need to study the ext4 specification and the GParted move algorithm. What I mean that it should definitely be possible to recover my data. – user84207 Nov 20 '12 at 23:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.