Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When cloning Windows systems, it's fairly well-known that one should run sysprep before creating an image. This way, when the machine starts up, it will reconfigure itself for its new environment: re-generate machine SIDs, install appropriate drivers, create initial user accounts, etc.

I have less experience with Linux machines, so I ask: what sort of pre- or post-cloning actions should be taken when cloning Linux machines? I haven't found any mention of it online, it this because I'm not looking hard enough or because it's just not a necessary step with Linux machines? I'm particularly interested in Ubuntu Server and Desktop since those are what I'm toying with, but I don't know how much the distribution matters for this question.

Obviously I'd want to change the hostnames, and I don't expect a comprehensive list of every software that might need to somehow be reconfigured, but are there any common system settings or software packages that need reconfiguration when being imaged?

share|improve this question
I feel compelled to point out that, despite considering myself a windows power user from about 1994 to 2005, I have never heard of sysprep and slaved through many one-folder-and-driver-at-a-time windows system clonings. –  Sparr Nov 5 '10 at 9:49

3 Answers 3

up vote 7 down vote accepted

For Linux this depends upon the cloning software and OS used (Ubuntu in your case), but any static settings relating to network interfaces is a big one. IPs and (sometimes) hardware addresses will be stored in text files in the event of static addressing which you will have to change.

In Red Hat-based distros there is a tool called sys-unconfig which will undo these types of settings to prepare it for reconfiguration, although I'm not aware of an Ubuntu equivalent. There aren't really "SIDs" in a Linux environment, so sysprep tools aren't really needed. The closest thing to a SID would be stored in the SAMBA files under /etc for remote administrative connection purposes, which you can modify. Likewise you will need to regenerate any SSH keys if you had any created.

share|improve this answer
I hadn't thought of SSH keys, that's a good point. –  Stephen Jennings Nov 5 '10 at 6:47
You'll probably have problems with the UUIDs in /etc/fstab, too. You might want to switch back to the older /dev/sda format. –  charlesbridge Nov 5 '10 at 11:33
The hostname (/etc/hostname) and the ssh keys (which are also the machine's identity) are the two things you will always need to change. What else must be changed depends on the hardware (most of the time, only the video settings need to change) and the network configuration (highly variable). –  Gilles Nov 5 '10 at 21:17

I really should be adding this to John's post, but since I do not have points to comment everywhere...

/etc/cups/cupsd.conf for network printers. password files for VNC is also important.

Having said that, the prepare-whatever step is mostly a MS windows issue.
Unless written in a very evil way, applications should, and must have data (the config) and code (the binary executables) separated in a clean manner.

Not recommended at all, but once I had a situation where cloning by
dd if=/dev/$disk |nc X.X.X.X Y to dest nc -lp Y > /dev/$disk
had to be done, on diffrent hardware (although same CPU arch), and it still worked.
Separation of your config file is a important thing.

For mass deployment, you might get clonezilla to work nice. Good old PXE boot Installation works as well. SystemImager has articles that fits the job discription How to back up an ubuntu 8.10 system with SystemImager
clonesys fully-automated-installs And finally Ubuntu Installation Help

Basically, most of these will have automated ways one way or another to do most of your job, like network config, DNS resolvers, sync time, etc, etc...

The oddball I had experienced recently was with firewall configuration files. Do not forget them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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