Clone

 

Overview

After cloning a RHEL or SLES server you must reconfigure networking. The MAC address changes during the cloning process and since it is tightly integrated into the start scripts, eth0 will fail to start.

Procedure

RHEL

At the shell, type "netconfig" and follow the prompts.

Use system-config-network for RHEL 5 and up.

SLES

With Yast:

Using yast you must go to security and remove the firewall, then go to network and un-configure the network card. A reboot is now required, though you may be able to re-config the network manually. Now go back into the network card config and configure it again, then go to firewall config and select the new listing from the drop down box.

Other methods appear to work, but are not saved from re-boot to re-boot.


Here's a way to clone over the network

Reader Bob Hart submits the following tip, which is very useful and surprisingly powerful for its size… I have used the following on a Suse SLES 9 system to make five exact copies of my original server. On the new server insert the Installation CD and boot to Rescue mode. Use root to login at the "Rescue" prompt. Run the following commands:

  1. ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up
  2. ping –c 3 192.168.1.101
  3. netcat –l –p 9876 | dd of=/dev/cciss/c0d0
The ping command simply checks connectivity to existing server. Then, on the existing server… Login as root Run dd if=/dev/cciss/c0d0 bs=4M |netcat 192.168.1.100 9876
To clone a disk (of any type) you can always use the dd command (digital dump). Just insert a knoppix cd and at the root console type:
dd if=/dev/hda of=/dev/hdb
To monitor it's progress:
while [1]; do kill -USR1 $pid; sleep 30; done;

Comments