Bad sectors on a hard drive, is there an application that runs on linux?
I’m fixing laptop, and the hard drive has several bad sectors on it. My intent is to get windows back on it (it is a friends computer), but windows won’t install until these bad sectors are fixed. I was able to load ubuntu on the laptop as a temporary fix and so I have an os to help the diagnosis and extract some data from the corrupt windows installation. Is there any disk checking utilities avaliable for linux that also attempts to repair bad sectors?
Tagged with: bad sectors • diagnosis • friends computer • hard drive • laptop • Linux • windows installation
Filed under: Linux Applications
Like this post? Subscribe to my RSS feed and get loads more!
Though a drive can still run good for a few years if it has a few bad sectors, it is often a sign that the drive is going bad. If I were you I would download the Drive Manufacturers boot disk (links for WD and Seagate drives) to check the drive, sometimes you can get these from the computer manufactures. Doing a full media scan will check for bad sectors, when it find them the utility will either internally remap with reserve sectors, or if the reserves sectors have been used up you can permanently mark them as bad.
If you are still having problems you can also try doing a "zero" wipe of the drive, which will erase every sector of the drive, but can force the drive to remap bad sectors. This can be done either with the drive utility, with an option like "Full erase" or "Write Zeros to drive". Also this can be done with a Linux boot disk with the command: dd if=/dev/zero of=/dev/sda. Make sure you only have the drive you want wiped hooked up, unless you are certain of which drive belongs to the Linux device name, like /dev/sda or /dev/sdb.
what if you mounted it as an external hard drive using a USB drive tray? You could connect it to an existing system, copy the data, then reformat the hard drive. If you can get it to mount and access the data you should also be able to run disk utilities to deal with the bad sectors.
The previous answer is right. However, if there are enough bad sectors that Windows refuses to install, it’s time to write off the drive. It can’t be trusted. Maybe you could use it in a RAID array if you know you’ll be able to swap it out with a new one relatively soon, but I wouldn’t trust it, especially as a system drive.
It depends on the type of disk you have. If it is a SCSI drive, there is software (scsibadblock) that will mark bad blocks for you. This must be run from another disk or live-dvd as it will generally wipe the disk being checked.
If it is not a SCSI disk, some file system creation programs (mkfs.xxx) will mark bad blocks as an option, although these do not generally survive re-partitioning or re-creating the file system.
Another option is often in the disk controller software, although this is very rare these days, and generally only available on servers, if at all.