2

I have an imaged (clonezilla) system image of a Ubuntu setup with a bunch of settings. Now I am wondering, what needs to be changed if I use the clonezilla image to create always new systems from this image.

The things, which I can immediately name are: - host ssh key need to changed - hostname

what commands should I use (preferable also working on centOS) to modify the upper points?

What other things do I have forgot to fix/change?

Under windows I know the sysprep tool..

3
  • Does Ubuntu not have sys-unconfig? – Ignacio Vazquez-Abrams Mar 31 '18 at 15:22
  • @IgnacioVazquez-Abrams did not find it here: packages.ubuntu.com What OS provides it? – cilap Mar 31 '18 at 16:09
  • Solaris and Linux, among others. It's a very old convention. No idea why Ubuntu would have chosen not to include it. – Michael Hampton Mar 31 '18 at 16:52
2

Look at http://manpages.ubuntu.com/manpages/precise/man1/virt-sysprep.1.html . It`s a bash script to reset/unconfigure a vm so clones can be made.

1
  • Welcome to ServerFault. Please try to include a few more information on the actual tool (here virt-sysprep), because the links may not always available after a few years / decades later. – Pothi Kalimuthu Apr 1 '18 at 3:27
1

If you intend to deploy the image in the same network you should check if you have a static ip address on /etc/network/interfaces and change, if necessary, the configuration for a another ip address in the new system cloned to avoid conflicts whith the other hosts.

(Copy and paste an example): sudo vi /etc/network/interfaces

To configure a dynamic IP address

auto eth0 iface eth0 inet dhcp

Or configure a static IP

auto eth0 iface eth0 inet static address 192.168.1.14 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255

For these settings to take effect you need to restart your networking services.

sudo /etc/init.d/networking restart

enter link description here

If you intend to change the name of the User for a NewUser you should take in consideration this link: change username

Cheers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.