Linux - HardwareThis 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.
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.
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
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?
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.
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
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....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.