[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Cloning" a hard drive...
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: "Cloning" a hard drive...
- From: Carson Harding <harding_(_at_)_motd_(_dot_)_ca>
- Date: Thu, 24 Jun 2004 14:17:29 -0600
- Organization: /etc/motd
On Thu, Jun 24, 2004 at 12:58:39PM -0700, Matt Provost wrote:
> 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
- for some reason /dev/wd?c doesn't sound like the right thing; likely
because that's the whole drive (for the dd attempt, sure; for the
dump/restore or for mounting, no).
- you will need to fdisk and disklabel the drive
- you will need to do dump/restore for each slice
- you will need to install boot blocks on that cloned drive (installboot).
In the original case, you tried "mount /dev/wd1c /mnt/wd1", but did you
try "mount /dev/wd1a /mnt/wd1"? (Yes, /mnt/wd1 must exist.)
--
Carson Harding - harding (at) motd (dot) ca
Visit your host, monkey.org