Saturday, May 7, 2011

So many hard drives, so little time!

I recently had to replace a number of hard drives. So, I had to reinstall a bunch of student stations. In the process, I thought I'd update how I go about doing all this. Also, the only thing holding me back from using Linux 24x7 on the teacher station is the fact that Virtual TI only runs in Wimpdoze and our online gradebook and attendance system does not work well in Firefox. So, I decided to install WINE on all stations (except the servers) and Chrome on the teacher station:

Ubuntu + SAGE + JRE + WINE + VTI 

Ubuntu + SAGE + JRE + WINE + VTI 
adding: Flash for YouTube (auto install), ffmpeg for offline screencasting, VLC to view *.mp4s and dvds, chrome for gradebooking, Handbrake to copy dvds, smart notebook for linux

Ubuntu + JDK + openSSH + vsFTP (looking into setting up a SAGE server)
sudo su gedit /etc/network/interfaces = 
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address = guardian, 144 = caprica
broadcast (optional?)
dns (optional?)
/system/preferences/network connections (optional)
/system/preferences/network proxy =
more on jdk, openssh (to allow sshing in as root to upload to ftp server, don't forget to passwd root) and vsftp (for anonymous ftp, don't forget to create /home/ftp but don't chmod 700 /home/ftp, keep ftp server and ssh server on 2 different boxes):

Now, the way I install the Teacher stations is still based on the Student stations, but the Servers are no longer based on the Teacher stations, they are independent beasts! Since, I do not need to be rebooting from Wimpdoze to Ubuntu and back 50 times a day any more, I won't need a Server station to be a backup Linux based Teacher box. So ... I'm free at last, thank God Almighty, I'm free at last (from Wimpdoze)!

Step 1) Live CD (32bit Ubuntu Desktop 10.04 LTS Maverick Meerkat)
Boot Ubuntu CD, click install, answer on screen questions and run install. Make sure to make Student Stations boot without a passwd (unlike Teacher Stations and Servers) since the user passwd is also the root passwd and I'm not giving that out! Also, make the box name and the userid the same so box name shows on top right of screen after boot up: 
-students = alpha beta gamma delta, epsilon eta zeta theta
-students = iota kappa lambda mu, nu omicron iks pi 
-students = rho sigma tao upsilon, phi psi chi omega
-teacher = shadowfax
-server1 = guardian (jdk, ssh, ftp)
-server2 = caprica (not used at present, may become apache + SAGE server)

Step 2) Partitions
When asked to prepare partitions, do so as follows:
    /dev/sda1    fat32    42GB   (resize, but no other changes, leave wimpdoze partition alone)
    /dev/sda2    swap   256MB (change to swap)
    /dev/sda3    ext3     41GB   (change to ext3 + format + / partition)

Step 3) Ethernet
-when the install process is done, reboot and remove the CD
-once the PC reboots and you get to the desktop, right click the vertical arrow icon on the top right and edit the Ethernet interfaces
    eth0 set to auto DHCP (proxy and passwd needed for internet on school LAN)
    eth1: ip = 10.5.129.x (private Linux LAN)
            mask =
            gw =
            dns =
-test intranet connections with nautilus/ftp to
-internet connections will be tested later (via proxy and passwd) when downloading *.bin, *.lzma and *.deb files (we have internet access on the Linux LAN passwd protected by requiring a proxy server login)

Step 4) System Preferences and System Administration
-system/preferences/monitors (set to highest resolution)
-system/preferences/screensaver (set to 2 hours)
-system/preferences/networkproxy (enable proxy server IP)
-system/administration/printers (set network printer HP Laser Jet 4250 at
-right click desktop and select /change background to set your background and click visual effects for compiz

Step 5) SAGE
-install SAGE *.lzma by copying it to /usr/local as root. 
-extract SAGE *.lzma and rename dir as sage.
-add path "/usr/local/sage:" to /etc/environment

Step 6) JRE
Install jre1.6.0_23 as a Firefox plugin for 3D graphics in SAGE
-system/preferences/networkproxy (login to proxy)
-use firefox to download latest jre *.bin file from to /usr/lib/firefox-addons/plugins
-open a terminal and 
    cd /usr/lib/firefox-addons/plugins
    chmod 755 *.bin
    cd ~/.mozilla
    mkdir plugins
    cd plugins
    ln -s /usr/lib/firefox-addons/plugins/jre1.6.0_23/lib/i386/
-test firefox with "about:plugins" as the url to see that jre was plugged in!

