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.
What filesystem are you using? (ReiserFS, ext3, etc. If you don't know this, look in /etc/fstab)
Also, take a look in your /lost+found folder; it may have recovered some files in there (the filenames will be wrong though).
The major piece of advice I would give you is don't save anything to that partition if you can avoid it; it's likely that you've messed up your directory structure, so you may end up making the lost files unrecoverable if you save over them.
There are several ways to recover files, but they really do depend on the filesystem.
BUT:
If possible, take a backup of the entire partition using
Code:
bzip2 < /dev/partitiondevice > backup.bz2
(with the broken filesystem unmounted). There's a slim chance that rebuilding the tree could cause further problems, and this way you can always go back to the old partition. This step will take some time.
Only ever run fsck on an unmounted filesystem.
Also, do not interrupt fsck with the --rebuild-tree option, or you will damage the partiton.
I had a problem with my harddrive and I used "fsck.reiserfs --rebuild-tree". But, after this command, there were tons of files and folders in lost+found (I think this is my entire file tree). But the names of the files and folders are something like 100200_377281. Supposing that this thing (100200_377281) is a folder, I think that it belongs to a folder called ???_100200. Is this corret? And, if it is, is there any tool that reconstruct the entire tree back (only the structure)?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.