Technical:Developer:BuildHowto:Enterprise

From K12LTSP Wiki

Jump to: navigation, search

Prerequistes: some of the steps below assume you know how to read/write/modify source code and have reasonable knowledge of your distribution of choice and its packaging methods. Anaconda and RPM are assumed (Red Hat, ~YellowDog, etc), so you will need to translate these instructions if you use a distro with a different installer/package management (Debian, Gentoo, Slackware, etc).


We cannot muck directly with the installer code, as we can with the Fedora version|, so we have to it break into several steps.

First, we need to get the original install to be as close-as-possible to how we need it. The defaults are:

  • eth0 should default to the IP address of 192.168.0.254 with a netmask of 255.255.255.0
  • eth1 should default to DHCP, and be active on boot
  • the firewall should default to allowing all traffic on eth0, and just ssh on eth1
  • the package selection should default to including bind, dhcp, and tftp-server, as well as the usual desktop packages such as GNOME and ~OpenOffice.org

We could just ask the user to set these themselves (if they will be using the default configuration), but this process is tedious and error-prone. Better to have it automated.

The easiest method I've come up with so far is to use an "updates" floppy. An updates floppy can be used to over-write parts of the anaconda installer. The anaconda installer can be found in /usr/lib/anaconda (if you have the anaconda package installed, that is). Make an EXT2 formated floppy (mke2fs /dev/fd0) and mount it (mount /mnt/floppy). You can now copy the *.py files from /usr/lib/anaconda/ that you want to modify to /mnt/floppy. In this case, we want to modify network.py and firewall.py. The actual changes made to network.py and firewall.py are beyond the scope of this document, diff my versions against the originals to see how I did it (it may not be pretty, but it does work).

We can also alter the packages selected by default by copying comps.xml to /mnt/floppy and editing it. (comps.xml can be found in ~RedHat/base on CD1 or /usr/share/comps/i386/ if you have the "comps" rpm installed). See the Fedora documentation (http://fedora.redhat.com/projects/anaconda-installer/comps.html) for details on how to edit comps.xml. In this case, I just added <groupreq> entries in the Base group for all of the other groups I wanted installed by default (such as gnome, graphics, office, etc). The only gotcha was that some of the groups I added had a <groupreq> for Base, creating a loop that caused the installer to bomb. I removed the offending <groupreq>base</groupreq> entries and all was well.


Now we can use this floppy by booting off the original install CDs by typing "linux updates" at the boot prompt. If the user takes all of the defaults (assuming they have a default configuration, of course), at this point the installer should proceed with the right network, firewall, and package selections required for the post-install steps.


Once the system is booted, and the user goes through the firstboot processes (assuming they register the machine with the RHN, etc), they can move on to the second stage of installing the K12LTSP-specific software.

Assuming they have signed up for the RHN and have selected the "K12LTSP" sub-channel (after such channel exists, of course), they can simply type:

up2date -i k12ltsp-core

to install the core K12LTSP files. This is done by making a "shell" or "meta" package that does nothing more than require all of the necessary packages. Up2date will figure out all of the dependancies and download the right packages.

For testing purposes, we can download and install yum and manually configure it to point to a testing repository (currently ftp://k12linux.mesd.k12.or.us/pub/K12LTSP/testing/EL/RPMS).

The final stage is to run the K12LTSP init script: /opt/ltsp/templates/k12linux/K12Linux-LTSP-initialize and reboot. The server should now be able to boot terminals.

The other portions, such as the Education applications, can be installed as a group by installing the corresponding shell package:

up2date -i k12ltsp-education

Personal tools