Wednesday, January 25, 2012

HOW TO Remote Network Installation of Red Hat Linux

This is a summary of commands and tools I found useful to do the  Network Installation in a Diskless Environment

Kickstart is an automated installation tool set used by Red Hat Linux to perform automated or unattended OS Installation and Configuration. Process in simplified steps
1. Boot the machine from a CD/DVD, USB device or over the network using PXE, DHCP or TFTP
2. The Kickstart file shall be located on the boot media, accessible over the network, and will be downloaded
3. Linux OS installation is launched, the system will consult the kickstart file for the location of the Installation Tree file.
4. After accessing the installation tree, the rest of the configuration information should be in the kickstart file without too much need for user intervention.

Jumpstart is similar to Kickstare, for Solaris OS. Easier to manage multiple system installations with the same configuration over time (meaning you probably can't do them all simultaneously) but I could be wrong.
1) Move and Expand Files Required on the TFTP Server
Red Hat AS 5 Operating System, example: rhas5_u2.tar
Rebuild Server Kickstart file, see AS5_U2ks.cfg
DHCP configuration file, see dhcpd.conf

On the host asting as the NFS and TFTP server, create a directory called /apps/LINUX
Place the rhas5_u2.tar file there
Expand the file: tar -xvf rhas5_u2.tar

2) Edit the DHCP Configuration File
The host which is to host the NFS mounted OS files and conifguration files must provide dynamic hosting of the IP addresses.
Copy the dhcpd.conf file to the /etc
Type: dhcpd service reload
Type: dhcpd service restart

3) Place RedHat in the NFS mount directory
Make the RedHat installation files in a directory that can be NFS mounted by the client host. Add this line to the /etc/exports file using a vi editor.
/apps/LINUX 192.168.2.1 (sync) *(ro)
Note, please use your own specified IP address. This is the host which is the client PXE booting the requested O/S.  This allows the host to PXE boot and access the NFS mounted files also called kickstart and linux images.

The NFS server must be restarted with the command issued in terminal window:
service NFS restart

4) Enable TFTP
To list the status of all the services (user should be logged in at runlevel 5)
in  a terminal window  type the command :   ntsysv

A window opens with an alphabetical (a-z) list of services. Use the  Down arrow key to scroll to  “iptables”  . If there is an asterix next to “iptables” this means it is selected to start at reboot. The “iptables” service is for the firewall and it should be off.   Use the  spacebar to toggle the asterix off so that the “iptables” service is inactive at startup.


Use the Down arrow key to scroll to “tftp” service . Use the spacebar to toggle the asterix on  so that the “tftp” service is active at startup.

Use the TAB key to highlight “OK” button and select Enter to dismiss the window.

5) Disable Selinux
In a terminal window  type the command “sestatus” to display the security status.
SELINUX status should be displayed as   DISABLED.

 If it is enabled , edit the /etc/selinux/config  file  and change the line from: selinux=enabled   to: selinux=disabled

Save the file

6) Reboot/ BIOS settings for PXE Network Enabling
Reboot the server .

When the BIOS is displayed (DELL Logo) press F2  (Setup).
The setup window will load. Using the down arrow scroll down to integrated devices.

Enable eth0  with PXE enabled.
Enable  eth1  without PXE enabled.

Press escape and save the changes.
The server will continue to boot from here.

The server can now provide DHCP related protocols on eth0.

The server which will be PXE booting to load the OS must also have eth0 enabled with PXE and have physical network connectivity to this (in this example 192.168.2.1) server.


Under construction:
7) Setup Network booting on the boot server

Sample Kickstart file

Sample DHCP Configuration File for Boot Server

Bootable CDROM install option selection/ Create the Anaconda-ks.cfg file

No comments:

Post a Comment