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.
I couldn't find this with Search, and I hope that this is the right forum.
I just executed
mke2fs -T largefile4 -j -F /dev/hdb6
ignoring all warnings (how can a single person be so stupid?!). Unfortunately, /dev/hdb6 is/was my home directory (ext3, with ~35 GiB of data), while I had intended to format /dev/hda6.
I immediately rebooted my computer (after mke2fs completed, but without shutdown), and didn't mount /dev/hdb6 since that accident (I'm currently using Knoppix).
Is there any chance to recover at least parts of my filesystem? grep won't help much since many (important) files are/were binary.
I just tried to mount the partition, but it tells me something about a bad superblock, so not everything has been overwritten (otherwise mounting should have been no problem).
I have no experience in recovering data, however a quick google yielded some ext2 (ext2 tools work on ext3) recovery tools: http://www.guzu.net/linux/e2retrieve.php
There are links to other programs on that site if those don't suit your needs.
A bad superblock shouldn't matter, as the data would still be there.
Good luck, and post your results, I'm interested in whether it works out or not!
I just tried to mount the partition, but it tells me something about a bad superblock, so not everything has been overwritten (otherwise mounting should have been no problem).
No, that's not the case.
Quote:
A superblock is located at position 0 of every partition, contains vital information about the filesystem and is needed at a fielsystem check.
You didn't physically delete the information in the partition. You destroyed the information that allows you to mount it. That's very different.
I have recovered probably 100 % of my data, although there are a lot of directories and files I couldn't associate with their right name (all of them were configuration files of KDE programs).
For those who are interested:
I made a backup of the complete partition, then tried to repair as good as possible:
e2fsck -b 32768 -y backup.copy
mount -o loop backup.copy backup.fs
The file system couldn't be recovered, but all top-level files and directories under my home directory were in lost+found, plus those KDE configuration files.
Thanks for the information about the superblock; unfortunately I couldn't compile e2retrieve.
Cool! Out of interest, what was the problem in compiling e2retrieve? ie. the errors you got, or missing dependancies? It's always good to know the reason why you can't compile something even if you decide not to bother, might help you in the future when you have trouble compiling something else.
'/usr/include/linux/bitmap.h' had undefined preprocessor macros, like BITS_PER_LONG, DECLARE_BITMAP and more. It turned out that these macros were only defined when __KERNEL__ was defined. However, when I defined __KERNEL__, other errors occured (as expected).
Btw. I am using Debian testing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.