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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
01-06-2003, 12:05 AM
|
#1
|
Member
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52
Rep:
|
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
|
|
|
01-06-2003, 10:37 AM
|
#2
|
LQ Newbie
Registered: Dec 2002
Location: Nashville, TN
Distribution: Redhat/Mandrake/Gentoo/YellowDog
Posts: 17
Rep:
|
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... 
|
|
|
01-06-2003, 11:20 AM
|
#3
|
Senior Member
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692
Rep:
|
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.
|
|
|
01-06-2003, 11:57 AM
|
#4
|
Member
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52
Original Poster
Rep:
|
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?
|
|
|
01-07-2003, 10:25 AM
|
#5
|
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316
Rep:
|
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.
|
|
|
01-07-2003, 05:55 PM
|
#6
|
Member
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52
Original Poster
Rep:
|
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
|
|
|
01-08-2003, 01:49 AM
|
#7
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
That's horrible man! I am just really curious though where you heard that command?
|
|
|
01-08-2003, 05:34 AM
|
#8
|
Member
Registered: Feb 2002
Location: Perth, Australia
Distribution: FC5 ::: Coyote ::: SCO Unixware :::
Posts: 201
Rep:
|
That must be 2nd in line with rm -rf /*..... 
|
|
|
01-08-2003, 01:52 PM
|
#9
|
Member
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52
Original Poster
Rep:
|
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 10:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|