0

I have an image file of a faulty harddrive created with ddrescue on Linux. The harddrive is 750GB, if I remember correctly, only about 30MB could not be saved. I do have some other faulty HDs and can't remember if this one belonged to my Windows or Linux computer.

I'm trying to write the image back to a 2TB HD. No matter if I format that HD as NTFS or EXT and write the image to that new HD, once it's done it shows up as unformatted and blank again. I've read that we should use error correcting tools for the images before writing them back. So I tried using fsck and ntfsfix, but none can identify the image and correct it.

If ddrescue managed to save so much from that faulty HD, why can't tools correct the errors and why can't it be written back? I managed to successfully write back another faulty 160GB HD, so I don't know why this 750GB one won't work.

Edit, to write back the image I use:

sudo ddrescue -f seagate750gb.img /dev/sdb restore.log

head -n 16 seagate750gb.log

# Rescue Logfile. Created by GNU ddrescue version 1.17
# Command line: ddrescue -d -r5 -R /dev/sdb seagate750gb.img seagate750gb.log
# current_pos  current_status
0x89B7F4A00     +
#      pos        size  status
0x00000000  0x89B7F4800  +
0x89B7F4800  0x00000200  -
0x89B7F4A00  0x010AA200  +
0x89C89EC00  0x00000200  -
0x89C89EE00  0x21775200  +
0x8BE014000  0x00000200  -
0x8BE014200  0x000DA400  +
0x8BE0EE600  0x00000200  -
0x8BE0EE800  0x00369600  +
0x8BE457E00  0x00000200  -
0x8BE458000  0x002B6000  +

file seagate750gb.img

seagate750gb.img: x86 boot sector

gdisk -l seagate750gb.img

GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Disk seagate750gb.img: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2891CCD9-92FB-4380-AB03-801E0E4F90CC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1465149101 sectors (698.6 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name

sudo gdisk -l /dev/sdb

(this is my 2TB HD, after the image was written to it)

GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 59784077-576E-4CC1-918D-773D10916B46
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3907029101 sectors (1.8 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
  • Do you still have the ddrescue log from this operation? If so, please post the output of head -n 16 the_logfile. What exact command do you use to write the image back? What is the output of file the_image_file? What is the output of gdisk -l the_image_file? What does gdisk -l /dev/sdX say about logical sector size of your 2TB HDD? Please do not answer these questions in comments, edit your question and add information there. – Kamil Maciorowski Jan 3 '18 at 8:15
0

Before speculating, check a few things:

  • Make sure the disk image actually has data. Try something like:

    lzop < disk.img | wc -c - disk.img
    

    That will take few minutes to count characters in both the image and a somewhat compressed lzop stream of the image. If the image is all zeros, the lzop number will be relatively small.

    If the lzop number is at least 10% of the raw image size, there's some data in disk.img.

  • If there seems to be data, check out what a few standard utils say about it:

    file disk.img
    

    ...should tell a little about what's there. If it's a partition table, try:

    gpart -v disk.img
    

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.