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

Re: "Cloning" a hard drive...



On Jun 24 11:40 AM, John Draper wrote:
> Hi,
> 
> In an attempt to "clone" a hard drive,   I connected a 2nd empty
> unformatted drive to my box and started it up.
> 
> The command I used...
> 
> dd if=/dev/wd0c of=/dev/wd1c bs=1028
> 
> Seems to have worked.  I got no errors,  and the operation took about
> 3 1/2 hours.
> 
> I checked the /dev directory,  and confirmed it has a wd1c,  and the
> 'dmesg' also showed it got detected.
> 
> After the copy,  I removed the original one,  replaced it with
> the cloned one,   but when I tried to boot it up,   I got
> the "No OS Found" BIOS error.
> 
> Next I looked on the drive to try and set it up for "master" mode,
> but have no clue on what combination of settings I would need.
> 
> The drive I'm cloning to is a 40 gb Maxtor,  And the original disk
> I'm cloning FROM is a Western Digital - both are 40 gb.
> 
> I thought about mounting the cloned drive to see if I can find
> the individual files,  but I just can't find an example of the "mount"
> command I can use to test this...
> 
> I tried:
> 
> mount -t ffs /dev/wd1c /mnt/wd1
> 
> But it came back with no such file.   Does this mean I have to go into
> /mnt directory,  and create a mount point directory like this?
> 
> cd /dev
> mkdir wd1
> 
> Then do..
> 
> mount -t ffs /dev/wd1c /mnt/wd1
> 
> I really don't feel good about doing this kind of stuff,  especially 
> since I
> don't know what I'm doing,  and can use some help here.
> 
> John

dd is probably fine if the disks are identical, but it doesn't look like
they are (different brands). I'd use dump and restore instead since it
just deals with the filesystem and can handle any necessary conversions
to underlying disks.

So just dump to stdout from one partition and pipe it to a restore
pointed at the other one.

First newfs /dev/wd1c and mount it somewhere, /mnt/tmp or something.
Then cd into /mnt/tmp and run:

dump 0f - /dev/wd0c | restore rf -

or something like that (check the man pages - I can't test it here).

Matt



Visit your host, monkey.org