0

I have some bad sectors on my drive, but when I open disk utility using:

gnome-disks

It won't let me mark them, or do anything with the driver except benchmark it and format it!

enter image description here Please help, my disk is most likely to fail on me right now!

  • 5
    see http://askubuntu.com/questions/291570/mark-bad-sectors-on-hard-drive-without-formating And marking them does not make the disk less likely to fail. – Rinzwind Jul 26 '16 at 23:14
  • 2
    As @Rinzwind says, your disk is taking its last breaths and could fail every moment. Go and make a backup now if you haven't done that already. – Byte Commander Jul 27 '16 at 00:19
  • It is not certain that the disk is going to fail soon. It may live for another 10 years with zero additional problems. The fact that there are bad sectors in it just drastically increase the chances that the disk is going to fail soon, so much so that you should replace the drive and copy/backup any important data from it as soon as you can. – thomasrutter Jul 27 '16 at 04:30

1 Answers1

3

Install gsmartcontrol and smartmontools, using Synaptic. Then, open gsmartcontrol from the dash, and run the smart extended disk test. This will scan for bad blocks.

You could also use the "badblocks" command in terminal, but be careful, if you give it the wrong parameters, it could wipe out your data. See "man badblocks" for more info.

And yes, I'll echo the previous advice... backup your data... and be prepared to replace the hard disk... Toshiba hard disk drives aren't great.

Update #1:

The correct way to bad block a hard drive...

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

-c This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or direc‐ tory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test.

-k When combined with the -c option, any existing bad blocks in the bad blocks list are preserved, and any new bad blocks found by running badblocks(8) will be added to the existing bad blocks list.

-y Assume an answer of `yes' to all questions; allows e2fsck to be used non-interactively. This option may not be specified at the same time as the -n or -p options.

heynnema
  • 70,711