Booting over the network

Red Hat Enterprise Linux and PXE

It's possible to install Red Hat Enterprise Linux (RHEL) or any of its clones like CentOS over the network, which is useful when you want to install a workstation or server without a floppy or CD/DVD drive. This is done through PXE, which your to-be-installed server has to support.

First, issue on your existing server the following commands:

 # pxeos -a -i centos -p HTTP -D 0 -s <IP_address_of_existing_server> -L /centos_5_cd1 /path/to/centos_5_cd1/images/pxeboot
 # pxeboot -a -O /path/to/centos_5_cd1/images/pxeboot <IP_address_of_new_server>
 # yum -y install tftp tftp-server dhcp httpd

Configure the DHCP server configuration file /etc/dhcpd.conf as follows:

 ddns-update-style interim;
 subnet netmask { # Your network
    filename "linux-install/pxelinux.0";
    next-server;                # Your existing server's address
    range dynamic-bootp;        # Your new server's address

The DHCP server logs enough, but tftp doesn't. So add to /etc/xinetd.d/tftp the flags -v -v -v to line server_args

This last IP address is VERY important -- only a client who receives this IP address of the DHCP server will get access to the tftp files.

Now test whether tftp works with the tftp client:

 $ tftp
 tftp> get linux-install/pxelinux.0

In file /var/log/messages, something like the following should appear:

 xinetd[4691]: START: tftp pid=4698 from=
 in.tftpd[4699]: RRQ from filename linux-install/pxelinux.0

Now connect your new server to the network and power it on. You should probably configure the machine that it tries to boot using PXE. Again, after powering on in /var/log/messages something as follows should appear.

 dhcpd: DHCPDISCOVER from 00:18:8b:f8:24:90 via eth0
 dhcpd: DHCPOFFER on to 00:18:8b:f8:24:90 via eth0
 dhcpd: DHCPREQUEST for ( from 00:18:8b:f8:24:90 via eth0
 dhcpd: DHCPACK on to 00:18:8b:f8:24:90 via eth0
 in.tftpd[5089]: RRQ from filename linux-install/pxelinux.0 
 in.tftpd[5089]: tftp: client does not accept options 
 in.tftpd[5090]: RRQ from filename linux-install/pxelinux.0 
 in.tftpd[5091]: RRQ from filename linux-install/pxelinux.cfg/01-00-18-8b-f8-24-90 
 in.tftpd[5091]: sending NAK (1, File not found) to
 in.tftpd[5092]: RRQ from filename linux-install/pxelinux.cfg/C0A80006 
 in.tftpd[5093]: RRQ from filename linux-install//path/to/centos_5_cd1/images/pxeboot/vmlinuz 
 in.tftpd[5094]: RRQ from filename linux-install//path/to/centos_5_cd1/images/pxeboot/initrd.img

The installation should now start. However, PXE is only used to boot the new server. The installation files themselves will be retrieved through NFS, HTTP or FTP. So configure one of those servers and follow the installation on the new server its screen as well as through the logs on the existing server. Should any problems arise, it's then easier to determine where the problem lies.