1

My HDD drive has 30 bad sectors, so I have not installed any operating system on my computer. Can I fix this problem using Ubuntu?

Currently I use it with a CD player.

Zanna
  • 70,465
shajalal
  • 11
  • 1
  • 3
  • @mikewhatever but you can remap them. – heynnema Jul 29 '17 at 19:18
  • By way of explanation, and further to mike's comment, bad sectors are physical faults on the disk surface. Think of them as chips in a windscreen. Initially, they're small and only affect small areas. Over time they increase in size and take over more sectors. They cannot be fixed, and once they show up, it's time to think about replacing the drive. Use the disk as little as possible, and backup your data. – AnotherKiwiGuy Jul 29 '17 at 19:20
  • @heynnema remapping on Hard Drives is mostly done via P-List and G-List functions in SMART automatically these days. Manual mapping kinda went out the window years ago. A better explanation can be found here https://www.mjm.co.uk/bad-sector-remapping.html – AnotherKiwiGuy Jul 29 '17 at 19:25
  • @ThatGuy Interesting reading. I'll bet a (gentlemen's) dollar that the user's disk is so old that it doesn't even support SMART :-) – heynnema Jul 29 '17 at 19:42
  • @heynnema You should tell that to the OP, not me. Also, remapping is not a fix, besides, it's done automatically by the HDD. – mikewhatever Jul 29 '17 at 20:22
  • @mikewhatever it used to be that remapping was only done if an error occurred on a write, not a read. So if only read errors occurred then it would never get remapped. My command specifies a non-destructive r/w test, and adds newly found bad blocks to the existing list of bad blocks. Any you're right... it's not a fix... just a possible way to get a little more life out of a drive... and it might just be due to manufacturing defects, or a head crash. – heynnema Jul 29 '17 at 20:26
  • @ThatGuy re: manual bad block mapping... yes, in the really olden days, real low level formatting required that the user manually type in a numerical list of known, and newly found, bad blocks... and that info would get (re)written out to a "bad block table". Thank *** we don't have to do that any more. – heynnema Jul 29 '17 at 20:36

1 Answers1

0

To badblock the disk...

Warning: Do not badblock a SSD (solid state drive)!

Note: bad blocks may be an indication of pending drive failure or data loss. Recommend that you backup important data now!

Boot to a Ubuntu Live DVD/USB, and in terminal...

sudo e2fsck -cck /dev/sda # change sda if need be

See man e2fsck for more info.

heynnema
  • 70,711