Step 7) WINE + GAMES
-disable games: sudo chmod 700 /usr/games/*
-install WINE from using dpkg
-add WINE app folders to Desktop from ftp as needed

-install optional software like VLC, handbrake, SmartBoard, Chrome and games via aptitude+proxy or synaptic or or author sites
-on the servers, sudo chmod 700 /home/* to secure saved files. Careful, we need to undo that for the ftp files: sudo chmod 755 /home/ftp or noone will be able to use anonymous ftp!
-on the servers, install openssh and vsftp (use vsftp.conf from via dpkg. 
-on the servers, install the jdk in /usr/local and add the directory containing java, javac, javadoc and appletviewer (/usr/local/jdk1.6.0_23/bin) to /etc/environment as per instructions from
-here's the installation instructions for jdk from

JDK Self-Extracting Binary Installation for Linux (32-bit)

JDK Documentation

System Requirements

System Configurations

Installation Instructions

This procedure installs the Java Development Kit (JDK) for 32-bit Linux, using a self-extracting binary file. The JDK download includes the Java SE Runtime Environment (JRE) – you do not have to download the JRE separately.
For RPM-based Linux distributions, like Red Hat or SuSE, refer to the RPM installation instructions.
The name of the downloaded file has the following format:


To install, download this file and use the following instructions.
1. Download and check the download file size. 
You can download to any directory that you can write to.
This bundle can be installed by anyone (not only root users), in any location that the user can write to. However, only the root user can displace the system version of the Java platform supplied by Linux.
2. Make sure that execute permissions are set
Run this command:
chmod a+x jdk-6u -linux-i586.bin
3. Change directory to the location where you would like the files to be installed.
The next step installs the JDK into the current directory.
4. Run the self-extracting binary.
Execute the downloaded file, prepended by the path to it. For example, if the file is in the current directory, prepend it with " ./" (necessary if " ." is not in the PATH environment variable):
% ./jdk-6u -linux-i586.bin
The binary code license is displayed, and you are prompted to agree to its terms.
The JDK files are installed in a directory called jdk1.6.0_ in the current directory. Follow this link to see its directory structure. The JDK documentation is a separate download.
5. Delete the bin file if you want to save disk space.

6. If you want to use Java within the browser, setup the plugin using the instructions in Manual Plugin Installation for Linux.

Note about Root Access: Installing the software automatically creates a directory called jdk1.6.0_ . Note that if you choose to install the JDK into a system-wide location such as /usr/local, you must first become root to gain the necessary permissions. If you do not have root access, simply install the Java SE Runtime Environment into your home directory, or a subdirectory that you have permission to write to. Note about Overwriting Files: If you install the software in a directory that contains a subdirectory named jdk1.6.0_ , the new software overwrites files of the same name in that jdk1.6.0_ directory. Please be careful to rename the old directory if it contains files you would like to keep.
Note about System Preferences: By default, the installation script configures the system such that the backing store for system preferences is created inside the JDK's installation directory. If the JDK is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines.

See the Preferences API documentation for more information about preferences in the Java platform.

Manual Installation and Registration of Java Plugin for Linux

JDK Documentation
When you install the Java platform, the Java plugin file is included as part of that install. If you want to use Java within Firefox, you need to manually create a symbolic link from the plugin file in the release to one of the locations that Firefox expects. To make the plugin available to all users, create the link inside of the Firefox application's directory, in the plugins subdirectory. Alternatively, you can create the symbolic link in your home directory, in ~/.mozilla/plugins. In the remainder of this document, the text, " Firefox plugins directory ", implies either of these locations.
This release provides the Next-Generation Java plugin. If you have been using the classic plugin, see the Notes for further information.
The plugin file for Linux is located here:

If you are using a 32-bit Firefox, you should use the 32-bit Java Plugin (from the lib/i386 directory). To determine which version of Firefox you are running, launch the application, and select the menu item Help -> About Mozilla Firefox. At the bottom of the window is a version string line that contains either "Linux i686" (32-bit) or "Linux x86_64" (64-bit).
To install the Java Plugin follow these steps:
1. Exit Firefox.
2. Uninstall any previous installations of Java Plugin.
Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
Remove the symbolic links (or move them to another directory) to and from the Firefox plugins directory.
3. Create a symbolic link to the Java Plugin in the Firefox plugins directory.
Create a symbolic link to the Java Plugin file in the Firefox plugins directory:
    ln -s
4. Start the Firefox browser .
Type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.
  • The classic plugin file was located here:
    This file should no longer be used and all symbolic links to it removed.
  • See Browsers Supported by Next-Generation Java Plugin for information about browser support in the new Java Plugin.

Of course, after my AP exams we had to play BZFlag via WINE and watch LOTR on an extra wide SmartBoard with a short throw projector and speakers!

This how we played BZFlag:
wine   starts windows emulator
bzfs   starts bzflag server (default is ffa)
-fb   = flags on buildings
-sb   = spawns on buildings
+r   = richochet on
-ms 6   = max shots is 6
+f GM{10}  = add 10 GM flags
-j  = jump
-h  = random builing height
-t  = teleport
-density 5 = 5% building density on map
-world cool.bzw = use cool.bzw map
(ffa with selected map)
wine bzfs -fb -sb +r -ms 6 +f GM{10} -j -h -density 5 -world CHOICE.bzw

(ffa with random map)
wine bzfs -fb -sb +r -ms 6 +f GM{10} -j -h -t -density 5

(ctf with random map)
wine bzfs -fb -sb +r -ms 6 +f GM{10} -j -h -t -density 5 -cr

(ctf with selected map)
wine bzfs -fb -sb +r -ms 6 +f GM{10} -j -h -density 5 -c -world ctf.bzw

(rabbit options with editted map)
wine bzfs -fb -sb +r -ms 6 +f good{10} -j -h -density 5 -rabbit killer -world rabbit.bzw
wine bzfs -fb -sb +r -ms 6 +f good{10} -j -h -density 5 -rabbit score -world rabbit.bzw
wine bzfs -fb -sb +r -ms 6 +f good{10} -j -h -density 5 -rabbit random -world rabbit.bzw

HTH, good luck with your Linux boxes!

Learning with Technology, 

No comments:

Post a Comment