View previous topic :: View next topic |
Author |
Message |
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Mon Nov 18, 2002 12:01 am Post subject: Unformat ext2/3 |
|
|
Hello world,
I accidentally run mke2fs -F -v /dev/hdf1 instead of fsck -f -v /dev/hdf1 and wiped that partition. Is there anyway to "unformat" it or should I hang myself ?
.:: zen ::. |
|
Back to top |
|
|
MaD-DaRiUs n00b
Joined: 21 Aug 2002 Posts: 46 Location: BC, Canada
|
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Mon Nov 18, 2002 11:22 am Post subject: |
|
|
Actually the files are still there if do i.e. : "grep -b 'gentoo' /dev/hdf1" it replies "Binary file /dev/hdf1 matches" and also "strings /dev/hdf1" shows all the files. However all the files I'm interrested to are binaries and I can't simply copy-paste them using strings. Is there any way to rescue these files ?
I'm beggining the hanging-myself process anyway
|
o|
/-\
|
/\
.:: zen ::. |
|
Back to top |
|
|
clacour n00b
Joined: 19 Apr 2002 Posts: 59 Location: Dallas, Tx USA
|
Posted: Mon Nov 18, 2002 5:09 pm Post subject: |
|
|
Make sure you have a drop of at least three feet, and whatever you do, don't use nylon! (It stretches, which means strangulation rather than neck-snapping.)
I'm afraid you're completely S.O.L. Here's why:
In a normal, working filesystem, directory entries (the things you see when you do an "ls") point to inodes, which contain some information about the file (the stuff you see when you do an "ls -l", rather than an "ls") and most importantly, pointers to the data blocks that contain the actual file. (For small files, the inode might contain the data itself. I'm not too sure about that point; my memory is fuzzy on that subject.)
When you rebuilt the filesystem, you wiped out every one of the inodes, replacing them with the standard contents of an "empty" inode.
File recovery utilities are designed to rebuild the directory file, and operate on the assumption that the inode is intact, it's just the pointer to it (aka the directory entry) that's missing.
You're one layer below that, unfortunately.
Searchable things like text might be mostly recoverable, but binaries are almost certainly gone forever.
You might want to post more info on what the partition was in it's previous life, and get suggestions on how to most easily recover what you had. Getting it off /dev/hdf1 is not going to be one of those options, I'm afraid. |
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Mon Nov 18, 2002 5:24 pm Post subject: |
|
|
I've officially comitted suicide, and this is my ghost replying
Anyway, I searched a little bit about it and there's nothing I can do ("semi-official" redhat ext3-dev response to ml). The only things that I didn't have back-up'd were some university papers from previous years but I can get them hard-copied from the teachers any time I' ll need them, so it's ok.
It was a good excuse anyway to convert that partition to reiserfs too
Thanx for replying though.
.:: zen ::. |
|
Back to top |
|
|
saru n00b
Joined: 31 Oct 2006 Posts: 11
|
Posted: Tue Oct 31, 2006 9:29 pm Post subject: Recover from accidental format |
|
|
I've accidentally formated (quick format) my data partition while installing (I must have missed that the format flag was set). It used to be a FAT32 partition and is now an EXT3 partition. Running some "data recovery" software I was able to get some file back, but not most of the newer ones (I'm thinking it's due to the files being fragmented all over the disk).
Is there any way I can undo this, or are the discriptors lost forever and "data recovery" software is the best I can get?
Thanks a bunch for replies |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Wed Nov 01, 2006 2:30 am Post subject: |
|
|
The first copy of the ext3 superblock, plus any other structures at the head of the partition, almost certainly whacked the FAT, possibly both copies. There are two copies of the FAT stored one behind the other, so a FAT recovery tool might be able to replace the first copy from the second, if the ext3 structures didn't clobber both copies. Sorry, it's been so long since I repaired a FAT partition that I can't recall the details--with the right info you can clone the FAT with just dd. Try Google, there's definitely at least a crude HOWTO out there for this.
mke2fs writes backup superblocks in several locations throughout the partition, so even if you recover tha FAT, you've likely lost some data. If a superblock happened to overwrite a directory, everything in it will be orphaned, but a FAT filesystem check tool would probably discover this and recover the chains. If you can fix the FATs themselves using dd or similar, fsck or (better) Windows ScanDisk might be able to undo most of the remaining damage.
Good luck, you'll need it. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|