Quick custom Linux live CDs for workshops

People bring all kinds of laptops to workshops, and installing your software on them might take hours.  So it’s nice to just give everyone a bootable USB stick or CD, containing a live linux distribution (i.e. one that runs straight from the USB stick/CD) and the software.  This can get a room full of people up booting into an identical system in a matter of minutes.  Here’s an easy way that I’ve found to do it:

Choose your base distribution

For workshops, I like Linux Mint LXDE edition. It’s lightweight so works with less powerful machines that people might bring, and is based on Ubuntu.  There’s also a debian based edition of Linux Mint which is great, but it only comes in DVD size which doesn’t fit on cheaper USB sticks, and the customisation process takes long enough compressing a CD’s worth of OS.

Whatever version of linux you choose, download the .iso file of the installation CD or DVD.

Load the .iso file in a virtual machine

Install VirtualBox OSE, create a virtual machine with enough disk space for what you want to do, and set the CD of the virtual machine to point at the .iso you downloaded.  Then start the virtual machine, install the distribution to it, and boot into it.

Customise the OS

Install everything you need for the workshop.  You might want to remove some stuff too, especially if you want everything to fit back onto a CD.

Create a new .iso

Install remastersys and run this command:

sudo remastersys backup

This takes a fair few minutes to run, but is fully automated.  You end up with an .iso that is a live CD of the system you’ve customised.  Remastersys is really the hero there, I’ve gone through a manual process before and it was painful.

I have had one strange problem with running this under linux mint lxde — failed boots due to lack of ubninit.  For USB keys this is easily fixable by grabbing the initrd file from /boot in the virtual machine, and copying it into /ubninit on the USB key.  Not sure how you’d do it for CDs and DVDs, I guess you’d have to edit the .iso somehow.

Burn to CD or USB keys

I really recommend USB keys, I’ve found booting from CDs really slow on some machines, especially those apple mac laptops for some reason…  Plus a lot of laptops and netbooks don’t have CD drives these days.  To burn an .iso to USB I recommend unetbootin.  Be sure to unmount/eject/”safely remove” the USB key properly before removing it. **update** It seems Macs can’t boot from a USB key without hassle, so you have to burn CDs for mac people, or get them to buy a better computer.

TL;DR

Install an .iso distro into a virtualbox, get it right there, then use remastersys to make a new iso and burn to CD, or preferably write to USB keys with unetbootin.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>