How to repair an external harddrive?

40,290

You can try installing testdisk. Sometimes it fixes problems other software can't. Becareful though it is pretty hardcore. Google around to see how it works.

Share:
40,290

Related videos on Youtube

dodohjk
Author by

dodohjk

Updated on September 18, 2022

Comments

  • dodohjk
    dodohjk almost 2 years

    I would like to reformat my hard disk, and if possible recover the (somewhat unimportant) contents if possible.

    I have a Western Digital 1TB hard drive which had a NTFS partition. I unplugged the drive without safely removing it first. At first a pop up was asking me to use a Windows OS to run the chkdsk /f command, however, in the effort to keep using a Linux OS I used the ntfsfix command on the ubuntu terminal

    Now, when I try to access the hard drive, it doesn't show up anymore in Nautilus.

    I tried reformatting it using Disk Utility, but it gives me an error message, and Gparted would hang on the "Scanning devices" step infinitely.

    Please comment any output that you would like to see and I will add it to my question.

    EDIT

    disk utility tells me is on /dev/sdb

    the command sudo fdisk -l gives

    dodohjk@DodosPC:~$ sudo fdisk -l
    [sudo] password for dodohjk: 
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0006fa8c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        4094   482344959   241170433    5  Extended
    /dev/sda2       482344960   488396799     3025920   82  Linux swap / Solaris
    /dev/sda5            4096    31461127    15728516   83  Linux
    /dev/sda6        31463424    52434943    10485760   83  Linux
    /dev/sda7        52436992    62923320     5243164+  83  Linux
    /dev/sda8        62924800   482344959   209710080   83  Linux
    
    Disk /dev/sdb: 1000.2 GB, 1000202043392 bytes
    255 heads, 63 sectors/track, 121600 cylinders, total 1953519616 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x6e697373
    
    This doesn't look like a partition table
    Probably you selected the wrong device.
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   ?  1936269394  3772285809   918008208   4f  QNX4.x 3rd part
    /dev/sdb2   ?  1917848077  2462285169   272218546+  73  Unknown
    /dev/sdb3   ?  1818575915  2362751050   272087568   2b  Unknown
    /dev/sdb4   ?  2844524554  2844579527       27487   61  SpeedStor
    
    Partition table entries are not in disk order
    

    I wrote something wrong here, however here the output of fsck /dev/sbd is

    dodohjk@DodosPC:~$ sudo fsck /dev/sdb
    fsck from util-linux 2.20.1
    e2fsck 1.42.5 (29-Jul-2012)
    ext2fs_open2: Bad magic number in super-block
    fsck.ext2: Superblock invalid, trying backup blocks...
    fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb
    
    The superblock could not be read or does not describe a correct ext2
    filesystem.  If the device is valid and it really contains an ext2
    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&gt;
    
    • Admin
      Admin over 10 years
      Please edit your answer and add the output of sudo fdisk -l in Ubuntu
    • Admin
      Admin over 10 years
      the output of your $ lsusb is absolutely not usefull to help you. (Just a comment)
    • Admin
      Admin over 10 years
      Can you get the drive's ID? If you can, add the output of fsck /dev/sdxx to your question. (replace xx with the right ID)
    • Admin
      Admin over 10 years
      I can see from the Disk Utility that is it /dev/sdb, shouldn't it be a number?
    • Admin
      Admin over 10 years
      how can i find the number? how can i find the right ID?
  • dodohjk
    dodohjk over 10 years
    well is been several months that i cannot use it and is gathering dust. Will see what happens. Thanks
  • Minos
    Minos over 9 years
    it sounds like the OP is dealing with a corrupt filesystem, not a physically broken disk.