Subject: Re: EZ-Clone?
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Don Yuniskis <auryn@gci-net.com>
List: port-sparc
Date: 11/27/2001 17:38:50
Greetings and Matriculations! (?)
>Brian Buhrow barked:
> Hello Don.
>My favorite way to do this, without using identical disks is to
>perform the following steps. We assume here that you have a working
>machine running NetBSD which is of the same architecture as the
>machine you want to install.
Hmmm... presumably becasue you are copying a binary off of
the working system and onto the "target" system (in step 5)?
Would endian-ness screw things up (assume m68k <-> i386,
for example) if you tried to use dd(1)? (I haven't yet explored
the "ENDIAN" option in the kernel...)
>1. Boot the fresh system with the install cd or floppies.
>2. Disklabel and newfs the hard disk on the system to taste.
>3. Ifconfig and otherwise setup networking so that you're
>able to exchange traffic with the working system.
>4. Make sure rsh from the new system to the working system works.
>Use rsh <working> date to test. You may have to edit /etc/hosts or
>/etc/resolv.conf on the system you're trying to install in order to
>get things working.
OK so far...
>5. Copy /sbin/restore from the working system to your temporary
>root drive.
Hmmm... at this point, isn't my / really MFS?
I'll have to verify restore is statically linked...
I assume I can just
mount /dev/fd0a /mnt
cp /mnt/restore /
umount /mnt
Or, I guess I could copy it using ftp...?
>6. Mount your newly newfsed disk on /mnt.
>7. Create a symlink from /tmp to a new /tmp directory on your newly
>mounted /mnt partition.
Hmmm... why? Oh, perhaps restore likes to scribble there
as a staging area?
>8. Now run something like the following to do the transfer.
>
>cd /mnt
>rsh <working system> /sbin/dump f0 - /dev/rwd0a |</path/to/restore> rf -
I don't understand the role of "f0" arg to dump? (sorry, I don't
use it!) <:-(
>If you have more than one filesystem on the working system that you
>want to clone, make sure you dump each one in turn. Before you dump, be
>sure to cd to the directory on your new system where the filesystem was
>mounted on the working machine. For example, if you have /usr on the
>working system, and it is a different filesystem from /, then cd /mnt/usr
>on your new system before running the dump |restore pipe as shown above.
I assume the file system(s) in question shoul dbe reasonably quiescent?
>9. Run /usr/mdec/installboot on your new system, or whatever you need to
>do to make the disk bootable.
>10. Edit /etc/fstab and make sure the disk partitions and names are
>correct.
Understood.
>Hope this helps.
Argh! I'll *try* and see ho wbig a mess I make! :-/
Perhaps I should archive a tarball to tape just to be safe... :>
Thx!
--don