Copying A Disk
Chris Mohler
cr33dog at gmail.com
Sat Jul 12 17:26:05 UTC 2008
On Fri, Jul 11, 2008 at 8:27 PM, Pete Holsberg <pjh42 at pobox.com> wrote:
[...]
> Let me start at the beginning.
>
> My stepson's Dell laptop's HD suffered a failure, probably a head crash,
> and would no longer boot.
>
> I removed it and connected to my Windows XP machine via a SATA/USB
> external adapter cable.
>
> XP recognized it and allowed me to copy files. At one point, it hung and
> started giving me paging errors.
>
> My Vista machine didn't like it at all, and knocked out the USB
> controller. Rebooting brought it back.
>
> A SUSE guy on a Windows mailing list suggested connecting it to my Linux
> camputer.
>
> Now, you're up to date.
>
> Goal: salvage as many files as I can.
Hi again Pete,
I think you can safely ignore Karl's advice thus far - he means well,
but is a bit off-base sometimes. I'm no expert either, but I've spent
some time dealing with damaged disks.
>From your log, it looks like the USB device is attached at /dev/sdb.
Since you mentioned that it's a Dell, the first thing I would do is
(after connecting the drive):
sudo fdisk /dev/sdb
Then enter 'p' (for print) as the command and press enter. Copy the
output - this should show you what partitions are on the disk (as long
as the partition table is not messed up). Dells usually have a small
utility partition that can be ignored, and since he was using MCE,
there may also be a small MediaDirect partition that you may or may
not need to salvage. The bulk of the files should be on a very large
NTFS or FAT partion.
Next, I would try to dd the partition(s) you want to copy, eg:
dd if=/dev/sdb1 of=~/partition_01
where /dev/sdb1 is the first partition on the drive sdb. /dev/sdb2 is
the second, and so on.
If dd gives errors, then I would apt-get install ddrescue, then read
up on 'man dd_rescue'. I've mainly used this on CDs, but I've also
recovered data from a hard drive once, and it performed fairly well.
If the disk is badly damaged, it may take quite a while to complete
though.
If you can get dd or dd_rescue to complete, you should then have a
copy of the broken disk's partition(s) stored on your machine. Using
dd to write that right back to a disk can mess up the partition table,
so I would mount your copied partition like:
sudo mount -t auto -o loop ~/partition_01 /mnt/<somewhere>
And then copy the files to wherever their final destination may be -
either through the GUI or cp -R *
Again - I'm no guru, but I've used these methods before, with a minimum of pain.
Hope this helps,
Chris
More information about the ubuntu-users
mailing list