A P P E N D I X  A

Preconfiguring Your Network to Support PXE Installation

The procedures provided in this appendix describe how to preconfigure your Linux network to support PXE installation of Linux software.



Note - These procedures assume that you already have a bootable server that is running the Red Hat Linux operating system. Make sure to follow the instructions specific to the Red Hat Linux version that is installed on your server.





Note - Some of the following procedures might not be necessary if you confirm that the server packages are already in place and configured.



This task includes the following procedures:


Downloading the Required Support Files

If you are using the Sun Fire V60x and Sun Fire V65x Resource CD or have already downloaded the NeoPXE support files to the DHCP/PXE server, you can skip this section.



Note - For Red Hat Linux 7.3 software, you need to use the NeoPXE support files from the Resource CD. The downloadable files are not available at this time.



1. To download the NeoPXE support files, navigate to the downloads page for the appropriate Red Hat version from the following URL:

http://sun.com/servers/entry/v60x/downloads.html

or

http://sun.com/servers/entry/v60x/downloads.html



Note - If your server does not have Internet access, you will need to download the files to a computer that does have Internet access and copy the files to the system that will be your DHCP/PXE server.



2. Download the NeoPXE support file to a /tmp/ directory on the system that will serve as your DHCP and PXE server.

3. Uncompress and extract the contents of the tar file into the /tmp/ directory by typing the following command:

# tar -zxf /tmp/filename

When you extract the file, a directory with all required files is created at /tmp/version-pxefiles/ where version is as for Red Hat Enterprise Linux 2.1 software, rh80 for Red Hat Linux 8.0 software, and rh9 for Red Hat 9 software.

Some of these files in this directory will be needed in the procedures described in the following sections.


Configuring a DHCP Server

Complete the following steps on the server that will be your DHCP server:

1. Power on the server and log in as superuser.

2. Determine whether the DHCP server package is already installed on the server by typing the following command:

# rpm -qa | grep dhcp-

3. If the DHCP server package is not listed, or is less than version 3, download the DHCP package for your Red Hat version:

ftp://ftp.redhat.com/pub/redhat/linux/8.0/en/os/i386/RedHat/RPMS



Note - Although the path above includes the string 8.0, it is the correct path for Red Hat Linux 7.3 and Red Hat Enterprise Linux 2.1 software also. If this site is too busy, you can check http://www.redhat.com/mirrors for alternate download sites.



Install the package by typing the following command:

# rpm -Uvh /tmp/dhcp-version.rpm

# mount /dev/cdrom /mnt/cdrom

# cd /mnt/cdrom/RedHat/RPMS

# rpm -Uvh dhcp-version.rpm

# cd /

4. Set up your DHCP configuration file so that only PXEClient requests receive PXEClient responses.

Add the following entry to the DHCP configuration file (for example, /etc/dhcpd.conf). Refer to the dhcp.conf man page for more information.

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



Note - You can start with a sample DHCP configuration file that is on the Sun Fire V60x and Sun Fire V65x Resource CD, at the following directory: /mnt/cdrom/pxeboot/redhat/7.3

If you downloaded the NeoPXE support for Red Hat Linux 8.0 or Red Hat Linux 9 software, the sample dhcpd.conf file is located in the /tmp/rh80-pxefiles or /tmp/rh9-pxefiles directory.



5. Start the DHCP service by typing the following command:

# service dhcpd start

6. Configure the server to always start DHCP by typing the following command:

# chkconfig dhcpd on


Installing Portmap

Complete the following steps on your DHCP server:

1. Determine whether the portmap server package is already installed on the server by typing the following command:

# rpm -qa | grep portmap

2. If portmap is not listed, insert the Red Hat CD 1 and type the following commands to install the package from the CD:

The package is contained in CD 1 for Red Hat Linux versions 7.3, 8.0, and 9 software and Red Hat Enterprise Linux 2.1 software.

# mount /dev/cdrom /mnt/cdrom

# cd /mnt/cdrom/RedHat/RPMS/

# rpm -ivh portmap-version.rpm

# cd /

3. Remove CD 1 from the server after you type the following command:

# umount /dev/cdrom


Configuring the TFTP Service

Complete the following steps on your DHCP server:

1. Determine whether the TFTP server package is already installed on the server by typing the following command:

# rpm -qa | grep tftp-server

2. If the TFTP server package is not listed, insert the Red Hat Linux CD that contains the package and type the following commands to install the package from the CD:

The package is contained in CD 3 for Red Hat Linux versions 7.3, 8.0, and 9 software, and in CD 2 for Red Hat Enterprise Linux 2.1 software.

# mount /dev/cdrom /mnt/cdrom

# cd /mnt/cdrom/RedHat/RPMS/

# rpm -ivh tftp-server-version.rpm

# cd /

3. Remove the CD from the server after you type the following command:

# umount /dev/cdrom

4. Edit and save the /etc/xinetd.d/tftp file to make the following changes:

a. Change the -s /tftpboot entry to -s /home/pxeboot.

b. Change the disable attribute to no.

5. Restart the xinetd service by typing the following command:

# service xinetd restart


Installing and Configuring the neopxe Boot Server Daemon

Complete the following steps on your DHCP server:



Note - The neopxe server is designed for use with a DHCP server that is running on the same system.



