Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Suppose you have a 160G SATA HDD with a 150G /dev/sda1 partiton using ext3 filesystem. There is data in the partition of say 100G. Again suppose, you ran a 'mkfs.ext2 /dev/sda1' w/o thinking twice. Is there a possibility you can recover the ext3 filesystem and then the data? Right now the /dev/sda1 shows empty with just one directory 'lost+found'. I have made a image of this disk in another bigger disk using dd - 'dd if=/dev/sda1 of=/dev/sdb1', This essentially makes a image of the sda1 in sdb1 so that I can fiddle with sdb1 and don't have to worry about harming the original data. Any suggestions as to how I can revive the old ext3 filesystem? Please donot say I needed to have a backup and now I am doomed. Because I have a backup. Still, I need to recover that filesystem. I have gone through almost all of the similar threads in LQ and searched google. Found gpart, testdisk, Linux_Recovery etc. But I haven't used any of them before. What do LQ people suggest I do? Please lets talk ways to get the data back specifically and not what I could have done and why.
Lets talk about what can I do now.
Distribution: Ubuntu 10.10 / Windows 7 Pro 64-Bit / Snow Leopard 10.6.4 64-Bit
Posts: 152
Rep:
Testdisk and photorec work nicely,and as long as you didnt do a full format or dev/zero wipe it should be recoverable.another way is to buy the cd edition of acronis DD and boot from it. use it's recovery mode to recover deleted and/or quick-formated fs's. good luck
Thanx St.Jimmy for the response.
I have been busy lately trying to recover the lost data. so far I have used Linux_recovery and PhoenixLinux, both of which run on windows to attempt recovery and both of them failed to provide any substantial data. The Linux_recovery one did gave me back all my lost directories but with no files and the 'search for lost files' hangs with for bars in the progress menu. no luck. The PhoenixLinux didn't do any good either. It couldn't even list anything.
I am again making a image of the original hdd but this time using dd_rescue so that I get most out of the formatted disk. I plan to use Testdisk to see what it can yield. Photorec from what I have read seems like it will work but its output is rather tiresome. Says, it gives back the files in a number format like the first doc file found is 1.doc and so on. I have literally 100G of data on the disk and this means lots of files. Thinking about scouring through all the files one by one to see what file it really is seems a tiring job.
I have a similar experience in windows where I formatted a NTFS drive accidently and wiped out all my data. I used a tool called GetDataBackNTFS which worked so cooly it returned back all my data from the NTFS partition as it was. The application showed me all the deleted folders and files exactly as it was before the format and all I had to do was select the files I wanted to restore and then restore it. I wish we had a similar tool for Linux partitions too.
I used photorec and it did recovered all my files. It was advised that I run photorec from the directory that will hold the recovered data and not from some other place. I used another 200G HDD and made a partition on it large enough to hold any recovered data. I have 99 directories in the recovered partition namely recurep.1 to recurep.99 likewise which contains all the files recovered. The naming of the files is very cumbersome and it is hard to get to the one file that you need but its reassuring to know that it is now there and is a now a matter of intensive searching only. hopefully, i can grep now to find out. I read SpinRite from grcdotcom can do wonders, don't know how much truth there is to it. In any case it is a commercial product.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.