Subject: Re: Backing up trees for reinstall
To: NetBSD users list <netbsd-users@netbsd.org>
From: David S. <davids@idiom.com>
List: netbsd-users
Date: 04/12/2002 13:24:07
>
> I would like to move my NetBSD installation from wd1 to wd0. The problem
> is that this task is very tedious, but the worst thing is that it is
> relatively slow in my computer.
>
> The slowest things are compiling X11, all the packages I have in /usr/pkg,
> and the like. So, I would like to copy my current /usr/X11R6, /usr/pkg and
> /usr/local to my new installation.
>
> For /usr/X11R6 I think there will be no problem. I'm using xpkgwedge, so
> this directory only contains X11 base system. For /usr/pkg, I think I'll
> also have to copy /var/db/pkg. Although... shall I copy the entire /var
> directory to the new install?
If you just want to move your installation from one disk to another on
the same machine, you shouldn't have to re-build anything. The most
efficient way is to use dump/restore. From single-user mode, mount your
new partitions somewhere
mount /dev/wd0a /mnt
mount /dev/wd0c /mnt/usr
... etc., then
cd /mnt; dump 0uf - / | restore -rvf -
cd /mnt/usr; dump 0uf - /usr | restore -rvf -
... etc. Edit the new "fstab" to reflect the new partitions, install the
boot block (assuming i386), set your BIOS to boot from the new disk, and
you're done.
David S.
>