Copying A Disk
Derek Broughton
news at pointerstop.ca
Sat Jul 12 17:16:36 UTC 2008
Marius Gedminas wrote:
> On Fri, Jul 11, 2008 at 06:52:12PM -0400, Pete Holsberg wrote:
>> I have a disk that is not accessible in Windows and it was suggested
>> that I could copy it in its entirety using
>>
>> "dd noerror if=/dev/hdX of=~/filename" where hdX is the drive and
>> filename is the name for the copy.
>
> I believe that should be "dd conv=noerror", note the 'conv=' bit in
> front of 'noerror'. Also, in modern systems it's often /dev/sdX instead
> of /dev/hdX.
>
>> How do I know what X is?
>
> Use lshal (or the graphical device manager) and search for your disk.
> For example, a 120 GB Hitachi disk is shown on my laptop as
>
> udi =
> '/org/freedesktop/Hal/devices/storage_serial_1ATA_HITACHI_HTS541612J9SA00_SB2D51EVG60DLE'
> block.device = '/dev/sda' (string)
And, also, is it the whole disk, or a partition on the disk? (e.g., if your
drive is being used for dual boot with Linux and Windows, and it's only the
Windows part that isn't working, then you only care about the partition).
In any case, it will probably be partition 1 for any Windows file system.
>> How do I edit the resulting file?
>
> What does it mean to "edit" a disk image?
>
> If you made an image of a filesystem rather than the whole disk (i.e.
> used /dev/sdXY where X is the disk letter and Y is the partition
> number), then you could mount it with
>
> mount -o loop,ro filename /mnt/mnt
>
Of course, he might just try mounting the disk's partitions directly under
Linux, and seeing if he can still read them. I've found with failing
drives, that it's often possible to read them very well (for a while) when
mounted as read-only filesystems, rather than trying to run an operating
system off the disk at the same time.
--
derek
More information about the ubuntu-users
mailing list