LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-05-2003, 11:05 PM   #1
Null
Member
 
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52

Rep: Reputation: 15
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
 
Old 01-06-2003, 09:37 AM   #2
ZenOfJazz
LQ Newbie
 
Registered: Dec 2002
Location: Nashville, TN
Distribution: Redhat/Mandrake/Gentoo/YellowDog
Posts: 17

Rep: Reputation: 0
Exclamation 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...
 
Old 01-06-2003, 10:20 AM   #3
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
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.
 
Old 01-06-2003, 10:57 AM   #4
Null
Member
 
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52

Original Poster
Rep: Reputation: 15
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?
 
Old 01-07-2003, 09:25 AM   #5
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
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.
 
Old 01-07-2003, 04:55 PM   #6
Null
Member
 
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52

Original Poster
Rep: Reputation: 15
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
 
Old 01-08-2003, 12:49 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
That's horrible man! I am just really curious though where you heard that command?
 
Old 01-08-2003, 04:34 AM   #8
dnar
Member
 
Registered: Feb 2002
Location: Perth, Australia
Distribution: FC5 ::: Coyote ::: SCO Unixware :::
Posts: 201

Rep: Reputation: 30
That must be 2nd in line with rm -rf /*.....
 
Old 01-08-2003, 12:52 PM   #9
Null
Member
 
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52

Original Poster
Rep: Reputation: 15
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....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
keyboard is borked TroelsSmit Linux - Newbie 16 10-05-2004 07:12 AM
I think I borked xmms paperdiesel Linux - Software 2 07-23-2004 07:33 PM
mplayer borked moger Slackware 3 06-08-2004 09:21 PM
sshd is borked Zac2003 *BSD 2 09-25-2003 04:59 PM
x is borked Enigma Linux - Newbie 3 01-18-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration