Sunday, April 25, 2010

Koha on USB Stick II

The goal here was to create a persistent bootable USB version of Ubuntu with Koha, dspace etc to use for class. Students would work on their stick each week in the lab, adding software and configuring services. There are some missing bits - like PHP so we have to do some work later to get a full lamp stack running so we can install Wordpress and Scriblio etc.

Format the USB device

  1. Boot with the CD (ubuntu 9.10)
  2. Insert your USB stick
  3. Select the stick and right-click
  4. Select Format from the menu
  5. Select Compatible with All Systems (FAT) from the Type: pulldown menu
  6. Type in your username, ie (mchau99) in the Name: text box
  7. Click FORMAT

This process erases everything on the USB stick and creates a FAT32 partition. The process can be done on a Windows computer in advance but we might as well do it here. We re-format the stick to ensure it is FAT32 and not FAT and to get rid of any proprietary software included by the manufacturer. Your name should be limited to 8 characters or less with no spaces or punctuation.

Install Ubuntu

  1. Select System, Administration, USB Startup Disk Creator
  2. Under Disk to Use select your USB stick
  3. Select the Stored in Reserved Extra Space option
  4. Adjust the How Much slider to 2 gig for a 4 gig stick and 4 gig for a larger stick
  5. Click MAKE STARTUP DISK
  6. Click QUIT when the Installation is Complete message is displayed

Be careful to select your stick and not the internal hard disk! Your USB Stick will be called something like /dev/sdb1/mchau99. This process is used to create a caspar-rw file which will be the 'persistence' file that stores changes between boots. The 4 gig limitation is not from Ubuntu but a constraint of the Windows FAT32 file system. If you were using a large portable hard disk and wanted a larger persistence file it can be done but it requires a manual installation.

Boot From the Stick

  1. Click the Ubuntu menu item in the top right corner
  2. Select Restart from the menu
  3. Remove the CD-ROM disc from the tray when it opens
  4. Press ENTER

The system is now booted from the USB Stick. You can test the persistence by installing something - i first installed the Google toolbar in Firefox and used the synaptic package manager to install Brasero, sbackup, filezilla, and the MySQL Query browser. The query browser was able to connect to the mySQL server running on localhost with a username of root and a password of library. I rebooted the system and the changes were there, so the persistence works!

Backup

So how will students back up their weekly or daily work? With the portable USB Sticks a backup program is included - you back up daily or weekly and if your stick is lost, damaged or just screwed up - you reinstall the portable app environment and restore from the backup. This also makes it possible to have multiple sticks in use.

With the Ubuntu stick it is not so easy - there is no backup option on a menu. You need to be able to create a backup than can be fully restored. I can think of several possibilities:

Option 1 - use sbackup to create a backup of files. Sbackup can backup to local drives or to remote hosts using ssh or sftp. The local host option worked well but then you need a second stick to backup to and until we test the restore we cannot guarantee everything (such as the koha changes) are backed up. The other problem is that although i was able to browse the windows shares and connect to some, i could not connect to //files3 or //files when the user's local files (U: drive) are stored, so you cannot backup to your space. I was able to connect to the personal web space on panther but since that is only 10mb it is quite useless. Backing up to a file storage site via ssh or sftp would be preferable.

So option 1 can work but has some questions.

Option 2

An easier option for the student would be the ability to make a complete image of the USB stick that could be re-created. For example an ISO file. While there are lots of utilities to burn disk images like ISO or dmg to a CD/USB/HD, it is hard to find any information on creating an ISO from a USB stick. In fact, programs like NERO that can create ISO's won't even list a USB stick in their source menu.

Next Steps:

Run the Koha Install and import some MARC records.
Copy the large MARC record files to the S:\local\mlis\courses\9762 for students to use
Test Restore from sbackup with koha changes

1 comment:

MrZed said...

Sounds really cool. I'll have to give it a try. My ignorance of Linux compounded with my unwillingness to dedicate a whole machine to Linux has kept me from playing with Koha. I love the idea of having one (or several!) library systems available to learn the features of seems like such a luxury.

I can't believe I'm the first to comment.