Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Please, I hope someone can help. I was creating a new swap system, but accidentally typed the wrong partition!! AHhhh, it just so happens, it was my /dev/hda2 partition, and had ALL my webserver files on..... and of course being the idiot I am, I never created a backup!!
I did try and download r-linux, and recover a bunch of files, but not in the actual ext2fs format. The program runs on windows, and created a bunch of file starting with $Inode####. Does anyone know how to restore these back on to my linux box running red-hat 9.0.
If you open one of the files up in notepad, it's like the file contains a whole bunch of the recovered files, you can see the filename, and then gibberish!
What's your filesystem? Recovering in Linux is very hard, the application you've tried probably read from the first sector to the last, putting everything it read together...
Ext2/ext3 may be possible to recover, reiserfs/xfs are almost impossible I heard.
The filesystem was ext2, then when I was trying to create a new swap drive, I had created it on the wrong mount. I'm pretty much a newbie at linux, so the next thing I did was to use the mkfs command, and put it back to ext2.
I've tried testdisk, but that's a little confusing. Right now I have the drive in a windows machine, and I'm running this Quick Recovery program on it right now, we'll see what that does.
Thanks, I'll give that a try next. No it's not bootable, all the files are gone... but I haven't done anything destructive to it yet, so if I could just get a recovery program to work....
If you deleted a partition and created two more, you can fix the partition table by using fdisk or cfdisk as many times you want. If you formated the new swap partition, then only partial of the data will be saved. Its easier to save text files instead of binary files.
The best way to try to restore the files, is to get another hard drive and make an image file of the bad partition. Do not run fsck or any filesystem tools. A utility dd is great for this. After dd is done, you can use grep and other text tools to find certain keywords in the image file. Recovering binary files is hard if you do not know the file format structure of every type. A hex editor can not be use because it takes too long. A program have to be made to do this.
I do not know enough to restore files. I have not yet practice editing files with a hex editor. I only know that you can re-creatre partitions forever without screwing up the files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.