Internet Lab Manual: Live CD

This page describes the configuration of a Live CD for the PCs of the Internet Lab.
With a Live CD, it is possible to boot Linux directly from a CDROM/DVD without
access to the hard drive. Changes to the operating system stay in main memory, and
are lost when the system is restarted.
There are two advantages of using a LiveCD on the PCs of the Internet Lab:

Changes to the Linux configuration are reset whenever the system is rebooted.

Problems due to corrupted operating system or file system are solved by rebooting the affected system.

Below is the LiveCD installation used for the Internet Lab at the
University of Toronto. Credit for the LiveCD installation and the
instructions goes to Majid Valipour.

Introduction

The Live CD for the Internet Lab machines is a remaster of the
PCLOS 2007 operating system.
PCLOS is a Live CD Linux distribution based on the Mandriva distribution.
Our remaster of PCLOS includes all software required by the TCP/IP Internet Lab Manual, and its configuration replicates that found in the book.

The remainder of this page describes how to build and
customize the `Internet Lab Live CD'
(including, installing drivers needed for the specific hardware of the
lab stations).
It is assumed that the reader has knowledge of basic Linux administration.

Building and Customize a Live CD for the Internet Lab

Used terms:

Lab station: Refers to the PCs used in the Internet Lab (PC1, PC2, PC3, PC4). For each lab station, a separate Live CD will be created (The differences
between the Live CDs are minimal). It is assumed that all lab stations
have the same hardware components.

Build station: This is separate PC used to create the Live CDs for the
lab stations. This PC has the Live CD installed on its hard disk, and is used to customize and build the Live CD images for the lab stations.

We have created a Live CD for the Build station, referred
to as `Internet Lab Live CD', which is available for download.

Preparing the build station

The following steps install a Live CD on a PC (the `build station'),
to be used for configuring and creating ISO images for the
lab stations.

Install the Live CD on the build station: After successfully booting up using the Live CD , you can install the PCLOS on a free partition by running the /usr/sbin/draklive-install script. Make sure you have two free partitions ready to install the Live CD (one for `root' and one for `swap').
Note: You can reuse the swap partition of other Linux installations if available.

For more details on how to install the Live CD on the hard disk, refer to the
PCLOS wikipages.

Update your boot loader: If you are installing this Live CD along with other Linux distributions on the same machine, you need to update the boot loader (e.g., grub, or lilo) accordingly to include an entry for this new operating system.

Reboot into your new PCLOS: If you have reached to this point you are ready to customize the distribution and create lab stations' ISO images.

Installing additional software (drivers)

The `Internet lab Live CD' probably has all the drivers necessary to boot
your machine.
However, in some cases, the particular hardware of the lab stations
requires to install new drivers. Adding drivers can
improve performance or usability (For example, we had to update the
graphic card driver to get a higher resolution display.)

The installation of drivers is done for the installed `build station' before
the ISO images for the lab stations are created.
You can install new kernel modules (device drivers) to support the specific hardware of the lab stations and configure the system properly to
load them automatically.
(You may need to edit the files /etc/modprobe.conf, /etc/modprobe.preload, and /etc/modules).
Note: Currently the size of produced ISO image is larger than 700 MB and requires a DVD. The ISO image can be made to fit on a CDROM by by removing some unnecessary software packages.
You can simply use the PCLOS package manager (Synaptic) to remove any unnecessary software at this stage.

Creating ISO images for lab stations

After customizing the local PCLOS copy on the build station, you can now
create one ISO image for each of the lab stations.
PCLOS has provided scripts to build an ISO image.
The differences between the ISO images of the lab station consist of
the host names, the default network configuration with IP addresses,
background images, etc.

If the build station has a different hardware configuration than the lab
stations, then the image you have to use on the lab stations is likely slightly different from that of the build machine (e.g.,
you may need a different Xorg.conf file).

To make the image creation process easier we have developed our own script that modify necessary files that differs from that of the build station before building an image for a lab station.

Make sure there is sufficient free space on '/tmp': The scripts for
creating a Live CD use /tmp by default for creating an image. We suggest to have at least 1 GB of free space before creating each image (About 4 GB for all four images).

Update image specific files: There are a set of configuration files specific to each lab station in ''/usr/share/mklivecd/internetlab''. When creating the image for each lab station, the correct files will automatically replace the corresponding files of the OS for the build station. Currently, the following configuration files exist for each lab station:

/etc/fstab: Identical for all lab stations, but there may be
differences between lab stations and the build station.

/etc/hosts: Contains the hostname for each lab station.

/etc/udev/rules.d/61-net_config.rules: For correctly naming the
interfaces as given in the Lab Manual.

/etc/X11/xorg.conf: Identical for all lab stations, but there may be differences between lab stations and the build station.

/usr/share/wallpaper/mandriva/internetlab/internetlab_background.jpg: Contains a different background for each lab station.

You probably only need to modify the Xorg.conf configuration file to customize
the OS for the lab stations. An easy way to obtain an Xorg.conf is to create a Live CD with active auto-detection capability and to boot the build machine with
this file. Then store the generated Xorg.conf file to use later.

Create the image: To create an ISO image for the lab stations, execute
the command:

#remaster_internetlab imagename

This will create an ISO image with name /tmp/internetlab_$imagename.iso based on the local copy of the PCLOS, and image specific files
under /usr/share/mklivecd/internetlab. To have more advanced control
over available parameters for building the Live CD, we refer to the /usr/sbin/mklivecd script.

Creating and testing images

You can use any burning software to create ISO images. In particular, you can use the K3B burning software that comes with PCLOS.

Note 1: The Live CD image that you can download from the website contains the Qemu emulator that can be used to boot a virtual machine from an ISO
image. You may find it useful for testing newly created Live CD images.

Note 2: Disabling the automatic hardware detection of the PCLOS
can shorten the boot process. Enable/disable these auto-detection capabilities of the PCLOS Live CD by editing the remaster_internetlab script and removing/adding `--bootopt hwdetect=no nofinishinstsall'.