LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   I've borked over a superblock...uh oh (https://www.linuxquestions.org/questions/linux-hardware-18/ive-borked-over-a-superblock-uh-oh-40432/)

Null 01-05-2003 11:05 PM

I've borked over a superblock...uh oh
 
Long story short: /dev/hdc is a 120gb ide hard drive with one partition (/dev/hdc1) formatted to ext2. I've managed to destroy the superblock apparently (according to the boot check) and the fsck repair the boot does gives an error. Any ideas about how I would repair this sector so I can mount the drive? At this point I can't afford to lose that data.

Oh, and if I'm missing some major detail please point it out :)

Thanks

ZenOfJazz 01-06-2003 09:37 AM

ext2 FS borkage... and repairing same...
 
If you wrote down the nifty data that was emitted by mkfs while it was creating the fs on the drive originally, you can recover by hand...

If you didn't write down, or otherwise save that data, you're not likely to be able to recover...:cry:

rshaw 01-06-2003 10:20 AM

if you using 1k block size, your backup superblock should be at 8193, boot to single user mode and do a >fsck -b 8193 /dev/hdc.

Null 01-06-2003 10:57 AM

The way I caused the problem was that I suspected the drive had a bad sector so I used the following command when the drive was unmounted:

dd if=/dev/zero of=/dev/hdc1 bs=1k

(read it somewhere for checking sectors), obviously I'm an idiot for trying it without reading up on it but it seems to me that perhaps I only killed the /dev/hdc file and the drive itself is fine?

Mik 01-07-2003 09:25 AM

How long did you run that command for? That's a very disastrous command. You haven't added a count so it will continue till it reaches either the end of the input or the end of the output. Since the input is /dev/zero that will be endless. So it will stop once it can't continue writing to /dev/hdc1 anymore. You said it's one partition so basically it will be blanking out 120GB's if you let it finish.
Lets just hope you stopped the command early so you might still have a chance of recovering some data.

Null 01-07-2003 04:55 PM

I believe I let it go for a few minutes (benchmarked on another partition, that was easily 15 gig with my cpu speed it seems). I did some research on the matter and couldn't find a usable superblock, basically I gave up and formatted after trying several tools such as e2salvage and gpart (though the partition table remained intact). Oh well, at least I learned something

MasterC 01-08-2003 12:49 AM

That's horrible man! I am just really curious though where you heard that command?

dnar 01-08-2003 04:34 AM

That must be 2nd in line with rm -rf /*..... :eek:

Null 01-08-2003 12:52 PM

I had heard about it, but just failed to realize you want to use it when the drive is blank...... and to a file on the drive, not the dev file itself....


All times are GMT -5. The time now is 04:21 AM.