Saturday, November 7, 2009

Recover EXT3 Partitions and Data - Ubuntu Linux.

Note : Please use this option only as final option for recovering data from Corrupted ext3 partitions. In my case, I recovered all files and folders from a corrupted ext3 partition, in which Madriva 2007 was installed. I used my ASUS eeePC with Ubuntu 9.10 (Karmic Koala) version, for this. The Hard disk was connected to eeePC through USB cable.

Steps :

1. Connect the corrupted HardDisk to your Laptop using USB cable.
2. Boot your computer with UBUNTU (preferably).
3. Make sure that Harddisk is unmounted (usually you can not mount a corrupted partitioned Harddisk).
4. Open a "Terminal" type the following command and press ENTER.

/sbin/fsck.ext3 -b 57345 /dev/sdc7

Where /dev/sdc7 was the partition to be recovered. Use "Sudo" as prefix for the above command if you get messages such as " Permission denied".

5. The above command will recover partition and will prompt for "yes". (In my case, I gave "y" to all prompts). After the execution of this command, e2fsck starts automatically.

6. Finally you will find that all files and directories are recoverd in the partition. You may check by mounting the partition and browsing.

Note : When I was usig the command I recovered A-Z files and folders as it was. But due to my mistake, I run the command once again on the recoverd partition. Finally I left with only single folder named "lost+found". I browsed the folder to see my lost files and folders and it was stored in several sub-folders. One example is, My Desktop folder was found in ""#76511" folder. When I tried to copy the folder to other folder, I could not copy the files / folders and I was getting error message that the "file or folder" does not exist. Then I used "kget" command to copy the files and folders to other folders. (i.e. Right click on files and goto "Download with kget" option and then chose the Destination folder, wher the files and folders to be copied). Please note that "kget" can be used only for files and not for folders. Hence you need to create folders manually, wherever needed.

Reference : An article on Net + My effort.

No comments:

Post a Comment