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.
Hello,
A laptop that I need to fix reports that it has 1 bad sector, and I thought that it would be possible to fix it from a linux live cd.
I have linux ubuntu 11.04, but I were not able to find a repair function (only the smart scan).
DESCRIPTION
fsck is used to check and optionally repair one or more Linux file systems. filesys can be a device name (e.g. /dev/hdc1, /dev/sdb2),
a mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier (e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or
LABEL=root). Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the
total amount of time needed to check all of the filesystems.
If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in
/etc/fstab serially. This is equivalent to the -As options.
The exit code returned by fsck is the sum of the following conditions:
0 - No errors
1 - File system errors corrected
2 - System should be rebooted
4 - File system errors left uncorrected
8 - Operational error
16 - Usage or syntax error
32 - Fsck canceled by user request
128 - Shared library error
The exit code returned when multiple file systems are checked is the bit-wise OR of the exit codes for each file system that is checked.
In actuality, fsck is simply a front-end for the various file system checkers (fsck.fstype) available under Linux. The file system-spe-
cific checker is searched for in /sbin first, then in /etc/fs and /etc, and finally in the directories listed in the PATH environment
variable. Please see the file system-specific checker manual pages for further details.
Just a few links to aid you to gaining some understanding;
It may not be possible to "repair" it as such. An entire sector being marked bad is a bit odd. Personally, I'd run the hard drive's OEM diags first for more clues as to the state of the drive and maybe controller.
Hello,
A laptop that I need to fix reports that it has 1 bad sector, and I thought that it would be possible to fix it from a linux live cd.
I have linux ubuntu 11.04, but I were not able to find a repair function (only the smart scan).
Any help would be greatly appreciated and rewarded!
Is this an indication that the hard drive is failing? Or is there a good way to judge? I've had two hard drives fail and learned the hard way that it can happen, and sometimes without warning.
If the system report a bad sector this almost any times means the the hard disks internal controller already has used up all the spare sectors for covering bad blocks. From my experience this is in 99% a sign for a dying disk. As jefro already suggested it is time to check the disk with the manufacturers diagnosis tool. And of course to back up all valuable data on that disk (which you do regularly anyways, don't you?).
Whole story:
It was a friends hard drive I was supposed to fix, and I know that it's no good when a bad sector shows up...
But since there was only 1 bad sector I was unable to convince my friend that the disk might fail soon, but did give him a warning.
Anyway, I figured that It might be a soft error, since smart didn't show any other signs of old age or probable failure (the are two types soft and hard bad sectors for those who don't know) - these require formatting the disk to fix, but couldn't format the disk since it was full of data. Ubuntu CD was my first attempt, after I couldn't find a repair tool on it, I looked up Hiren's boot CD that had a program to fix bad sectors. (Just some info in case anyone encounters similar problems.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.