Click to See Complete Forum and Search --> : bad block on hda - am i hosed?
ruwach
03-19-2005, 02:51 PM
So i am going along here fine, right ? running the computer and something crashed.
i did a reboot and the OS would only partially load and then hang with a kernel panic.
i thought " no problem, i have re-installed my OS a dozen times, here we go again. "
tried several distros of linux, but could not get past the part of install where a partition is formatted. It always hangs.
i installed the HD as a slave in another box. i had three partitions set up on this drive. / , /swap, and /stuff (where i keep stuff).
So, i tried to mkfs ext3 /dev/hdb1 and it errored out with bad blocks....
i can mount the other partition (/stuff) just fine, and all the data there seems to be intact. But what do i do to be able to use that partition again. the drive is only 6 months old.
any suggestions ?
thanks
Morphine Drip
03-19-2005, 03:19 PM
try running the 'badblocks' command. man badblocks for cli info
good luck.
ruwach
03-19-2005, 04:05 PM
thanks mr. drip. i checked the man page and was advised to use bad blocks as a -c option to mkfs.
so that is what i did. seems ok now.
many thanks.
now another question.
i want to install an operating system on this partition. when the linux installer tries to format the disk, will it pick up and correct for the bad blocks?
thanks
Morphine Drip
03-19-2005, 08:57 PM
most welcome. once the badblocks app has flagged/found the bad blocks the OS will not attempt to write to those blocks again.
Satanic Atheist
03-22-2005, 08:59 PM
Just a quick note on dodgy drives after a forced reboot without a shutdown...
I have 2 hard drives in my main machine, one is a 30Gb boot drive that is permanently installed into the computer and is used purely for booting and starting the OS (Slackware 10). The second drive is a removable 120Gb drive so I can just rip it out and take it away if I go anywhere. This is the drive that has the problem - due to heat dissipation problems, the IDE connector works its way loose (I have a large tower case with only one case fan, and no fan on the CPU, just a massive heatsink). When the cable works its way loose, I have to forcibly shutdown the computer (pull the plug) and reconfirm the solid IDE connection to restart the machine.
Thankfully, to date, I have not lost any data (but see previous posts about near-misses!) and have to regularly start up in mode 3 (no X) to test the drive with e2fsck several times to fix the damage. Often, I have to use the -f function to override the apparent OKness report from the journal. Eventually, the drive is safe to remount again.
I love removable technology, but sometimes it does get screwy...
Also, my original 30Gb (Quantum Fireball) died when something went pear-shaped and Linux reported Read_Drive_Not_Ready errors under /var/log/messages. Note, SMART was enabled and I have NEVER received a SMART report to indicate imminent drive failure.
Now, I''m about to slap the 120Gb into an IcyBox USB2.0 so hopefully I won't have trouble with the IDE connector any more.
James
blobaugh
03-24-2005, 09:50 PM
SA, ever think about just using a live boot cd and running fsck? I've had my laptop drive freak out a couple times on me and that solved the problem. Had to run fsck a few times
Satanic Atheist
03-25-2005, 01:39 PM
Yeah, I use Knoppix, Slackware-Live and DSL to fsck the drives. This was just one VERY bad drive (dual-boot Windows and Linux - both showed errors).
I eventually sold it on eBay to someone who badly wanted the chipset off it.
James