"Disk is OK, 113 bad sectors"
With bad sectors, you should always immediately backup all important information and get a new hard drive. You can theoretically mark these sectors as "bad" and tell the computer not to use them. However, this is not at all recommended as bad sectors like spreading like a fungus.
If you want to try this, instructions are below.
- Find your hard drive with
lsblk
. Find the EXT partition mounted at/
. - Remember the code. It should look something like
/dev/sda1
. - Strip the number off the code you got earlier. If you had
/dev/sda1
, your code is now/dev/sda
. - Run this command:
sudo badblocks /dev/sdc > /home/$USER/bad-blocks
- Run this command:
sudo fsck -l bad-blocks /dev/sdc
- While running the above commands, go take a walk. Do not touch your computer.
Disclaimer: I am not responsible for any loss of data or system damage that has resulted from the above commands, both instant and in the future. I hold no responsibility for what you type into your terminal. You have been warned.
Related videos on Youtube
durango
Updated on September 18, 2022Comments
-
durango over 1 year
So, lately I've been having issues booting up Ubuntu and having to go into grub and do a recovery boot and I'll have issues saying "i/o errors in dev/sda" or something along those lines and I noticed I have 113 have bad sectors in my HDD when I just recently started the Disks setting. Isn't there a way to block out those bad sectors or something? What should I do? Thank you!
-
ubfan1 over 9 yearsMake a backup and ensure you can restore from it. Then you can start playing games with the disk.
-
durango over 9 yearsAs funny as that is, I just bought this hard drive like 3 months ago and I just recently built this computer. So, it's sort of a bumber.
-
Kaz Wolfe over 9 yearsI understand that. Same thing has happened to me before. It's not fun.
-
-
durango over 9 yearsThis is exactly what I wanted to hear. Thank you very much! I have a backup already,so I should be good. Thank you!
-
Kaz Wolfe over 9 years@durango If this solved your problem, please hit that green checkmark. It helps the community, you, and me. Everyone wins!
-
psusi over 9 yearsYou should not be using the bad blocks list on modern hard disks. These days the disk itself internally remaps bad sectors to a pool of spare good sectors.
-
Kaz Wolfe over 9 years@psusi That forces the process to take place. I recommend not even working with a bad HDD in the first place.
-
psusi over 9 yearsWhat forces what process to take place?
-
Kaz Wolfe over 9 years@psusi IIRC, this command tells the disk that these sectors are bad and to mark them as unusable.
-
psusi over 9 yearsNo...
badblocks
just tries to read each sector and writes a list of which ones failed to stdout.fsck -l
creates an invisible "bad blocks" file uses those bad blocks so that no other file will use them. -
Kaz Wolfe over 9 yearsReally? I have no idea where I read that....
-
FriendFX about 8 yearsReading the documentation of fsck.ext3, the
-c
option runsbadblocks
internally while at the same time avoiding inconsistent block sizes... I'm not expert on this, but it makes me wonder whether that would be the better option? -
user87317 over 5 years@KazWolfe do you mean "sda" instead of "sdc"? If it's supposed to be "sdc" then why do we need to note the code?