1. Perform one of the following to install the neopxe boot server daemon on your system that is your DHCP server:

# mount /dev/cdrom /mnt/cdrom
# cd /tmp/
# tar -xzf /mnt/cdrom/pxeboot/neopxe/neopxe-0.2.0.tar.gz
# cd neopxe-0.2.0/
# ./configure
# make
# make install

# cd /tmp/
# tar -xzf /tmp/as-pxefiles/neopxe-0.2.0.tar.gz
# cd neopxe-0.2.0/
# ./configure
# make
# make install

# cd /tmp/rh80-pxefiles/neopxe-0.2.0/
# ./configure
# make
# make install

# cd /tmp/rh9-pxefiles/neopxe-0.2.0/
# ./configure
# make
# make install

2. Append the path /usr/local/sbin/neopxe to the rc.local file by typing the following command, making sure to use two greater-than signs:

# echo "/usr/local/sbin/neopxe" >> /etc/rc.d/rc.local

3. Copy the PXE Linux image to your system by one of the following methods:

# mkdir /home/pxeboot
# cp /mnt/cdrom/pxeboot/pxelinux.0 /home/pxeboot

# mkdir /home/pxeboot
# cp /tmp/version-pxefiles/pxelinux.0 /home/pxeboot

Where version is as for Red Hat Enterprise Linux 2.1 software, rh80 for Red Hat
Linux 8.0 software, and rh9 for Red Hat Linux 9 software.

4. Configure the PXE Linux image by typing the following commands:

# mkdir /home/pxeboot/pxelinux.cfg/
# touch /home/pxeboot/pxelinux.cfg/default

5. (If needed) Remove the Resource CD from the system after you type the following command:

# umount /dev/cdrom

6. Edit the /usr/local/etc/neopxe.conf configuration file, which is read by neopxe at startup.

If the neopxe.conf file is not at this location, you can copy it from /tmp/version-pxefiles/neopxe-0.2.0/ if you downloaded the files as shown in Downloading the Required Support Files.

Where version is as for Red Hat Enterprise Linux 2.1 software, rh80 for Red Hat Linux 8.0 software, and rh9 for Red Hat 9 Linux software.



Note - If you are using the Resource CD, the neopxe.conf file is contained in the /mnt/cdrom/pxeboot/neopxe/neopxe-0.2.0.tar.gz file.



Refer to the neopxe.conf man page and the sample neopxe.conf configuration file that are installed in Step 1.

A valid configuration file must have entries for each of the following lines, including at least one service line.

ip_addr=n.n.n.n

prompt=boot-prompt-string

prompt_timeout=timeout

service=service-number,boot-server,boot-file,label

Where:

For example:

ip_addr=192.168.0.1

prompt=Press [F8] for menu...

prompt_timeout=10

service=1,192.168.0.1,pxelinux.0,Linux

service=2,192.169.0.1,nbp.unknown,Solaris


Configuring the NFS Service

Complete the following steps on your DHCP server:

1. Determine whether the NFS service package is already installed on the server by typing the following command:

# rpm -qa | grep nfs-utils

2. If the NFS server package is not listed, insert the appropriate Red Hat Linux CD, and type the following commands to mount the CD and install the package from the CD:

The package is contained in CD 2 for Red Hat Linux 7.3 software and CD 1 for Red Hat Linux versions 8.0 and 9, and Red Hat Enterprise Linux 2.1 software.

# mount /dev/cdrom /mnt/cdrom

# cd /mnt/cdrom/RedHat/RPMS/

# rpm -ivh nfs-utils-version.rpm

# cd /

3. Remove the CD from the server after you type the following command:

# umount /dev/cdrom

4. Add the following line to the /etc/exports file and save it:

/home/pxeboot *(no_root_squash,no_subtree_check,insecure)

5. Start the NFS service by typing the following command:

# service nfs start

6. Configure the server to always start the NFS service by typing the following command:

# chkconfig nfs on



Note - If you are using a DNS server, ensure that DNS entries exist for each address in the range of addresses defined in the PXE subnet dynamic-bootp entry in the dhcpd.conf file.

If you are not using a DNS server, edit the /etc/hosts file to add each address in the range of host addresses found in the PXE subnet dynamic-bootp entry in the dhcpd.conf file.




Disabling the Firewall

If you selected Medium or High firewall security when you installed Red Hat software on the system that will be your PXE server, complete the following steps to disable the firewall so that PXE clients can download from the server:



Note - When you disable the firewall protection on the system that is your PXE server, the security of the data on that server cannot be assured. If this server is networked outside of your local intranet, be sure to re-enable the firewall after downloading software to PXE clients.



1. Stop the ipchains service by typing the following command:

# service ipchains stop

2. Stop the iptables service by typing the following command:

# service iptables stop

3. Stop the ipchains service from starting when you restart the server by typing the following command:

# chkconfig ipchains off

4. Stop the iptables service from starting when you restart the server by typing the following command:

# chkconfig iptables off



Note - You might encounter error messages if the ipchains service is not installed on the server. You can safely ignore these messages.




Installing Red Hat Linux

1. Reboot the server when you have finished all of the configuration steps.

2. Refer to the section in the following list that corresponds with the version of Red Hat Linux that you are installing.