Difference between revisions of "Installing WeBWorK on Live USB"
|Line 84:||Line 84:|
===What to do next===
===What to do next===
The installation on your USB flash memory drive is identical to the installation given in the instructions [[Installing from WW2.
The installation on your USB flash memory drive is identical to the installation given in the instructions [[Installing from WW2..04_LiveDVD]] except that the installation occured on your USB flash memory drive, not on your hard drive. All the sections on '''Passwords''', '''Setting up networking using a static IP address''', '''Global Configuration''' and '''File and Directory Locations and System Information''' apply and you should read them. If you set up a persistent system, all changes you make will be preserved the next time you boot from your USB flash memory drive. If you set up a non-persistent system, the changes will only last until you shut down the system.
Revision as of 14:58, 29 June 2010
WeBWorK on a USB memory drive
These instructions explain how to download and install a disk image of a fully functioning WeBWorK 2.4 system onto a 2 GB or larger USB flash memory drive.
- 1 Installing WeBWorK on a 2 GB or larger USB flash memory drive
Installing WeBWorK on a 2 GB or larger USB flash memory drive
After installing the disk image on a USB flash memory drive, you will have a full fledged Ubuntu 9.04 system with WeBWorK, Apache2, MySQL, etc. installed and configured. You just have to plug the USB drive in and boot your computer from your USB drive. The system is persistent (if you choose to set up a persistent system, see below), i.e. any changes you make (to Ubuntu, WeBWorK, anything) are saved and will be there the next time you boot the system. Also nothing on your computer's hard drive will be touched so there will be no change to your standard operating system. If you want to run everything locally as a test, nothing else is required. If you want to connect your system to the internet so that people (students, professors) can connect to WeBWorK and you can login remotely (via ssh) to Ubuntu, you may have to configure networking (see below). Also it is imperative that you CHANGE THE PASSWORDS for the OS users
ubuntu (which has sudo privileges), for the MySQL users
webworkWrite, and for the WeBWorK users
ubuntu which have professor privileges (see below).
There are more detailed instructions for Ubuntu 9.04 and WeBWorK 2.4 at Installation_Manual_for_2.4_on_Ubuntu_9.04
- You need a PC that can be booted from USB. This seems to exclude all Mac's and very old PC's. Most PC's less the 5 or 6 years old should be OK.
- You meed a 2GB or larger USB flash memory drive. For most purposes, any flash drive should work. If you plan to have a small production system with a number of people using WeBWorK simultaneously, you probably want a drive with decent read and write speeds. For example, the SanDisk Extreme Cruzer Contour with 25MB/sec read and 18MB/sec write speeds.
- Go to http://www.linuxliveusb.com/ and then download and install LinuxLive USB Creator 2.5. LinuxLive USB Creator runs on Windows.
- If you want create the live USB on a Linux system, use e.g. UNetbootin (http://unetbootin.sourceforge.net/). The directions below are for LinuxLive USB Creator 2.5 but I have used UNetbootin in the past and the method is very similar. See the section on #UNetbootin at the bottom of this page for a little more information.
- Go to http://devel.webwork.rochester.edu/ww-downloads/WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso and download
WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso(it is a 1.18 GB file)
- Click on http://devel.webwork.rochester.edu/ww-downloads/WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso.md5 and save the MD5 checksum
- Verify the MD5 checksum of your downloaded file
- Note that the above instructors assume you will be using the Live USB on a computer with a 64 bit processor. If you have an old computer with a 32 bit processor, instead go to http://devel.webwork.rochester.edu/ww-downloads/WW2.4_Ubuntu9.10_Vanilla_LiveDVD.iso and download
WW2.4_Ubuntu9.10_Vanilla_LiveDVD.iso(it is a 1.25 GB file). The MD5 checksum is at http://devel.webwork.rochester.edu/ww-downloads/WW2.4_Ubuntu9.10_Vanilla_LiveDVD.iso.md5
Install WeBWorK on USB drive
- Plug your 2 GB or larger USB drive into the computer and make sure the computer recognizes it
- Run LinuxLive USB Creator
Here are the steps
- Choose your key, i.e. your USB flash memory drive
- Choose your source. Select ISO/IMG/ZIP and browse for and select
- Use the slide to select (or just enter) the addition amount of space you want to use for persistent data. You need 1.2 GB for WeBWorK, etc so the remaining space on your USB flash memory drive can be used for this
- Options. I didn't check any options and unchecked those that were checked but you may want to format your USB flash memory drive
- Then create it
If you don't do anything more you will have a non-persistent system meaning that when you reboot the USB flash memory drive everything will be in exactly the same state it was in originally (i.e. any changes you made to Ubuntu, WeBWorK, anything will not be saved).
A persistent system means that when you reboot the USB flash memory drive everything will be in exactly the same state it was when you last shut down the system (i.e. any changes you made to Ubuntu, WeBWorK, anything will be saved). If you want a persistent system (most people probably do especially if you are connecting to the web and want to save new passwords, etc) do the following
On your USB flash memory drive edit the file
syslinux.cfg which you will find in the
\syslinux directory (you may want to make a back up copy of it first). Under the section
label live add in "persistent" at the end of the line that begins with "append", and save the file, so your
syslinux.cfg should look like this:
label live menu label live - boot the Live System kernel /casper/vmlinuz append file=/cdrom/preseed/custom.seed boot=casper initrd=/casper/initrd.gz quiet splash persistent --
Don't forget the space before the
Now you will have persistence if you boot the Live System.
If you want the option of using your USB flash memory drive in both persistent and non persistent modes (sometimes you want to save changes and sometimes you don't), then leave the
label live section alone and directly below it add the section
label live_persistent menu label live_persistent - boot the Live Persistent System kernel /casper/vmlinuz append file=/cdrom/preseed/custom.seed boot=casper initrd=/casper/initrd.gz quiet splash persistent --
Then booting the Live System will give you your original non-persistent system and booting the Live Persistent System will give you your persistent system. Note that any changes you make in the persistent mode will never appear in the non-persistent mode.
Boot from USB drive
You will be presented with a list of options. Select the first live - boot the Live System (which is the default) or second live_persistent - boot the Live Persistent System and log in. Use
wwadmin as the Username and
wwadmin as the Password.
'Sorry, the program "gvfsd-metadata" closed unexpectedly' Error
The first time you boot up in the persistent mode (and every time you boot up in the non-persistent mode) you will see the error message: 'Sorry, the program "gvfsd-metadata" closed unexpectedly'. This is a known bug (see e.g. http://ubuntuforums.org/showthread.php?t=1403357). You can ignore it (especially if you use the persistent mode). Or you can just remove the offending file
rm -rf ~/.local/share/gvfs-metadata
and a correct version will be recreated automatically.
What to do next
The installation on your USB flash memory drive is identical to the installation given in the instructions Installing from WW2.4_Ubuntu10.04_LiveDVD except that the installation occured on your USB flash memory drive, not on your hard drive. All the sections on Passwords, Setting up networking using a static IP address, Global Configuration and File and Directory Locations and System Information apply and you should read them. If you set up a persistent system, all changes you make will be preserved the next time you boot from your USB flash memory drive. If you set up a non-persistent system, the changes will only last until you shut down the system.
- Run UNetbootin and check "Diskimage". Then browse for the file
WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.isoand select it
- Make sure your USD drive is selected (often drive D: but check before you write to it)
OKand sit back while the installation onto the USB drive takes place
- Go to http://unetbootin.sourceforge.net/diskimg/ and download
- http://unetbootin.sourceforge.net/diskimg/readme.txt gives the instruction we repeat below we some slight amplifications.
Go to http://unetbootin.sourceforge.net/diskimg/ and download one of the files (128mb.zip, 256mb.zip, or 512mb.zip) corresponding to the amount of persistent space you want (make sure the size of the persistent disk image is smaller than the free space you have on your USB drive). Since the .iso file is a 1.1GB file you need a 2GB flash memory card and this gives plenty of space for the extra 512 MB of persistent space so download the
Now extract the file "casper.rw" from the zip file to your USB drive.
Now edit D:\syslinux.cfg (assuming D:\ is where your USB drive is) and add in "persistent" in two places at the end of the first two lines that begin with "append", and save the file, so your syslinux.cfg should look something like this:
default unetbootin label unetbootin kernel /ubnkern append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash persistent --
label ubnentry0 menu label live kernel /casper/vmlinuz append initrd=/casper/initrd.gz file=/cdrom/preseed/custom.seed boot=casper quiet splash persistent --
Don't forget the space before the
Now you will have persistence if you boot the default or live options. For more info see https://help.ubuntu.com/community/LiveCD/Persistence