Nov 2, 2010

Cloning the Linux Machine through Network

Cloning the Linux Machine through Network




Release:

Redhat Enterprise Linux

CentOS

Fedora



Problem:

Ghosting the Linux server without third party software



Solution:

Assumption:

a) New server ipaddress 172.16.1.247

b) Running server ipaddress 172.16.1.248



In new machine side Configuration:



1) Booted into the rescue mode

2) Enable the networking option

3) Give the below command to make dd command listening to port 30 for input,

# nc -l -p 30
dd of=/dev/sda



In running server side configuration:



4) Dump the content of the disk to the target pc though port 30 using the following command,

# dd if=/dev/sda
nc 172.16.1.247 30



5) Then to check that traffic is flowing, on the source machine go to another terminal (ALT/F2) and dump the tcp data on the NIC (assuming it's eth0)

# tcpdump -tnli eth0 port 30



Note: Assuming that Network controller driver is available in default OS Kernel.

No comments: