8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23ai | Misc | PL/SQL | SQL | RAC | WebLogic | Linux
Home » Articles » Linux » Here
PXE Network Installations (RHEL6 / OL6)
During PXE network installations, the client's network card broadcasts for information from a DHCP server. In addition to the normal network information, the DHCP can also return details of a TFTP server with the necessary boot files, allowing the client to start a network installation.
In this article I'm going to walk through the steps performed to automate my OL6 installations using PXE network installations. The setup is the same on RHEL6. In my case, all the servers (HTTP, TFTP and DHCP) reside on the same server (192.168.0.192).
- General Configuration
- HTTP Configuration
- Kickstart
- TFTP Server
- DHCP Server
- PXE Configuration
- Boot Server
Related articles.
- PXE Network Installations (RHEL5 / OL5)
- Kickstart - Automated Installations of RHEL and Oracle Linux
General Configuration
It's probably a good idea to set SELinux to permissive and turn off the Linux firewall until you've got everything working. You can then tighten things up if you want.
Edit the "/etc/selinux/config" file, setting the following parameter value.
SELINUX=permissive
The server will need to be rebooted for this to take effect.
The firewall is turned off using the following commands.
# service iptables stop # chkconfig iptables off
HTTP Configuration
The installation files can be presented using HTTP, FTP or NFS. In this example we will use HTTP.
Install the HTTP server and make sure it starts on reboot.
# yum install httpd # chkconfig httpd on # service httpd start
To make the installation media available from the HTTP server, create a new directory under the "/var/www/html" directory.
# mkdir -p /var/www/html/OL6
You can mount a DVD or ISO image and copy the files under the new directory, but it is easier to mount the ISO image of the installation media directly. You can do this by adding the following entry to the "/etc/fstab" file. Adjust the path to the media as required.
/host/software/os/oel/OracleLinux-R6-U3-Server-x86_64-dvd.iso /var/www/html/OL6 udf,iso9660 user,loop 0 0
The media will now be mounted automatically after reboots, but we need to mount it now.
# mount /var/www/html/OL6
The media should now be available over HTTP using a URL like this (http://192.168.0.192/OL6).
Kickstart
You need to place a Kickstart file on the HTTP server also. You can either build a new Kickstart file or modify an existing one.
To build a new one, install the Kickstart Configurator.
yum install system-config-kickstart
Start the application from the menu (Applications > System Tools > Kickstart), or run the system-config-kickstart
command from the shell. Enter all the required installation choices and save the file under the "/var/www/html" directory.
The Kickstart Configurator doesn't handle the Logical Volume Manager (LVM), so if you want the installation to use the LVM you need to amend the resulting file. The available Kickstart options are listed here.
Alternatively, copy the "/root/anaconda-ks.cfg" file from a previous successful OL6/RHEL6 installation and amend it.
In the following section my Kickstart file is called ol6-112-server-ks.cfg and saved in the "/var/www/html" directory, making it available from "http://192.168.0.192/ol6-112-server-ks.cfg".
Kickstart is discussed here.
TFTP Server
Install the TFTP server, enable it and make sure it start automatically on reboot.
# yum install tftp-server # mkdir /var/lib/tftpboot/pxelinux.cfg # cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ # chkconfig tftp on # service xinetd start # chkconfig xinetd on
DHCP Server
Install the DHCP server and make sure it starts on reboot.
# yum install dhcp # chkconfig dhcpd on
If the "/etc/dhcp/dhcpd.conf" file is missing, create it with the following contents. Remember to amend the "next-server" entry to point to your TFTP server.
Allow booting; Allow bootp; authoritative; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.1; option subnet-mask 255.255.255.0; option domain-name "localdomain"; option domain-name-servers 192.168.0.4; default-lease-time 21600; max-lease-time 43200; range dynamic-bootp 192.168.0.200 192.168.0.253; filename "pxelinux.0"; next-server 192.168.0.192; }
Start the DHCP server.
# service dhcpd start
PXE Configuration
Create a link to the mounted ISO image, create the necessary directories and make sure all files are in the correct place.
# ln -s /var/www/html/OL6 /var/pxe/OL6 # mkdir /var/lib/tftpboot/OL6 # cp /var/pxe/OL6/images/pxeboot/vmlinuz /var/lib/tftpboot/OL6 # cp /var/pxe/OL6/images/pxeboot/initrd.img /var/lib/tftpboot/OL6 # cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/
Create or edit the "/var/lib/tftpboot/pxelinux.cfg/default" file to configure the boot menu.
timeout 100 default menu.c32 menu title ==== Boot Menu ==== label 1 menu label ^ 1) OL6-112-Server kernel OL6/vmlinuz append initrd=OL6/initrd.img ks=http://192.168.0.192/ol6-112-server-ks.cfg ksdevice=eth0
Boot Server
Boot the new server and you will be presented with the following boot screen.
Use the arrow keys to select the required installation and hit the return key. The installation will proceed normally.
For more information see:
- Setting up and Installation Server
- Kickstart Options
- PXE Network Installations (RHEL5 / OL5)
- Kickstart - Automated Installations of RHEL and Oracle Linux
Hope this helps. Regards Tim...