By thomas, Thu, 04/02/2009 - 23:38
We use PXE to boot our machines. Most workstations and servers are capable of PXE booting. The advantage of PXE is that the workstation or server doesn't need physical install media inserted. You can reinstall a machine by rebooting it and selecting the boot menu (which is usually F12).

bios
We configure our machines so that the boot order is hard drive then PXE. For workstations we remove all other options from the bios. In theory someone could own our workstation by plugging it into a private network and re-installing it with their own image using this method, but hopefully that isn't a great risk in your location. If we wish to re-install the machine remotely and we do not have console access (perhaps the machine is located in a client office), we can simply wipe the boot record from the hard drive and reboot. When the machine reboots, it will try to boot from the hard-drive, fail, and then boot from the network.

PXE/DHCP/DNS/TFTP
The first machine you will need to build for your installation system is the PXE boot server. This server will run dhcp, dns, tftp, http and export some filesystems via NFS. To get started install the machine using the install media of your chosen distribution, you should be careful to only install those things that you actually need. For a Red Hat@tm; installation you would select server as the installation profile and add the dhcp, dns, tftp and http packages.

Once your machine has finished installing, let it reboot and then login. Verify that the following packages are installed.

servicepackage
webhttpd
dnsbind, bind-chroot
dhcpdhcp, dhcpv6*
tftptftp-server
*Optional, install if you are going to support IPv6

You can verify a package is installed using either yum or rpm. Below are the instructions for installing the first package, httpd

Using rpm:
If the package is installed:

[root@server0 ~]# rpm -q httpd
httpd-2.2.3-22.el5
If the package is not installed:
[root@server0 ~]# rpm -q httpd
package httpd is not installed
Using yum:
[root@server0 ~]# yum info httpd
Installed Packages
Name       : httpd
Arch       : x86_64
Version    : 2.2.3
Release    : 22.el5
Size       : 3.3 M
Repo       : installed
Summary    : Apache HTTP Server
URL        : http://httpd.apache.org/
License    : Apache Software License
Description: The Apache HTTP Server is a powerful, efficient, and extensible web
           : server.
If the package is not installed, the Repo line above will show the repo that will be used to install the package. In the above, httpd is installed so Repo is "installed".

To Install the package, you can either locate the package on your install media and use rpm, or use yum.

[root@server0 Server]# ls httpd-*
httpd-2.2.3-22.el5.x86_64.rpm      httpd-devel-2.2.3-22.el5.x86_64.rpm
httpd-devel-2.2.3-22.el5.i386.rpm  httpd-manual-2.2.3-22.el5.x86_64.rpm
[root@server0 Server]# rpm -Uvh httpd-2.2.3-22.el5.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:httpd                  ########################################### [100%]

[root@server0  ~]# yum install httpd
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.3-22.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package     Arch         Version              Repository                  Size
================================================================================
Installing:
 httpd       x86_64       2.2.3-22.el5         Server_Base                1.2 M

Transaction Summary
================================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
httpd-2.2.3-22.el5.x86_64.rpm                            | 1.2 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : httpd                                             [1/1] 

Installed: httpd.x86_64 0:2.2.3-22.el5
Complete!
Now that all the essential packages are installed on your machine, we'll configure each of the services individually in the following sections.