Cloning a Linux machine

Initial Setup

Clone the new hosts HDD from an existing one and proceed to make the changes listed below:

In your editor of choice, edit /etc/hostname and /etc/hosts and replace the old hostname references with the new one.

In your editor of choice, edit /etc/udev/rules.d/70-persistent-net.rules and remove all network device references, usually last two lines.

Remove old ssh keys

rm /etc/ssh/ssh_host_*

Generate new ssh keys

dpkg-reconfigure openssh-server

Stops the ssh daemon launched by dpkg-reconfigure

/etc/init.d/ssh stop

Adjusting the time

Use %p locale’s equivalent of either AM or PM, enter:

date +%T%p -s "6:10:30AM"

Reboot the machine

reboot
Advertisements

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s