[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dd_rescue No additional sense



KS wrote:
> keith wrote:
> > I'm trying to recover data off a dying hard disk (2.5" Hitachi 320GB
> > HDD). I was able to get the first two partitions without errors. The
> > third (system partition) started off OK but after doing about 44GB, I
> > get the following in logs:
>
> Maybe try gddrescue, seems to work better.

I will second keith's suggestion to use gddrescue which has somewhat
improved behavior and might work better.  I pretty much have switched
to using it whenever I need to do this.

> It is a netbook HDD that is dying(or died) that I'm trying to get data
> from. Also, because I don't have any media to reinstall the Win7 which

Take it as an omen.  This might be the opportune time to ween yourself
from it.  :-)

> came with it, I copied the first two partitions, one of which had the
> installation partition. However, I don't know how to exactly replicate
> the partition table in the new hard drive. Any suggestions?

Partition the new drive with the same sized partition as the previous
rescue partition.  I like using sfdisk for this purpose.

  sfdisk -d /dev/sda > sda.partitions  # dumps partition table

Then you can clone the old partitions onto the new disk this way:

  sfdisk /dev/sdX < sda.partitions  # writes /dev/sda partition table

Where /dev/sd'X' is the new drive you wish to partition.  You will
need to write the file sda.partitions and copy it to wherever you are
restoring the data onto the new drive.  But that will be different
depending upon your environment.  I don't know if you have them on
different machines or what.  I am sure you can scramble and figure
that part out.  If both drives are on the same machine then you can
pipe from one to the other.  Be careful that you identify the drive
you are writing to correctly.

  sfdisk -d /dev/sdX | sfdisk /dev/sdY

Then restore by using dd or other program to copy your backed up image
of the restore partition to it.  Choose another block size if you like
but 64k has traditionally been the best performing size for me.

  dd if=sda1.image of=/dev/sdY1 bs=16k

Then the trick is to boot to that recovery partition.  For that task I
like using the super grub boot disk to boot the system.  (But there
are many different ways to do this.  You might be able to copy the MBR
directly with dd if=/dev/sdX of=mbr.img bs=512 count=1 and then on to
your new disk but not sure because I have always used the system tools
to recreated it.)  Then you should be able to use your system restore
tools to restore the system to the factory image.

  http://www.supergrubdisk.org/super-grub2-disk/

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: