1

Topic: Data Recovery from crashed ext3 partition

GParted 0.3.5

Libparted 1.7.1

Check and repair filesystem (ext3) on /dev/sdb1  01:54    ( ERROR )
        
calibrate /dev/sdb1  01:22    ( SUCCES )
        
path: /dev/sdb1
start: 63
end: 75200264
size: 75200202 (35.86 GB)
check filesystem on /dev/sdb1 for errors and (if possible) fix them  00:32    ( ERROR )
        
e2fsck -f -y -v /dev/sdb1
        
Could this be a zero-length partition?
e2fsck 1.40.8 (13-Mar-2008)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb1

========================================

Hi all,
I've got a HDD that used to run Ubuntu 9.04.  One fine day, it simply refused to boot, and there are files on there that I'd like to recover.  I'm only talking about a few MB's here, but these are rather important MB's. wink
GParted had no trouble detecting the drive, however simply running 'Check and Repair' on it produced the above error.  I've also tried booting it with the help of an Ubuntu Installation CD, but all I get is an 'Error 25'.  What are my options?
-Kp

2

Re: Data Recovery from crashed ext3 partition

It is better to use the latest stable GParted livecd. Version 0.3.5 is quite old.
There was a lot of work done since then. Latest stable is 0.4.6-1.

From the livecd, you can use the
fdisk -lu
command in the terminal to see and report here the exact partition table configuration.

Furthermore, the GParted livecd contains 'testdisk', that is a tool able (in many cases) to recover lost partitions. This software comes in its own livecd too (you can easily find the web page), together with another recovery tool named 'photorec'. This tool is able to scan the disk space directly to detect and possibly recover specific file types.

(moved to the Live Media section)

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: Data Recovery from crashed ext3 partition

I've burned the Live CD and I've currently got the HDD in question hooked up as a slave to my primary drive, which is running Ubuntu Hardy.  Simply booting the system with just the one, damaged HDD and the CD presented me with a flurry of text about screen resolution and keymaps... then it opened into a graphical interface with a GParted window that said, 'No devices found'.  I spotted a Terminal icon, so I tried typing 'fdisk -lu', but it didn't seem to do anything.  What am I meant to do?

4

Re: Data Recovery from crashed ext3 partition

This means obviously that there is no information about the partitions in the partition table. Probably the partition table was somehow damaged.

You could try to use testdisk, to see if it can detect any partition.
You can run testdisk from the command line in the termonal from the GParted livecd, by entering
sudo testdisk
or sudo Testdisk
(I don't remember about lowercase or uppercase T).

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: Data Recovery from crashed ext3 partition

So how come GParted 0.3.5 had no trouble detecting the partitions?  Oh, and Testdisk asked me what kind of partition type the disk uses, and I'm not sure which to select.  It's an ext3 partition, but the options provided are Intel, EFI, Mac, None, Sun, and XBox.  Which is it?

6

Re: Data Recovery from crashed ext3 partition

So how come GParted 0.3.5 had no trouble detecting the partitions?

Do you mean that 0.3.5-x still detects the partitions but 0.4.6-1 doesn't ?

I think it asks for the "disklabel" or the type of partition table that the drive uses. Linux on x86 uses intel type (called msdos-type too).

However, I see that the disk is /dev/sdb. this means that there is at least one other disk connected to the system. Be sure to select the right disk!

*** It is highly recommended to backup any important files before doing resize/move operations. ***

7

Re: Data Recovery from crashed ext3 partition

Do you mean that 0.3.5-x still detects the partitions but 0.4.6-1 doesn't?

That's precisely what I mean.  0.4.6 simply says, 'no devices found'.  And thanks for the clarification on the partition type.

You are correct by the way, I do have another disk... as I said, I have the busted drive hooked up as a slave to my primary HDD.  I'll be careful. smile

So in Testdisk, when I get to the prompt that says Load Backup, is that my solution?  What exactly does 'Load Backup' do?

8

Re: Data Recovery from crashed ext3 partition

Is there no Live Media that can simply boot the drive from one of its backup filesystem superblocks?  Wouldn't that just be the simplest solution?

9

Re: Data Recovery from crashed ext3 partition

So after some research, I gather that Testdisk's 'Write' function is meant to do just what I need, which is repair the damaged filesystem superblock on the HDD.  Then, if it was successful, I should be able to reboot the computer with the repaired drive.  Am I correct?
Unfortunately, I tried this and it didn't work.  Nor did 'Load Backup', which I took as meaning 'Load one of the backup filesystem superblocks'.  I tried this on all three partitions, but to no avail.  I still get 'Error 25'.

Disk /dev/sdb - 40 GB / 37 GiB - CHS 4865 255 63
Current Partition Structure:

1 * Linux                        0   1   1   4680 254 63   75200202
2 E extended LBA              4681   0   1   4864 254 63    2955960
5 L Linux Swap                4681   1   1   4864 254 63    2955897

Any advice would be appreciated!

10

Re: Data Recovery from crashed ext3 partition

In case it helps, this is what I see when I select 'Proceed'.  There are only two partitions visible at this stage, so I guess I tried 'Load Backup' on just these two, not three as in my previous post.

Disk /dev/sdb - 40 GB / 37 GiB - CHS 4865 255 63
     Partition               Start        End    Size in sectors
* Linux                    0   1  1  4680 254 63   75200202
L Linux Swap            4681   1  1  4864 254 63    2955897











Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
EXT3 Large file Sparse superblock Recover, 38 GB / 35 GiB