Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 1999 11:25:42 -0700
From:      Greg Shenaut <greg@bogslab.ucdavis.edu>
To:        questions@FreeBSD.ORG
Subject:   Re: Moving OS to a new disk 
Message-ID:  <199904301825.LAA04796@deal1.bogs.org>
In-Reply-To: Your message of "Fri, 30 Apr 1999 10:54:27 CDT." <199904301548.KAA29338@cdale3.midwest.net> 

next in thread | previous in thread | raw e-mail | index | archive | help

If you have two drives with identical geometry, then you can just
use dd(1) to copy the exact source drive to the exact destination
drive.  You should use the device nodes that mean "the whole raw
device, including all fdisk and bsd partitions".  I do this with
a tape drive intermediate step to clone systems in our lab, which
all include a DOS partition as well as the BSD stuff.  You shouldn't
have to change boot blocks or labels or partition tables or anything
else--the new disk will be an exact clone of the original.

In my case, since the clones are ending up in different machines,
I have a short list of changes to make in /etc/rc.conf and a few
fixes of bugs that revealed themselves after I made the master
tape, but you shouldn't even have to do that, if you are just
replacing a flaky drive in the same system.

I would suggest doing this in single user mode and just after
a "sync", to cut down on the problems that fsck will find when
you boot the new disk: to fsck, it will seem as if you just
turned off the machine at the point the copy was made.

As for making backups, you *always* should make backups, but
there is no great risk in this procedure, because you aren't
altering the source disk.

-Greg Shenaut


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904301825.LAA04796>