I am trying to recover a hard disk. The external hard disk is recognised, and the Disks software in Ubuntu that the disk is OK, but has one bad sector. Is it possible to recover the data? I tried testdisk and photorec as suggested by some solutions, but they report the recovery depends on the correct size of the hard disk


Error: /dev/sdb: unrecognised disk label
Model: ST1000LM 035-1RK172 (scsi)                                         
Disk /dev/sdb: -512.00B
Ssector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

I guess, none of the recovery software is working because the size reported is wrong. I am attaching a screen shot of the Disk utility.

enter image description here

When I try to ddrescue, then the error is

sudo ddrescue /dev/sdb /home/user/copy.img
ddrescue: Input file is not seekable.

The objective is to recover photos from the hard disk.

  • 2
    if it's not detected (bogus capacity) and no longer talks to hdparm (read-sector) then there is not much you can do anymore (in software). Nov 8, 2018 at 16:26
  • 1
    Could you add in the output of sudo smartctl -i /dev/sdb? The full output of sudo smartctl -x /dev/sdb would be nice too, but that's several pages — maybe a pastebin link then someone can edit in any interesting bits. If smartctl says something about an unrecognized bridge, you can try adding -d sat ...
    – derobert
    Nov 8, 2018 at 17:03
  • So? What happened? Recovered?
    – Fabby
    Nov 16, 2018 at 8:09
  • 2
    There are a lot of assumptions in comments and answers that the disc is actually faulty in the first place, and some outright dangerous recommendations being made based upon them. This could well be the same problem as unix.stackexchange.com/questions/464791 with the disc being perfectly fine. After all, checking the specifications for the drive mentioned does tell us that it indeed has a 4KiB physical sector size.
    – JdeBP
    Nov 16, 2018 at 12:45
  • @derobert sorry for the late reply, I will look at it in the next days and let you know the pastebin link. Nov 18, 2018 at 12:10

4 Answers 4


This looks like more than just a bad sector if even an advanced tool like ddrescue doesn't work... I've used ddrescue to successfully recover disks with multiple bad sectors.

It looks like this disk is not recognized by the OS as it looks like an 18 Exabyte disk to disks, a -512 byte drive to parted, ... so you're down to hardware recovery (Slightly off-topic here but on-topic here ):

  1. Remove the drive from the external enclosure and hook it up straight to the SATA port of your computer and see if it gets recognised now.
  2. If you're on a laptop with only one SATA port, boot Ubuntu from a live USB and hook it up to the only port you have.
  3. If that doesn't work, try a PCB from an identical drive and try hooking it up again
  4. If that fails, you need professional data recovery:
    • Expensive!
    • Slow (you need to send the drive in)
    • they recover what they can regardless of pictures or not and charge by he amount of recovered data.
  • If somebody's charging by the kilobyte, they're being unethical. Charging a fixed price plus difficulty factor (human time expended) plus... GiB maybe (since it takes longer to copy a large device) would be OK, but charging by the kilobyte?! That's borderline scamming (it's not a scam because they actually recover the data); it doesn't take significantly more effort to recover a 6TiB drive to a 4TiB drive but they'd charge an additional 50%? I don't know of anyone who would do that (outside maybe military contractors).
    – wizzwizz4
    Nov 24, 2018 at 15:46
  • @wizzwizz4 Updated to make more generic. Thanks for the feed-back.
    – Fabby
    Nov 24, 2018 at 21:11
  • 1
    as step 2.5 you can try to replace the PCB with one from a healthy drive, with a bit of luck that will help your computer recognize the size of the harddrive, and allow reading from it
    – hanshenrik
    May 29, 2019 at 17:49
  • @hanshenrik As the OP went away and never accepted or gave any feedback, I've added your suggestion to the steps. Thanks for the input, :-) I've only ever been able to recover a HDD that way once in 20 years though...
    – Fabby
    May 30, 2019 at 12:08

I have had success with gpart and parted.

an useful example of this tool is here: https://ubuntuforums.org/showthread.php?t=370121

my personal experience adapted to your case sounds like:

-scanning disk partitions let you find sectors:

sudo gpart /dev/sdb

-restore faulty partition using first and latest sectors:

sudo parted /dev/sdb -> rescue
  • @jimmij updated with proper content
    – mattia.b89
    Nov 8, 2018 at 21:21

Input file is not seekable.

If your drive doesn't respond to read requests correctly, no software recovery solutions will help. Your options here are:

  1. Try the drive with different computers. Some have more stable USB power than others, which could make a difference.

  2. Try using dd with conv=sync,noerror flags to ignore bad sectors. AFAIK dd will not seek the drive unless you tell it to, and you can specify the image size yourself if the drive reports a wrong size.

  3. If you're feeling lucky, put the disk in a sealed bag together with some silica gel for a couple of days to take the moisture out. Then put the drive (still inside the bag) in the fridge / freezer. Try reading out the image while the drive is still cold: electric amplifiers work better while they are cool (less thermal noise and parasite currents), which may be just enough to amplify the signal from damaged sectors into something meaningful. Don't expect miracles and know that doing this trick may damage the drive, especially if you repeat it. I once recovered a complete partition in this way which was unreadable otherwise (encrypted), though my disk was in a better shape than yours.

  4. If the approaches above don't works or the information is too valuable to take the risk, talk to a data recovery service. Expect to pay about 20 times the price of the drive in recovery fees. Don't expect to get all the data. Don't be surprised if the recovery doesn't succeed, though you typically are not charged anything in that case.


If a commercial solution is acceptable, I can vouch for a product called R-Studio. I've been a user for over 15 years (Windows and Mac versions) and can attest to its efficacy.

They recommend that you immediately do a binary image of the failing drive onto a good (, larger,) device, via the tool. Then you can scan it repeatedly without doing further damage to the failing hardware. It is capable of doing hardware sector scans and can recognize many formats and can recognize many data types from the binary signature. In a reasonably unfragmented drive, this can yield good results, even if the allocation information is not fully available.

  • Just curious as to why the -1? Nov 26, 2018 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .