2

My Western-Digital hard drive (WDC WD3200BEVT-80A0RT1) got broken yesterday. I don't care about the data on it, but I want to reuse this disk. As long as I do not have Windows installation DVD anymore (to use it's repair feature) I want to install Linux Mint. I thought it is possible reformat and reuse the disk. But installing the Linux with reformatting failed (some kind of disk error, I haven't captured it, but the disk got formatted as ext4). So I'm trying to fix bad sectors. e2fsck fails with:

mint@mint:~ >sudo e2fsck -cpfv /dev/sda
e2fsck: Bad magic number in super-block while trying to open /dev/sda
/dev/sda: 
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
or
    e2fsck -b 32768 <device>

Using -b 8193 and -b 32768 gives the same result. I also executed sudo swapoff -a and retried, to be clear, with no luck. I've googled for mke2fs -n and executed it:

mint@mint:~ >sudo mke2fs -n /dev/sda
mke2fs 1.42.9 (4-Feb-2014)
/dev/sda is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
19537920 inodes, 78142806 blocks
3907140 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2385 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616

None of that superblocks resulted in sudo e2fsck -b <...> -cpfv /dev/sda to succeed.

Finally, I've run a testdisk (took ~1 day), which gave me a list with ~20 partitions:

Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63

Warning: the current number of heads per cylinder is 255
but the correct value may be 32.
You can use the Geometry menu to change this value.
It's something to try if
- some partitions are not found by TestDisk
- or the partition table can not be written because partitions overlaps.


Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
     Partition               Start        End    Size in sectors
   FAT32 LBA                0   1  1 30687 254 63  493002657 [FD_BETA9SR2]
   Linux                    0  32 33  3647  67  4   58591232
   HPFS - NTFS              0  32 40    12 223 19     204793
>  HPFS - NTFS             12 223 19    25 158 61     204793
   HPFS - NTFS             12 223 20  9787 241 54  157036544
   HPFS - NTFS             12 223 27  9787 241 54  157036537
   Linux                 3647  99 37  5471   5 38   29296640
   Linux                 5471   5 39 37940 182  2  521625600
   Linux                 6527  21 23  7179 201 62   10485760
   Linux                 6527 183 57  7180 109 33   10485760
   Linux                 6528 123 60  7181  49 36   10485760
   Linux                 6529 129  1  7182  54 40   10485760
   Linux                 9339 248 62  9992 174 38   10485760
   Linux                 9341  96 36  9994  22 12   10485760
   Linux                 9342 166 41  9995  92 17   10485760
   Linux                 9577 218 50 10230 144 26   10485760
   Linux                 9602  52 51 10254 233 27   10485760
   HPFS - NTFS           9787 241 54 19563   5 18  157036537
   HPFS - NTFS           9787 241 55 38913  70  5  467898368
   HPFS - NTFS           9787 241 62 38913  70  5  467898361
   Linux                29792  47 16 30902 206 24   17842176 [_CentOS-6.5-x86_]
   Linux                29794  89 56 30904 249  1   17842176 [_CentOS-6.5-x86_]
   Linux Swap           37940 214 35 38913  37 36   15620096

I tried changing heads per cylinder, but testdisk complained: Warning: the current number of heads per cylinder is 32 but the correct value may be 255.

And then I stuck because I do not understand this output, and how can I repair disk from here.

Are there any commands that can repair my disk and prepare it for new installation?

7
  • 1
    ...& even if you managed to get it going, you'd still trust it tomorrow? Bin it, buy another.
    – Tetsujin
    Oct 12 '14 at 18:26
  • 5
    The technical term for a hard disk in that condition is a doorstop.
    – fixer1234
    Oct 12 '14 at 18:27
  • 3
    @fixer1234 for me, they turn out to be quite fancy paper presses
    – ruslaniv
    Oct 12 '14 at 18:33
  • 1
    Tried using the Western Digital tools disk to wipe and check for bad sectors without it being formatted? You need to start out at a lower level than OS for this. Go to Western Digital's website and look up their HD utilities. Sounds like it's exceeded its bad sector count anyway, drives have these really strong magnets inside that are more usable outside the drive at this point. Oct 12 '14 at 20:24
  • 2
    Check the S.M.A.R.T. data, that tools disk should have a utility to do that. It may be less dead than we think which will mean you can get a few more miles out of it. Best of luck! Oct 12 '14 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.