Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Jan 1999 18:55:23 -0600
From:      David Kelly <dkelly@hiwaay.net>
To:        joe@krisberg-haines.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Copying Hard Drives 
Message-ID:  <199901060055.SAA36312@nospam.hiwaay.net>
In-Reply-To: Message from joe@krisberg-haines.com  of "Tue, 05 Jan 1999 08:42:00 CST." <3.0.5.32.19990105084200.00899820@krisberg-haines.com> 

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

joe@krisberg-haines.com writes:
> I need to copy FreeBSD to another hard drive.  Does anyone know the easiest
> way to do this?

This question seems to be popping up quite a bit lately now everybody 
got new HD's for Christmas.

1) Install your new HD and partition it with Microsoft's FDISK.EXE.
   This seems to prevent geometry issues with some combinations.

2) Boot FreeBSD and use /stand/sysinstall to make FreeBSD partitions.
   And make the filesystems while you are in there using the same 
   partition names as your old system. Let sysinstall write boot blocks 
   on your new drive.

2a) Its best at this point to reboot into single user mode. Don't mount
   any filesystems other than root.

3) Mount the new root partition somewhere such as /mnt

4) "dump -0af - / | (cd /mnt; restore -rf - )"
   The above should create the mount points for the rest of your
   filesystems to be used when looping thru steps 3 and 4.

5) Repeat steps 3 and 4 for each of your FreeBSD filesystems.

6) Don't forget to do the /var filesystem, that's the one I keep 
   forgetting.

7) Shutdown and put the new HD in the place of the old. If you don't
   maintain the same partition names for FreeBSD as the old, then
   you should edit /mnt/etc/fstab to use the new partitions before
   leaving the old disk.

Example: /dev/sd0s2g is my /home partition. If I were to mount another 
drive to copy my running FreeBSD system to, I'd want to make sure
/dev/sd1s2g is the new /home partion mounted on /mnt/home. Then when 
the original disk is removed the new disk will become /dev/sd0s2g and 
all will be OK once again. But if for some reason I put /mnt/home on
/dev/sd1s2h instead then I'd better fix /mnt/etc/fstab before moving 
the HD's around.

--
David Kelly N4HHE, dkelly@nospam.hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.



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?199901060055.SAA36312>