Copying A Disk
Chris Mohler
cr33dog at gmail.com
Sat Jul 12 18:53:43 UTC 2008
On Sat, Jul 12, 2008 at 1:31 PM, Pete Holsberg <pjh42 at pobox.com> wrote:
> Chris Mohler has written on 7/12/2008 1:34 PM:
>> On Sat, Jul 12, 2008 at 12:21 PM, Karl Larsen <k5di at zianet.com> wrote:
>>
>>> What you do is this:
>>>
>>> $ sudo fdisk /dev/sda and if that fails try sdb and so forth. I would
>>> expect it to be sda because windows likes to be in the first partition :-)
>>>
>>
>> Wrong. /dev/sda ~= /DEVices/ScsiDiskA. Meaning "sda" denotes the
>> first drive, "sdb" is the second drive, and so on. Whether or not
>> windows prefers to be installed in the first partition of a drive has
>> no relevance here - this is not a dual-boot setup, but a full XP MCE
>> install that has gone bad - likely due to hardware failure
>>
>
>
> Yes, hardware failure. I said that, didn't I?
>
> So if sudo fdisk /dev/sda is wrong, what is right?
Yeah - sorry. That bit was aimed at Karl, who is muddying things up a bit.
You posted this line from your log:
Jul 11 21:32:36 Ubu kernel: [ 5816.770911] sd 2:0:0:0: [sdb] Attached
SCSI disk
So running:
sudo fdisk /dev/sdb
and entering 'p' should show you the partition table. If you've
unplugged/replugged or left it idle, you may want to unplug/replug
once more and look at the tail of /var/log/messages and make sure the
device is still being attached at /dev/sdb. Look for the "Attached
SCSI disk" message like above.
If you can't get fdisk to read the disk/partitions, that's bad news.
At that point I'd run dd_rescue against the whole disk and cross my
fingers (ddrescue /dev/sdb ~/disk_image). If you get enough data, you
could then use dd to write the disk image directly to another hard
disk - but be sure that the target drive contains nothing that you
want to keep!!! Writing the disk image directly to disk will
overwrite anything on the target disk, including the partition table.
And of course the target disk needs the same or greater capacity than
the original, damaged disk.
Hope this makes sense, and good luck.
Chris
More information about the ubuntu-users
mailing list