Monday, February 16, 2009

Setting up a Linux Practice Lab (Part 4)

6. Setup PXE boot server
Link the source location to the web server:
# cd /var/www/html
# ln –s /install install

Install & enable tFTP server & DHCP server:
# yum install tftp-server dhcp
# chkconfig tftp on
# chkconfig dhcp on
# service tftp start

Install Kickstart Configurator:
# yum install system-config-kickstart

Download & install system-config-netboot to configure the PXE (This tool is not shipped with RHEL5)

Install the packages:
# rpm -Uvh system-config-netboot*.rpm
(If there are any listed dependencies like alchemist or gnome-python2, install them with yum)

Configure Kickstart
# system-config-kickstart
Configure these options:
Basic configuration – Perform Installation in interactive mode
Installation Method – HTTP Server:, Directory: install
Display Configuration – 24bit, 1024x768, Start X on boot.
Save as ks.cfg in /var/www/html

Configure the PXE Boot:
# system-config-netboot
(If starting the Network Booting Tool for the first time, select Network Install from the First Time Druid. Otherwise, select Configure => Network Installation from the pull down menu, and then click Add.)

Configure these options:
Operating system identifier: RHEL5.1
Description: Redhat Enterprise Linux 5 U1
Selects protocol for installation: NFS
Location: /install

Configure DHCP Server:
# vi /etc/dhcpd.conf

Insert the following contents:
ddns-update-style none;
allow booting;
allow bootp;
default-lease-time 21600;
max-lease-time 43200;

option routers;
option subnet-mask;
option domain-name "";
option time-offset -18000;
subnet netmask {



class "pxeclients" {

match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";


filename "linux-install/pxelinux.0";


# Repeat the following section as necessary for every student machine used in the class

host machine1 {

hardware ethernet 00:0b:db:e9:77:54;

option host-name "";


Save the file.

Start the service:
# service dhcpd start

That's it for the PXE installation server. I went on to configure more NFS and Samba shares for the students to practice on. It is all very simple, so I'll end this topic here. Cheers.

Setting up a Linux Practice Lab (Part 3)

4. Creating the Yum Repository
Install the yum repository builder.
# cd /repo/Server
# rpm –ivh createrepo-*.rpm

Create the repository.
# cd /repo
# createrepo -g repodata/comps-rhel5-server-core.xml Server
# cp /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Server

5. Setup web server to host the repository
Make sure you've installed the web server during installation, then proceed with these.
# cd /var/www/html
# ln –s /repo/Server server
# chkconfig httpd on
# service httpd start

Open the browser & browse to http://localhost/server to check that the web server is running (you should see the rpm files listed)

Now to setup yum to point to the new web repository
# cd /etc/yum.repos.d
# cp rhel-debuginfo.repo trainingserver.repo
# vi trainingserver.repo

Modify the file to look like this:
name=Red Hat Enterprise Linux Training Server

Save the file. :wq
# yum update

Note: You can get the students to copy the yum setup to their systems with this command:
# scp root@ /etc/yum.repos.d/

That's it for making your local yum repository. Next I'll talk about setting up the server for PXE boot installations.

Thursday, February 12, 2009

Setting up a Linux Practice Lab (Part 2)

Installing the Server

This is the main server used throughout the class for remote installation & as a yum repository.

1. Installation
Install using CD boot method. The required setting changes are listed below in order of appearance. All other options are to be left at default.
Skip entering Installation Number
Partitioning: Create custom layout









Network Devices: Edit - Disable DHCP and IPv6.
IPv4 address: Netmask:
Set hostname manually to:
Set root password to: redhat
Select to install the Web Server. No need to customize software selection
During first boot setup: Disable Firewall and SELinux
Set Up Software Updates: Select: “No, I prefer to register at a later time” and “No thanks, I’ll connect later”
Create User: user with Password: password

2. Installation source setup
Extract content of all 5 CDs into a single directory called /install

# unalias cp
# cp –r /media/RHEL-5\ i386\ Disc\ X/* /install
(Where X is the number of the disk that you are copying, beginning with 1 for the first disk, and so on)

Copy contents the Server directory on all 5 CDs into the /repo/Server directory. This can be done using either cp or simply drag & drop in Nautilus.

# cp –r /media/RHEL-5\ i386\ Disc\ X/Server/* /repo/Server

3. NFS Setup
# vi /etc/exports

Add the following line:
/install *(ro,no_root_squash)
/repo/Server *(ro,no_root_squash)

Save the file. :wq

Check the syntax:
# exportfs –a
Start-up the NFS Service:
# service nfs start
Set the NFS Service to start-up on boot:
# chkconfig nfs on
Confirm NFS shares are exported:
# showmount -e

In part 3, I'll go into setting up a local yum repository. (Because my lab is in an isolated LAN)

Setting up a Linux Practice Lab (Part 1)

As part of my job, I needed to setup a lab for teaching RHEL5. After much trial and error, I managed to setup a fairly decent Linux lab. I've decided to post all my notes and self documenting setup guides to this blog, at least so that I have access to it wherever I go. A bonus if it helps someone else. So here goes:

Lab Equipment Notes

Common Requirements for all systems used in this Lab:
* Intel Chipset Motherboard (Avoid ATI/NVIDIA/VIA)
* Intel or Broadcom Gigabit/100/10 Ethernet card
* Integrated Intel Graphics GMA950 or older (avoid GMA 3100)
* If a graphic card is needed, use NVIDIA (avoid ATI)
* PS/2 or USB keyboard and mouse (avoid Wireless or Bluetooth)
* DVD/CD-ROM Drive (IDE, avoid SATA or SCSI)

1 unit Server with the following minimum hardware requirements:
* Intel Pentium 4 with HT/Dual Core running at minimum 2 GHz
* 2GB of Dual Channel DDR2 SDRAM
* 80GB Hard Disk Drive (SATA or IDE, avoid SCSI or SAS)

A desktop or notebook computer for each student with the following hardware requirements:
* Intel Pentium 4 with HT/Dual Core running at minimum 1.20 GHz
* 512MB of DDR SDRAM
* 20GB Hard Disk Drive (SATA or IDE, avoid SCSI or SAS)

1 unit Gigabit/100Base-T unmanaged switch with enough ports for all the students PCs and the server.

Ethernet cables to connect all the systems to the switch.

Lab Setup Notes

1. Connect all the systems together using the switch into a simple LAN setup
2. Follow the next section on installing the Server
3. Once the Server is properly setup, test all the students systems for hardware compatibility by performing a test installation on all systems.
4. Change out any problem units that fail to install properly.
5. Common issues faced are:
- Incompatible disk drive controller (no disks detected)
- Incompatible BIOS Assisted RAID (disks detected instead of array, disable these in the BIOS)
- Incompatible video card (blank screen or corrupted video)
- Incompatible optical drives (usually SATA)

Monday, February 2, 2009

FLOSS Awareness in Malaysia

Over 2 years ago when I started this blog I wrote about the state of FLOSS awareness in this country. 2 years on, looking at where we're at now, it's depressing to see not much has changed.

I've been doing what I can, helping out in the local groups & forums. Educating & offering help, especially to newbies and easing them in on the ideals of Free Software. It's an uphill struggle & I'm pretty sure will continue to be so for a long time.

Of course, don't forget to bring a towel.