Subject: Re: moving the OS between disks
To: None <wojtek@3miasto.net>
From: David Burgess <burgess@mitre.org>
List: port-i386
Date: 05/01/2001 14:34:45
wojtek@3miasto.net wrote:
> 
> > NetBSD uses the whole disk (3 partitions, root, usr and swap). IDE is
> > slow, and I have a SCSI2 disk that I would like to use instead.
> >
> > What I'm wondering about now is: Can I just make 3 partitions on that
> > disk, e.g.: root 200MB, swap 128MB, usr 4GB, make the repective
> > filesystems on those partitions, and copy the OS with cp from onedisk to
> > another, and throw away that IDE junk once and for all?
> yes. but you need to
> a) do installboot
> b) don't forget to use -pR options for cp

Instead of cp -pR, I prefer to use something like the following:

# mount /dev/sd0a /mnt			# assuming /dev/wd0a is /
# mount /dev/sd0e /mnt/usr
# find -x / | cpio -pdmuv /mnt
# find -x /usr | cpio -pdmuv /mnt

This way, you don't accidentally descend into the /mnt directory copying
stuff to the /mnt/mnt, then /mnt/mnt/mnt, then /mnt/mnt/mnt/mnt
directories.