Saturday, September 26, 2009

Making a Custom Ubuntu USB Live Stick with Remastersys and Virtualbox

Newer NOTE: It works again on lucid and maverick -- JE, Oct, 25, 2010.
NOTE: While the process described below works on Jaunty, remastersys is broken on Karmic -- JE

It is a beautiful thing when something just works!

I'm teaching a beginning programming class at a local community college and I wanted to give my students a bootable USB stick with the software (Python, of course!) that we would need for the class.

My minimum requirements above a stock Ubuntu desktop were:
  1. gasp
  2. geany
  3. How to Think Like a Computer Scientist: Learning with Python, 2nd Ed.
I tried and failed to make an iso image using the instructions here:

Not only didn't this meet the "for human beings" test, but all I got was an (initramfs) prompt when I tried to boot from the USB stick after I made it.

Before trying to figure out what went wrong, I decided to try using Remastersys. It worked like a charm!

Here is what I did:
  1. Installed a fresh copy of Jaunty for i386 on a VirtualBox.
  2. Updated the software, and installed all the new software I wanted (geany and a bunch of other python stuff).
  3. Downloaded the lastest version of gasp (I used the tgz file with version 0.3.2 from launchpad), untarred it, and copied the gasp directory to /usr/local/lib/python2.6/dist-packages.
  4. Using System -> Administration -> Software Sources, selecting the Third-Party Software tab, and clicking on the +Add... button, I added the following repository: deb ubuntu/
  5. Updated the software list in Synaptic, and installed the remastersys package.
  6. Selected System -> Administration -> Remastersys Backup and used remastersys to make an iso image of my custom Ubuntu.

Using Remastersys

Using remastersys could not have been easier (it definitely meets the "for human beings" requirement). On launch, the user is presented with the following, warning that all other windows must be closed before proceeding:

Click OK to proceed to the main Remastersys-gui window:

Just select the Dist option, click OK, and wait. After about 15 minutes you will have a working custom.iso image in the /home/remastersys/remastersys directory.

I used scp to copy the image from the VirtualBox instance to the host machine (which was also running Ubuntu, of course) Then I used USB Startup Disk Creator to put the image on a USB stick, complete with read-write storage for saving files.

I can now make live USB sticks for my evening programming class. Remastersys rocks! I hope it makes it's way into the Universe repository, so that it will be even easier to install and use.

No comments:

Post a Comment