Clonezilla and DRBL – Cloning Instances

My ongoing project has been a learning experience for me. One of the areas I’ve played in more than a few times is building installers for Linux but this time I wanted to create a way to clone systems from a master image at 5 to 10 at a time. The image I need to clone is Linux and I wanted to only use open source tools. I ended up over at Clonezilla reading about DRBL and clonezilla server there. Here is the basics of it on Linux:

  1. Setup a linux system to act as a server and install the clonezilla packages. I chose to use Ubuntu 8.04 since its very stable for me. I used a Intel Core Duo with an Intel motherboard and 8g of memory in a micro-ATX form factor.
  2. Install the relevant bits and bytes for clonezilla. Be sure to follow all the howto information. Run the scripts called drblsrv and drblpush to set things up.
  3. Capture an image you wish to use from a system. This saves it on disk.
  4. Now decide how you want to serve up the image. You can use multicast, broadcast, and unicast. I chose multicast and then had to get a switch that was a bit better. I settled on a Layer 2 dlink switch. Remember to add in support for UDP Multicast on port 2232 I believe it is in /etc/services. If you don’t do this, multicast will just fail. This one got me for a few days.
  5. Now set a machine to PXE boot after its all configured. Whammo! I get 5 systems cloning at the same time and they’re done in 15 minutes.

Next step for me is on a second ubuntu box I setup to do some intensive rsync’ing using no SSH, no compression, etc. But the basic clone is done and you have a working linux box. I’m cloning an rPath Linux distribution from Ubuntu AMD64 and it works a treat! I also do some post install configurations and error checking to ensure I’ve got the correct bits.

If you want a working cloning solution, give Clonezilla a try. You can get things up pretty quickly. Its free too!

This entry was posted in Ideas, Linux. Bookmark the permalink.

Comments are closed.