Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Kind-of like this question but slightly different (I think), in that I have 6 identical Acer Aspire Revo R3610 machines. One is (almost) configured to my requirements - when I'm done preparing it I'd like to make the other 5 machines absolutely the same. I'm very new to Ubuntu, what's the most straightforward (easiest) way of doing this?

The machines are going to live on different networks if that might otherwise be a problem (eg with Windows you can clone disks but you then have to make registry changes afterwards if they're going to run on the same network etc). The hardware in all 6 machines is, I stress, the same!

How can I efficiently clone one source image on to these identical machines?

Please restrict one software/solution per answer

share|improve this question

closed as too broad by Braiam, Javier Rivera, Mitch Apr 30 '14 at 7:16

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

10 Answers 10

up vote 23 down vote accepted

Clonezilla sounds like it fits your needs

share|improve this answer
Totally the right tool for the job. My Mum runs 'Mumbuntu' and I take a snapshot of her Acer Revo periodically using clonezilla and take it home to restore on a Revo I own as a backup. Works a treat. – popey Aug 20 '10 at 14:39
Thanks, I'll have a go with this one over the weekend. – robsoft Aug 20 '10 at 15:42
One benefit of using tools like partimage and ntfsclone (which is what Clonezilla uses to create the disk image) is that they understand the underlying filesystem on each partition, which allows them to copy only used blocks. As dd does not have this functionality, it must copy every byte of the partition, regardless of whether or not it is used. – Evan Oct 10 '10 at 19:21
It sucks. Failed to clone after two days work. Hangs on alculating bitmap... Use Windows and Acronis Trueimage – Olcay Ertaş Sep 12 '11 at 5:10
Will DD not make the bootable backup CD? Is that the reason use CloneZilla? – YumYumYum Nov 16 '11 at 16:17


A low level copy using dd would do the trick!

Watch out for conflicting IP addresses and hostnames.

Basically put the source drive and destination drive in the same machine, boot into a live cd. And run something like the following where /dev/sda is the source and /dev/sdb is the destination:

dd if=/dev/sda of=/dev/sdb bs=4096

I remember the operands by:

if -> input file

of -> output file

bs -> block size (how many bytes to read at a time)

share|improve this answer
Sure why not? =/ I've seen people do that and I've seen people not do it. Is there a style guide somewhere to answers? – Derek Aug 20 '10 at 14:28
if you have Dynamic IP enabled, temporary before making that Bootable/backup CD/USB. There should not be any issue i believe for conflicting IP. As long as it back up A to Z that really matters to me, because of lot of drivers i had. – YumYumYum Nov 16 '11 at 16:15
How safe is this, considering any public/private keys used by for example OpenSSH would be identical? What would we need to change to keep the system safe (different where we wan't it to be different)? – jos Aug 24 '12 at 18:58


Another great cloning utility which I've used, as well. Features a terminal gui.

share|improve this answer
this is include in system rescue cd -> – hhlp Oct 18 '10 at 13:35

Create an image using Remastersys, transfer it to a pen drive using the Startup Disk Creator utility and install on other system.

share|improve this answer

I would get one computer all the way you want it, and install the openssh-server package. Generate a ssh key pair with ssh-keygen -t rsa. Add the public key to /root/.ssh/authorized_keys2. Then I would boot the new computers with a live cd and plug in a usb stick with the ssh private key. Use gparted to create a new partition. Then mount the new partition and run something like sudo rsync -avzx -e "ssh -i /media/disk/path/to/privatekey" --exclude=".gvfs" root@<ImageComputerIP>:/ /path/to/new/partition/

Use the blkid command to find the UUID of the filesystem you just created. Edit the /path/to/new/partition/etc/fstab to reflect the new UUID (and filesystem type if you used a different filesystem.)

Then I would follow the instructions on about how to install from a chroot.

A simplified version of that page (which doesn't account for lvm, software raid, or bcache, or separate /boot like the wiki page does):

Mount the critical virtual filesystems. Run the following as a single command:

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

Chroot into your normal system device:

sudo chroot /mnt

Reinstall GRUB 2 (substitute the correct device with sda, sdb, etc. Do not specify a partition number):

grub-install /dev/sdX

Recreate the GRUB 2 menu file (grub.cfg)


Exit chroot: CTRL-D on keyboard

By the way, this works good for backup, too. Ubuntu, unlike Windows, doesn't seem to have problems being transplanted to different hardware. I've put hard disks from one computer in another and it did fine, and I've copied installs to different hardware and it did fine.

share|improve this answer
Thanks for this - I've got another one coming up shortly, I'll give this a try. Cheers – robsoft Mar 7 '11 at 12:30
The referenced link currently doesn't mention chroot nor any methods. That's why it is a good idea to quote relevant parts of your sources. – Henno Jan 30 at 15:31
@Henno The wiki page was moved. The problem with including the page is that the wiki keeps up to date with new things like bcache and just copying the contents of the page will miss those updates, but the downside to just linking that is stuff can move on you. Either way, link updated, and a stripped down version included. – Azendale Jan 30 at 22:29


Ghost for Linux

Ghost for Linux is a hard disk and partition imaging and cloning tool similar to Norton Ghost(c) and (tm) by Symantec. The created images are optionally compressed, and they can be stored on a local hard drive or transferred to an anonymous FTP server. A drive can be cloned using the Click'n'Clone function. g4l supports file splitting if the local filesystem does not support writing files >2GB. The included kernel supports ATA, serial-ATA, and SCSI drives. Common network cards are supported. It is packaged as a bootable CD image with an ncurses GUI for easy use.

share|improve this answer

I use ddrescue for exactly this task. It works flawlessly. Super simple.

share|improve this answer

Having never done been in this predicament (I don't have hundreds of servers - I've always just used base images), I can only give you my gut instinct.

That aside, I would say netboot is probably your best bet. Create a master server, get it doing what you want and then have all your other machines boot and install from it. Scripting things to happen automatically (ala run-once) shouldn't be too hard. You do all the secondary things through kickstart.

More (although it's a little old):

Edit: There's an application called system-config-kickstart that should help make generating the kickstart file quite a bit easier. YMMV.

alt text

share|improve this answer
As far as I know this system-config-kickstart is made specially for fedora. – Shaharia Azam Feb 18 '14 at 20:22

Another option for mass-installs is the Ubuntu Landscape/private cloud approach where you (basically) provision servers dynamically based on a pool of hardware. Clever stuff.

share|improve this answer

The easiest way to do this is to run a bare bones Ubuntu installation on your hard drive, install VirtualBox and set up a virtual Ubuntu machine. Run your virtual machine and set up that installation just like you want it with all the bells and whistles you want. Do all of your working and playing on the virtual computer.

VirtualBox maintains the virtual machine as a large disk image file (.vdi) along with a few other much smaller configuration files. Whenever you want to backup your virtual machine, just shut it down and copy its directory to your backup location. I use a Passport external drive for this purpose.

Right now, there is both a Windows 7 and an Ubuntu 12 virtual machine on that external drive. All of the system updates, programs, personal files, pictures, whatever, get saved in those virtual machines. A backup of this type is very fast, as one big disk image file will transfer much quicker than a bunch of individual files would. Since VirtualBox maintains the files in that format all the time, the virtual machine is always configured to be backed up.

One advantage of that setup is that I can run those virtual machines off the external drive on any computer with VirtualBox installed, so now, instead of lugging my computer all around, I just bring my external drive with both Windows and Ubuntu, install VirtualBox on whatever computer I plan to use (I have all the VirtualBox installation files also on my external hd - they are available for all the main operating systems), and I am ready to go. I can either copy my virtual machine to the computer I am using, or just run it off of the external drive.

If your computer crashes and dies at some point, who cares, you just grab your Ubuntu installation disk, install it on your new or repaired computer, hook up your external drive, install VirtualBox, and copy your virtual machines back on to your computer - problem solved with minimal stress, loss of time, and loss of data. How much data you lose depends on when you last backed up. For myself, I do a new backup whenever I make a major change or add a hard to get program. Just make sure that your virtual machine is operating normally when you do it. You would not want to copy a corrupted machine over a good one.

And no, I don't work for VirtualBox.

share|improve this answer

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