PDA

View Full Version : Restoring HDD image made with GNU ddrescue to new drive



Agent_24
20-11-2010, 01:05 PM
I have made a image using Gnu ddrescue of a 40GB hard drive which had a lot of reallocated sectors and was on its way out.

It was from an Acer laptop and contains 3 partitions. I wish to write this back to a new 160GB drive, and expand the partitions as needed.

What is the best way to do this?

Erayd
20-11-2010, 01:55 PM
Use dd_rescue to write the image back onto the new drive, then use gparted (or another similar tool) to resize the partitions & filesystems to properly fill the available space.

Agent_24
20-11-2010, 02:16 PM
That's what I thought would be logical, but wanted to be sure...

Agent_24
21-11-2010, 12:40 AM
I wrote the image to the new drive (after limiting capacity to 137GB with HPA because of the BIOS issue)

Windows boots fine after running chkdsk and repairing errors that were caused by the faulty drive


I tried expanding the partitions etc but I get an error in Gparted...

There are 3 partitions

1) C: - 27GB, FAT32, Boot, Contains Windows XP.
2) D: - 9.7GB, FAT32, normal, contains recovery install images for XP
3) No letter - 7.84MB, FAT16, hidden, called "ACER_SERVIC" - guess it contains the recovery bootloader\program\whatever.

Gparted has an error when trying to move the service partition to the end of the drive.
For some reason it also wants to expand it to 16MB and won't let me choose anything smaller.

It also said that moving the partition may cause boot failure as the start sector will be changed.
I think this is just a generic warning rather than a specific error, though.


GParted 0.7.0

Libparted 2.3

Move /dev/sda3 to the right and grow it from 7.84 MiB to 15.00 MiB 00:00:09 ( ERROR )
calibrate /dev/sda3 00:00:02 ( SUCCESS )
path: /dev/sda3
start: 78124095
end: 78140159
size: 16065 (7.84 MiB)

check file system on /dev/sda3 for errors and (if possible) fix them 00:00:03 ( SUCCESS )
dosfsck -a -w -v /dev/sda3
dosfsck 3.0.9 (31 Jan 2010)
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSWIN4.1"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
1024 bytes per cluster
1 reserved sector
First FAT starts at byte 512 (sector 1)
2 FATs, 16 bit entries
16384 bytes per FAT (= 32 sectors)
Root directory starts at byte 33280 (sector 65)
512 root directory entries
Data area starts at byte 49664 (sector 97)
7984 data clusters (8175616 bytes)
63 sectors/track, 255 heads
78124095 hidden sectors
16065 sectors total
Reclaiming unconnected clusters.
/dev/sda3: 79 files, 5659/7984 clusters



grow partition from 7.84 MiB to 90.74 GiB 00:00:03 ( SUCCESS )
old start: 78124095
old end: 78140159
old size: 16065 (7.84 MiB)
new start: 78124095
new end: 268418752
new size: 190294658 (90.74 GiB)

move file system to the right 00:00:01 ( ERROR )
using libparted

rollback last change to the partition table 00:00:00 ( SUCCESS )
shrink partition from 90.74 GiB to 7.84 MiB 00:00:00 ( SUCCESS )
old start: 78124095
old end: 268418752
old size: 190294658 (90.74 GiB)
new start: 78124095
new end: 78140159
new size: 16065 (7.84 MiB)


libparted messages ( INFO )
There are no possible configurations for this FAT type.



========================================