LJ Archive

A Temporary Internet Lounge

Colin McGregor

Issue #130, February 2005

When you need an Internet access area at an event, do some advance preparation to create a custom Linux load so everything goes smoothly on the big day.

Beginning in 1939 and for most years since then, the World Science Fiction Convention has been the high point of the true Science Fiction fan's yearly calendar. In 2003, that high point was Torcon 3, the 61st World Science Fiction Convention held in Toronto, Ontario August 28–September 1. Torcon 3, like all past World Science Fiction Conventions, was run by and for fans. This meant nobody running the convention got paid for their efforts and funds were tight.

Since 1996, the conventions have featured an Internet Lounge where attendees could check their e-mail while at the convention. Given my background with Internet service providers, volunteering for the Lounge seemed the best task for me. I was working for a charity that refurbishes old corporate computers for reuse by other charities and individuals that otherwise would not be able to afford computers. Through my employer, I was able to arrange for enough computers for the convention, the only price being that they wanted their current project, torontogames.org, promoted. The only catch was that the machines would not come with any sort of operating system.

Beyond the issues of running four- to five-year-old hardware that didn't come with software, there were convention constraints, little money, little convention setup time and roughly 4,000 attendees. I looked at Microsoft Windows solutions, but we would have needed a license for each machine. When one is assessing some 28 machines at roughly $150 each, license charges would shred what budget was available. Then there were the issues of how long it would take to install the software and locking down/securing the computers so convention attendees couldn't mess things up. Microsoft wasn't a solution for this convention.

I looked at some conventional Linux distributions, including Red Hat and Debian. Although the cost and security concerns disappeared, the issue of setup time remained.

I considered the Linux Terminal Server Project, which I had used for other projects, where one master server supports a number of dumb client machines. Although the client machines could be set up quickly, there still would be a fair amount of time required to set up the servers. In addition, I wasn't sure I could get suitable server machines. Plus, the idea of possible single points of failure that could not be replaced almost instantly and cheaply made me nervous.

So I looked at Knoppix, a Debian-based Linux distribution that by default boots and runs off the CD-ROM drive, never touching the hard drive, and I realized I had the beginnings of a winner. Because of Knoppix's excellent hardware detection system, one could, in theory at least, face a dozen different makes and models of PCs with a dozen identical Knoppix disks and in five minutes have all 12 machines browsing the Internet. Knoppix, in essence, has two filesystems on the disk, a conventional ISO 9660 system used while Knoppix boots and a compressed filesystem used after the system boots. This complicates things, but it does allow Knoppix to store significantly more than 700MB of software on a conventional 700MB CD-ROM.

Still, Knoppix presented issues that needed to be addressed. First, the default screen resolution is 1024×768. Many 15" monitors do not support a resolution greater than 800×600, and I knew the majority of monitors I would be getting would have 15" screens. So, the default resolution had to change. Second, the default window manager is KDE. When planning for the convention, I did not know what sort of PCs I would be getting. If I ended up with low-end PCs, KDE would be too resource-intensive to be usable. So the default window manager had to change.

In addition, the default home page in the browsers would have to be set to the Torcon 3 site. The browser bookmarks had to be set to tourist information sites and World Science Fiction Convention-related sites. Other changes included making the startup screen and wallpaper note convention sponsors and adding Macromedia Flash support. Finally, to stay focused on the room's job, all the extras were removed.

My first step was to download and burn the latest copy of Knoppix, which at the time was Knoppix 3.4. These instructions are for Knoppix 3.4 only. Next, I assembled a development machine, a Pentium II 350MHz with 256MB of RAM, a 52x CD-ROM and a blank 6GB hard drive. I could have gone a bit lower on RAM and a bit slower on CD-ROM, but this is about as modest a machine as you would want for this sort of customization. To supplement this machine, elsewhere on my home network I had a support box that would act as an FTP server, plus a CD burner and a router was doubling as a DHCP server.

Next there was a need for artwork, namely the opening screen and the wallpaper. For the wallpaper, any 800×600 JPEG image would be fine. I saved this on the support box, as knoppix.jpg. The opening startup screen needed to be in a special 640×400, 16-color format. I got this by creating a simple under 17-color, 640×400 image and then saving it in .bmp format on the support box, as startup.bmp.

I then booted the development box under Knoppix and started a shell. The first steps were to set up a new filesystem, create the needed directories and create a file I could use later as a swap file. Some of this stuff required just over 1GB of memory (RAM + swap), so I needed to set up a swap file for a machine with 256MB of RAM. Setting up the drive for the first time, I entered:

su
mkfs.ext2 /dev/hda1
mount -o rw /dev/hda1 /mnt/hda1
mkdir /mnt/hda1/master
mkdir /mnt/hda1/source
mkdir /mnt/hda1/knx
cd /mnt/hda1/knx
dd if=/dev/zero of=swap bs=1M count=750
cd ~
umount /dev/hda1
exit

