Ubuntu – Issue with bad sectors on a laptop hard drive

hard-disklinuxUbuntu

I had Windows installed on my laptop and suddenly one morning Windows couldn't start. Then I tried after formatting and for once it became possible.

I also installed Ubuntu as logical drive (deleted all HDD partitions) and then tried to install Windows but in the middle of the installation process (after expanding Windows files) it showed an error and stopped.

I'm using Ubuntu with live CD. In the Ubuntu disk utility, I see all HDDs as unallocated free space. The following points are being shown:

----smart status: disk failure is imminent

>>>results of selt-test
--self assessment-failing
--power cycles-1834
--bad sectors-2047
--overall assessment-disk failure is imminent(backup all data and replace the disk)
>>>Attributes
for reallocated sector unit
-assessment is failing
values---
        normalized-1
        worst-1
        threshold-50
        value-2047 sectors
>>>

Now I'm using the badblocks command.

sudo badblocks -v /dev/sda

But it has been running for 106 hours, and still continues.

I don't want to replace my HDD. Please help me so that I can use Windows on my laptop.

Best Answer

sudo badblocks -v /dev/sda

but it has completed 106 hrs till now and still continue...

Hard disks do not have an unlimited life span, and it is not possible to predict exactly what it will be. If badblocks ran for that long, it is probably because of serious hardware failure. On linux, this can manifest itself at first as sudden system freezes due to processes falling into uninterruptible sleep, meaning they cannot be stopped and the kernel keeps spinning its wheels trying to handle them, maxing out the processor. This is due to disk read failures, which will be reported in syslog.

Running badblocks in that case can work but take a very long time, because it can fall pray to uninterruptible sleep too when it finds the bad blocks; if it comes out of this and logs the blocks successfully, the disk can be used, but if you reformat again that bad blocks list is gone too.

If you can't take the hard drive out yourself and examine it by plugging it into another computer, you should take it to someone who can. Taking it out is probably not that hard, which will save you a bunch of service charges including replacing the drive if necessary.

Related Question