How to Clone a Gentoo Workstation

Nov 22 2013

Installing Gentoo Linux across all Pentium 4 machines for DataMill was an easy process. I copied an existing installation across hard drives. While installing Gentoo on the source machine, I had -march=pentium4 in make.conf while I would recommend i686 or x86_64 for a generic install that can be copied over a large number of machines. I follow the same steps as, with slight modifications.
DataMill benchmark cluster
On the source machine, I boot up the System Rescue CD and resize the last partition of the install to fit the hard drive size. I also have netcat compiled and uploaded to my site. I run

ifconfig -a

to find out its ip address. Before I start the cloning process, I also change the hostname.

mount /dev/sda3 /mnt/gentoo #sda4 is the partition for /
vim /mnt/gentoo/etc/conf.d/hostname
umount /mnt/gentoo
dd if=/dev/sda conv=sync,noerror bs=1024 count=30000000 | ./nc -l 0 -p 5000

On the destination machine, I boot the Gentoo Live CD, download netcat, and listen to port 5000.

net-setup eth0 #your network interface may vary
chmod +x nc
./nc 5000 | dd of=/dev/sda bs=1024

Replace the IP address with the one you obtained from the source machine.
Resize partition with System Rescue CD

No responses yet