In the above code, the master directory was used to store the conventional filesystem, source was used to store what became the compressed filesystem and knx was used to store the swap file, plus the finished CD image. The above steps should need to be done only once.

I went through the following procedures several times, so I turned them into small scripts to automate parts of the disk creation task. This way I could burn a draft CD-R, show it to committee members, get feedback and adapt based on feedback. Here I erase past work, set up swap space and then copy from my current CD image to the hard drive:


su
mount -o rw /dev/hda1 /mnt/hda1
cd /mnt/hda1/source
rm -rf *
cd /mnt/hda1/master
rm -rf *
cd /mnt/hda1/knx
rm knoppix.iso
mkswap swap
swapon swap
cp -Rp /KNOPPIX/* /mnt/hda1/source
cp /cdrom/index.html /mnt/hda1/master
cd /cdrom/KNOPPIX
mkdir /mnt/hda1/master/KNOPPIX
find . -size -1000000 -type f -exec cp -p \
-- parents {} /mnt/hda1/master/KNOPPIX \;
cd ~knoppix

Now I was ready to start customizing. I started by downloading the image files from the support box and then transformed the startup image into the format I would need later:


lftp -u <<support box userid>>,<<support box
    password>> <<support box ip number>>
get startup.bmp
get knoppix.jpg
exit
bmptoppm startup.bmp | ppmtolss16 >logo.16

Next, I went to the boot filesystem to change key defaults:


mkdir ~knoppix/bootimg
chmod 664 /mnt/hda1/master/KNOPPIX/boot.img
mount -o loop /mnt/hda1/master/KNOPPIX/boot.img \
    ~knoppix/bootimg
cd ~knoppix/bootimg

From here, I edited syslinux.cfg. Within syslinux.cfg on the first and second APPEND lines, I had to change the VGA value to vga=788 and then insert the commands screen=800x600 desktop=icewm. Finally, at the end of the file I deleted a number of # signs so the final file was no larger than it was when I started. Then I saved the results.

It was time to boot the logo, so I entered:

ls -l ~knoppix/logo.16
ls -l logo.16

Space in the boot filesystem was limited; if the new logo file was the same size or smaller than the old logo, I was fine and could continue. If not, I had to go back and redo the boot logo to make it smaller:

mv ~knoppix/logo.16 .
chmod 744 logo.16

Then I had to edit the text that showed up under the logo in the file boot.msg. I ignored the first two lines, they contain the codes to load the logo image, and made sure the third line contained less than 80 characters. After saving the file and exiting, I unmounted the boot filesystem and reset the file permissions:

cd ..
umount bootimg
chmod 444 /mnt/hda1/master/KNOPPIX/boot.img

To fix the wallpaper, I used:

cd /mnt/hda1/master/KNOPPIX
mv ~knoppix/knoppix.jpg background.jpg

Had I needed to add a software package, I would have entered:


wget <<url and name of required package>>
mv <<package name>> /mnt/hda1/source

Due to the oddities of compression in Knoppix, you can have a situation where without adding or removing software you can end up with a too-large filesystem. So I removed unneeded software with:


chroot /mnt/hda1/source
dpkg -P <<name of an unneeded package>>

I got rid of games, the server and high-end office software. Whenever I added something, I had to take away something larger. Having removed these items, I was able to add the Flash plugin. License terms disallow the distribution of the plugin files with a Linux distribution, so to get around this I downloaded and installed the Flash files at bootup. To do this I edited the file /usr/bin/install_flashplugin.sh; after the first block of comments, I put in the line sleep 30 and changed the interactive line to interactive="no". I then saved the file and exited.

Next, I created the file /etc/rc5.d/S99flashplugin and added the following lines:


#!/bin/bash
su - knoppix -c /usr/bin/install_flashplugin.sh &

and saved the file. I fixed permissions with:

chmod 644 /etc/rc5.d/S99flashplugin

Once this was done, I pressed Ctrl-D to leave chroot, and then I deleted the history file:

rm /mnt/hda1/source/root/.bash_history
touch /mnt/hda1/source/root/.bash_history
chmod 600 /mnt/hda1/source/root/.bash_history

Next, I started Mozilla, edited the bookmarks, set the default home to the convention home page and tweaked the default settings. These changes were stored on the RAM disk; to move them onto the hard disk I used:

cp -r ~knoppix/.mozilla/knoppix/ujixazk6.slt/*
↪/mnt/hda1/source/etc/skel/.mozilla/knoppix/
↪ujixazk6.slt
chmod -R 644 /mnt/hda1/source/etc/skel/.mozilla/
↪knoppix/ujixazk6.slt/*

Now that I had assembled the software, I created the compressed filesystem:


mkisofs -R -U -V "KNOPPIX.net filesystem" -P \
"KNOPPIX www.knoppix.net" -hide-rr-moved \
-cache-inodes -no-bak -pad /mnt/hda1/source | nice -5 \
/usr/bin/create_compressed_fs - 65536 > \
/mnt/hda1/master/KNOPPIX/KNOPPIX

During the above process, I received and ignored a warning message that the filesystem was not ISO 9660. This process was the slow step, taking about an hour to complete on a Pentium II 350. Afterward, I created the CD as a whole:

cd /mnt/hda1
mkisofs -pad -l -r -J -v -V "KNOPPIX" -b \
KNOPPIX/boot.img -c KNOPPIX/boot.cat -hide-rr-moved \
-o /mnt/hda1/knx/knoppix.iso /mnt/hda1/master

From here, I used LFTP to move the resulting file to the support box for burning onto CD-R.

Some issues came up while polishing Knoppix, including the room's layout, power supply and router situation. In terms of room layout, I went with a large rectangular arrangement that left enough space for people to be comfortable, kept most cables from being a possible tripping hazard, placed the switches away from mischief and left a fairly safe place for volunteers to store their backpacks/bags. The cables that did have to cross the floor were covered with heavy cloth tape to stay safe. The downside to this arrangement was that I was limited to having roughly 28 machines in the room.

Before posting room rules, I consulted with the convention volunteer lawyer, Ken Smookler. The result was a sheet that disclaimed responsibility if anything went wrong and reserved the right to remove any being causing trouble (the word being used more out of concern for pets than extraterrestrials, but it legally covered us for both).

There wasn't enough power in the room to support 28+ machines, so a month before the convention I arranged with an electrician at the convention site to have extra outlets installed. In calculating power needs, I assumed 5A per PC (a typical maximum for the PCs I was looking at) and 2A per monitor. I knew the PCs would not consume their rated maximum, so I would have a comfortable safety margin. So I ordered the installation of 16 × 15A circuits (two PCs and two monitors per circuit, one circuit for switches/hubs and one circuit for laptops). This is where most of the Internet Lounge's budget went, and power never was a problem.

For the router, I considered using a Coyote Linux box similar to ones I previously had built. The problem with using a homemade router, though, was the time it would take away from other preparation work. Plus, dealing with failure would require more than running to a shop with the receipt for a warranty exchange. So, I bought a basic D-Link router/DHCP server from an office supply shop that had long hours, located near the convention site.

Six days before the convention I found out what sort of machines I would be getting and was able to start testing hardware. They were Pentium II 400MHz boxes with 128MB of RAM. KDE could have run on them, but IceWM ran great. Four days before the convention, I found out a new sponsor had to be listed on the systems. Three days before the convention, the machines shipped to the convention site. Two days before the convention, I received final approval of the setup from senior convention committee member Lance Sibley, and I started burning CD-Rs, burning a few spare CD-Rs just in case.

The day the computers shipped I got a report that some of the machines had been banged around in transit, and two arrived at the convention site with problems. Although the plan was to have 28 machines, only 26 were available. The day before the convention I did setup with volunteers Robert Eveleigh and Juan Sanmiguel. A few problems turned up, including a bad switch. A call to my office got a replacement, which necessitated buying an Ethernet crossover cable at a nearby office supply store.

Once the convention started the Internet Lounge ran 24 hours a day for the duration. So, I couldn't stick around all the time to watch things, and a number of non-Linux administrators (including Robert and Juan) monitored the room. Thanks to Knoppix, In the event of problems or oddities, I could tell people simply to reset a machine. Because the hard drives weren't being used, this was a fine solution.

Figure 1. A view inside the Lounge showing the central square. One of the major volunteers, Juan Sanmiguel, is shown on the right-hand side of the picture.

Wireless access for the convention had been considered briefly but the idea was rejected for several reasons, including cost. This did not stop wireless access from happening, though. One convention attendee, Keith Lofstrom, wanted wireless access, and he put his money where his mouth was by bringing in an 802.11b wireless hub, a feature that proved popular.

There were grumbles about where the Lounge was located relative to the rest of the convention. Some people wished I had installed a few more pieces of software, including AIM and Yahoo instant messenger clients and automatic updates from a timeserver (some of the PC clocks drifted). There also were requests for a printer, but setting up a payment system to cover paper/toner costs would have been another significant project.

Still, Mozilla and IceWM did not cause any trouble for this crowd. The only real lineup for computers occurred just after the Hugo Awards ceremony, during which awards for the best of the previous years' science fiction were presented. Fortunately, that line didn't last long, and for most of the time the Lounge was busy if not full. Overall, users' reactions were positive from those who had never used Linux, including one person who said this was the best Internet Lounge ever.

Lessons learned: the instant messenger demand surprised me and the overlooked timeserver would need to be looked at in the future. Still, the ability to set up machines quickly and to make tweaks to the setup would not have been possible without Knoppix.

Colin McGregor (colin@mcgregor.org) works for a charity, does consulting work on the side and has served as President of the Toronto Free-Net. He also has made presentations at the Toronto Linux User Group New User meetings. He enjoys attending, if not always working at, Science Fiction conventions.

LJ Archive