Difference between revisions of "Installing WeBWorK on Live USB"

From WeBWorK_wiki
Jump to navigation Jump to search
m (marked as historical)
 
(123 intermediate revisions by one other user not shown)
Line 1: Line 1:
WeBWorK on a USB memory drive
 
  +
{{Historical}}
   
These instructions explain how to download and install a disk image of a fully functioning WeBWorK 2.4 system onto a 2 GB USB flash memory drive.
 
  +
<!-- {{UnderConstruction}} -->
   
== Installing WeBWorK on a 2 GB USB flash memory drive ==
 
   
===Overview===
 
  +
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.
After installing the disk image on a USB flash memory drive, you will have a full fledged Fedora 9 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, i.e. any changes you make (to Fedora, 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 fedora, you have to configure networking (see below). Also in this case it is imperative that you CHANGE THE PASSWORDS for the OS users root and fedora (which has sudo privileges) and also for the WeBWorK users admin and fedora which have professor privileges (see below).
 
   
I have tested this on about 6 computers (all Dell's) and it has worked so far on every computer that can be booted from USB.
 
  +
== Installing WeBWorK on a 2 GB or larger USB flash memory drive ==
   
If you test this, I would appreciate any comments, suggestions, bug reports, etc.
 
  +
===Overview===
  +
After installing the disk image on a USB flash memory drive, you will have a full fledged Ubuntu 10.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 <code>root</code> and <code>wwadmin</code> (which has sudo privileges), for the MySQL users <code>root</code> and <code>webworkWrite</code>, and for the WeBWorK user <code>admin</code> who has professor privileges (see below).
   
There are more detailed instructions for Fedora 9 and WeBWorK 2.4 at
+
There are more detailed instructions for Ubuntu 10.04 and WeBWorK 2.4 at
[[Installation_Manual_for_2.4_on_Fedora_9]]
+
[[Installation_Manual_for_2.4_on_Ubuntu_10.04]]
   
 
===Requirements===
 
===Requirements===
   
# You need a pc that can be booted from USB. This excludes all mac's and very old pc's. Most pc's less the 5 or 6 years old should be OK.
+
# 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. Another good option is the Kingston 4GB DataTraveler 410 USB Flash Drive.
   
# You meed a 2GB USB memory drive. I built and tested this on PNY Attache 2G and 4G drives. Hopefully others work as well.
 
  +
===USB Creator===
  +
  +
# Go to http://www.linuxliveusb.com/ and then download and install LinuxLive USB Creator 2.5 (or the latest version). LinuxLive USB Creator runs on Windows.
  +
# If you want to 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.
   
 
===Downloads===
 
===Downloads===
# Go to http://www.roadkil.net/ and download and install Roadkil's Disk Image. DiskImage only runs on Windows. This takes only a few seconds.
 
  +
# Go to
 
  +
http://hosted3.webwork.rochester.edu/test/WW2.4_Fedora9_2GB_USB_drive.img.gzip
 
  +
There are both 64 bit and 32 bit distributions. The 64 bit distribution should work with most modern cpu's. If you have an old 32 bit cpu, use the 32 bit distribution. Download the md5 check sum and .iso file from either of the sites below. Download <code>WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso.md5</code> and <code>WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso</code> (or <code> WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso.md5</code> and <code> WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso</code>). The iso's are 1.2 GB files.
and download WW2.4_Fedora9_2GB_drive.img.gzip (it is a 929 MB file).
 
  +
http://hosted3.webwork.rochester.edu/test/md5 gives
 
  +
* Rochester
<code>MD5 (WW2.4_Fedora9_2GB_USB_drive.img.gzip) = 55aac6586c0c547d8b848f73719b0278</code>
 
  +
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso.md5
Verify the file and then gunzip it.
 
  +
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso
  +
or for 32 bit systems
  +
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso.md5
  +
# http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso
  +
* MAA
  +
# http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso.md5
  +
# http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso
  +
or for 32 bit systems
  +
# http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso.md5
  +
# http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso
  +
  +
<!-- &#32;* The files do not exist at this location yet -->
  +
  +
  +
* Verify the MD5 checksum of your downloaded file agrees with the above
   
 
===Install WeBWorK on USB drive ===
 
===Install WeBWorK on USB drive ===
   
# Plug your 2 GB USB drive into the computer and make sure the computer recognizes it (e.g. look at "My Computer"). You can also use larger USB memory drives but you will not get anymore usable space.
+
# 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 e.g. <code> WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso</code>. '''Important:''' Newer versions of LinuxLive USB Creator (e.g. version 2.8.8) do not recognize the name <code> WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso</code> as being a Ubuntu distribution. If you don't change the file name most things should work but e.g. '''persistence will not work'''. To be safe or if you want persistence rename the WeBWorK iso file to <code>ubuntu-10.04.2-desktop-amd64.iso</code> for the 64 bit version or <code>ubuntu-10.04.2-desktop-i386.iso</code> for the 32 bit version. You will see the warning "You have the right ISO file but it is corrupted or was altered. ..." which you can ignore. This is annoying but I haven't found a better work around.
  +
# Use the slide to select (or just enter) the additional 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. 1024 or 2048 MB's (1 or 2 GB's) should be ample.
  +
# 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
   
# Run DiskImage and select "Write Image". For "Write Image to" scroll down (you have to use the down arrow key on your keyboard) until you find Physical Disk and select the USB disk (do not download to a disk letter - C,D,E,F,G etc; these occur at the top of the list). Be VERY CAREFUL here. You should see something like Physical Disk 1 (1.87 GB). DO NOT SELECT THE WRONG DRIVE. For the "Source File" Browse until you find WW2.4_Fedora9_2GB_drive.img. Then click "Go!" and "Yes" after you have double checked that you have everything correct.
 
  +
Note that in the last step "Formatting persistence file", on my Windows 7 system I get the error "There is no disk in the drive. Please insert a disk into drive \Device\Harddisk2\DR2". I just hit "Cancel" four times until the error message disappeared. As far as I can tell everything works fine in persistent and non persistent modes. I have not been able to find any references to this error on the web.
  +
  +
===Persistence ===
  +
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 <code>syslinux.cfg</code> which you will find in the <code>\syslinux</code> directory (you may want to make a back up copy of it first). Under the section <code>label live</code> add in "persistent" at the end of the line that begins with "append", and save the file, so your <code>syslinux.cfg</code> 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 <code>--</code>
  +
  +
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 <code>label live</code> 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 ===
 
===Boot from USB drive ===
# With the USD drive plugged in reboot your system and boot from USB. You will probably have to hold down a certain key (e.g. F12 or F11) to bring up a boot menu. Or possibly you may have to edit your BIOS to allow booting from USB. Select USB Storage Device as the boot device and boot. You should almost immediately see a Fedora screen with a 10 second countdown to booting. If you are impatient hit Enter twice.
+
With the USD drive plugged in reboot your system and boot from USB. You will probably have to hold down a certain key (e.g. F12 or F11) to bring up a boot menu. Or possibly you may have to edit your BIOS to allow booting from USB. Select USB Storage Device as the boot device and boot.
  +
  +
You will be presented with a list of options. Select the first '''live - boot the Live System''' (which is the default) or second (if you added it) '''live_persistent - boot the Live Persistent System''' and log in. Use <code>wwadmin</code> as the Username and <code>wwadmin</code> as the Password.
  +
  +
If you do not want to connect your server to the internet, you can just open firefox and access the URL: http://localhost/webwork2 . If you connect to a network using DHCP, networking will be set up automatically.
  +
  +
==='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 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 64bit Vanilla 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.
  +
  +
==UNetbootin==
  +
Here are some quick notes on using UNetbootin. I haven't tested these recently but they should still be valid.
  +
  +
First get UNetbootin and install it (http://unetbootin.sourceforge.net/)
  +
  +
# Run UNetbootin and check "Diskimage". Then browse for the file <code> WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso</code> and select it
  +
# Make sure your USD drive is selected (often drive D: but check before you write to it)
  +
# Hit <code>OK</code> and sit back while the installation onto the USB drive takes place
   
Note that a few times there were errors such as the USD drive not being recognized, hung, etc. I just rebooted and never had a problem twice in a row.
 
  +
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).
   
# Hit Enter to do the automatic login. This logs you into the "fedora" account which has password "admin" (more on accounts and passwords below). "fedora" has sudo privileges. The "root" account also has password "admin".
 
  +
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
   
# If you do not want to connect your server to the internet, you can just open firefox and access the URL: http://localhost/webwork2 . The admin
 
  +
# Go to http://unetbootin.sourceforge.net/diskimg/ and download <code>512mb.zip</code>
course has two users "admin" and "fedora" as professors with passwords "admin" and "admin". myTestCourse has the same two users as professors and in addition practice (guest) users and one student user "jsmith" with password "jsmith". With the exception of jsmith, every password on the system is set to "admin"
 
  +
# http://unetbootin.sourceforge.net/diskimg/readme.txt gives the instruction we repeat below we some slight amplifications.
   
===Internet access ===
 
Internet access into and out of your server. The server's firewall is set to accept only www (http), secure www (https) and secure telnet and file transfer (ssh) connections. I'll give directions for setting up an ethernet connection in step 11. You can try setting up wireless using the procedure below but in my experience with Dell equipment and linux, wireless requires you to download and configure special drivers and is beyond the scope of these directions (do a Google search for help).
 
   
# PASSWORDS. If you connect to the internet it is imperative that you CHANGE THE PASSWORDS for the OS users root and fedora (which has sudo privileges) and also for the WeBWorK users admin and fedora which have professor privileges. Otherwise anyone can connect to your server and pretty easily gain root access. To change the root password goto System, Administration, Root Password. Enter the current password (admin) and change it. Or in a terminal window (Applications, System Tools, Terminal) enter su to become root and then passwd to change the password. To change the password for fedora login to fedora and run passwd (or use System, Administration, Users and Groups or sudo passwd fedora).
 
  +
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 <code>512mb.zip</code> file.
   
# Setting up networking. I'll assume (the worst case) that you are switching between various networks some using DHCP and some using static IP addresses. Once you setup networking, you don't have to do anything if you reboot the computer onto the same network.
 
   
# Goto System, Administration, Network. Under the Devices tag uncheck currently configured devices and delete them (this is not absolutely necessary but is the cleanest way). Under the DNS tag remove any DNS's and the DNS search paths. Now go back to the Devices tag and hit New, select Ethernet connection and hit Forward, select your card and hit Forward. If you have DHCP you can just hit forward and ignore the rest of this paragraph. For a static IP address select Statically set IP addresses and fill in the required information. Then hit the DNS tag and fill in your servername and the the IP address(es) of your name servers. Hit the Hosts tag and check show loopback. Edit the IP information replacing servername and serverdomain with your info. Also click New and add your IP address and your fqdn (fully qualified domain name, i.e. servername.serverdomain) as hostname.
 
  +
Now extract the file "casper.rw" from the zip file to your USB drive.
   
# Then save the changes (File, Save) and Quit.
 
  +
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:
   
# Finally goto System, Administration, Services scroll down to ssh and check that ssh is Enabled. If not Enable it.
 
   
# Once you make the changes reboot your computer (you need to do this so that the changes to the servername, ssh, etc. take place).
 
  +
default unetbootin
  +
label unetbootin
  +
kernel /ubnkern
  +
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash persistent --
   
# Try firefox and see if you are connected to the world. Login to your computer from a remote site using ssh and try to connect to webwork from a remote browser (URL: http://ipaddress/webwork2 or http://servername.serverdomian/webwork2 if the nameservers know about you).
 
  +
label ubnentry0
  +
menu label live
  +
kernel /casper/vmlinuz
  +
append initrd=/casper/initrd.gz file=/cdrom/preseed/custom.seed boot=casper quiet splash persistent --
   
# Note that with Fedora (and Ubuntu, etc) if the server can not find it's fqdn (in a terminal window try hostname -f ) certain gui applications like Network and the Package Manager will not work. That's one reason we had to reboot above. If things get messed up replace the files /etc/hosts and /etc/sysconfig/network with backups and reboot. There are two sets of backups: hosts.dist and network.dist are the original files on my USB distribution and hosts.bak1 and network.bak1 are the original files on the Fedora distribution. Either work but use either both .dist files or both .bak1 files.
 
  +
Don't forget the space before the <code>--</code>
   
# Also note that I have disabled the network manager and enabled network because of a known bug in Fedora 9 with (at least) static IP addresses whereby Firefox always starts off line which is very annoying.
 
  +
Now you will have persistence if you boot the default or live options.
  +
For more info see https://help.ubuntu.com/community/LiveCD/Persistence
   
# In order to get a fully functioning WeBWorK server pretty much all you have to do is to edit /opt/webwork/webwork2/conf/global.conf and set $mail{smtpServer} to your email server. This USB system could function as an smtpServer but it is not set up to do so.
 
   
 
[[Category:WeBWorK on Live Media]]
 
[[Category:WeBWorK on Live Media]]

Latest revision as of 11:25, 16 June 2021

This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.


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.

Installing WeBWorK on a 2 GB or larger USB flash memory drive

Overview

After installing the disk image on a USB flash memory drive, you will have a full fledged Ubuntu 10.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 root and wwadmin (which has sudo privileges), for the MySQL users root and webworkWrite, and for the WeBWorK user admin who has professor privileges (see below).

There are more detailed instructions for Ubuntu 10.04 and WeBWorK 2.4 at Installation_Manual_for_2.4_on_Ubuntu_10.04

Requirements

  1. 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.
  2. 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. Another good option is the Kingston 4GB DataTraveler 410 USB Flash Drive.

USB Creator

  1. Go to http://www.linuxliveusb.com/ and then download and install LinuxLive USB Creator 2.5 (or the latest version). LinuxLive USB Creator runs on Windows.
  2. If you want to 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.

Downloads

There are both 64 bit and 32 bit distributions. The 64 bit distribution should work with most modern cpu's. If you have an old 32 bit cpu, use the 32 bit distribution. Download the md5 check sum and .iso file from either of the sites below. Download WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso.md5 and WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso (or WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso.md5 and WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso). The iso's are 1.2 GB files.

  • Rochester
  1. http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso.md5
  2. http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso

or for 32 bit systems

  1. http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso.md5
  2. http://hosted2.webwork.rochester.edu/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso
  • MAA
  1. http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso.md5
  2. http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_64bit_Vanilla_LiveDVD.iso

or for 32 bit systems

  1. http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso.md5
  2. http://webwork.maa.org/ww-downloads/WW2.4.9_Ubuntu10.04.2LTS_32bit_Vanilla_LiveDVD.iso


  • Verify the MD5 checksum of your downloaded file agrees with the above

Install WeBWorK on USB drive

  1. Plug your 2 GB or larger USB drive into the computer and make sure the computer recognizes it
  2. Run LinuxLive USB Creator

Here are the steps

  1. Choose your key, i.e. your USB flash memory drive
  2. Choose your source. Select ISO/IMG/ZIP and browse for and select e.g. WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso. Important: Newer versions of LinuxLive USB Creator (e.g. version 2.8.8) do not recognize the name WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso as being a Ubuntu distribution. If you don't change the file name most things should work but e.g. persistence will not work. To be safe or if you want persistence rename the WeBWorK iso file to ubuntu-10.04.2-desktop-amd64.iso for the 64 bit version or ubuntu-10.04.2-desktop-i386.iso for the 32 bit version. You will see the warning "You have the right ISO file but it is corrupted or was altered. ..." which you can ignore. This is annoying but I haven't found a better work around.
  3. Use the slide to select (or just enter) the additional 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. 1024 or 2048 MB's (1 or 2 GB's) should be ample.
  4. Options. I didn't check any options and unchecked those that were checked but you may want to format your USB flash memory drive
  5. Then create it

Note that in the last step "Formatting persistence file", on my Windows 7 system I get the error "There is no disk in the drive. Please insert a disk into drive \Device\Harddisk2\DR2". I just hit "Cancel" four times until the error message disappeared. As far as I can tell everything works fine in persistent and non persistent modes. I have not been able to find any references to this error on the web.

Persistence

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

With the USD drive plugged in reboot your system and boot from USB. You will probably have to hold down a certain key (e.g. F12 or F11) to bring up a boot menu. Or possibly you may have to edit your BIOS to allow booting from USB. Select USB Storage Device as the boot device and boot.

You will be presented with a list of options. Select the first live - boot the Live System (which is the default) or second (if you added it) live_persistent - boot the Live Persistent System and log in. Use wwadmin as the Username and wwadmin as the Password.

If you do not want to connect your server to the internet, you can just open firefox and access the URL: http://localhost/webwork2 . If you connect to a network using DHCP, networking will be set up automatically.

'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 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 64bit Vanilla 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.

UNetbootin

Here are some quick notes on using UNetbootin. I haven't tested these recently but they should still be valid.

First get UNetbootin and install it (http://unetbootin.sourceforge.net/)

  1. Run UNetbootin and check "Diskimage". Then browse for the file WW2.4_Ubuntu10.04_64bit_Vanilla_LiveDVD.iso and select it
  2. Make sure your USD drive is selected (often drive D: but check before you write to it)
  3. Hit OK and sit back while the installation onto the USB drive takes place

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

  1. Go to http://unetbootin.sourceforge.net/diskimg/ and download 512mb.zip
  2. 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 512mb.zip file.


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