Subject: Re: migrate system
To: None <netbsd-users@netbsd.org>
From: Marton Fabo <morton@eik.bme.hu>
List: netbsd-users
Date: 02/10/2003 14:21:56
> I don't know, if it's recommended, but I did it this way:
>
> - Install new disk
>
> - fdisk and label it as needed (fdisk(8) and disklabel(8))
> eg: disklabel wd1 >disklabel.wd1
> vi disklabel.wd1
> disklabel -R -r wd1 disklabel.wd1
>
> - make the filesystems with newfs(8)
> eg: newfs /dev/wd1a, newfs /dev/wd1e, newfs /dev/wd1f ...
> (assuming wd1a=/, wd1e=/usr wd1f=/var)
>
> - make it bootable with installboot(8)
> eg: /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/rwd1a
>
> - mount the new filesystems and copy data over
> eg. (assuming you have /, /usr and /var filesystems):
So far, this is roughly what I tried.
> mount /dev/wd1a /mnt
> (cd /; tar -lpcf - .) | (cd /mnt; tar -xpf -)
>
> mount /dev/wd1e /mnt/usr
> (cd /usr; tar -lpcf - .) | (cd /mnt/usr; tar -xpf -)
>
> mount /dev/wd1f /mnt/var
> (cd /var; tar -lpcf - .) | (cd /mnt/var; tar -xpf -)
This is also what I did, with some refinement. I used also -P
--same-owner for tar, to keep the copy as similar to the original as
possible.
It always complained though about inability to link to non-existent
files. It seems that the base NetBSD uses hard links, which have to be
linked in the right order, or something similar. What may the exact
reason be?
mortee
PS.: I'm trying now the cpio method, and see if it works better.