APPLIES TO:

Linux OS - Version: 4.4 to 5.3 - Release: OEL4U4 to OEL5U3 Linux x86 Linux x86-64

GOAL

To be able to boot into Rescue Mode with PXE

SOLUTION

Requirements

  • DHCP Server
  • TFTP Server
  • HTTP Server
In the following Example the dhcp, tftp and http server is 192.168.79.110. The server that should be booted with PXE has the MAC Address: 00:16:3E:53:17:D7

Configuration

  1. add the following entry into your dhcpd.conf
    host pxetest { hardware ethernet 00:16:3E:53:17:D7; next-server 192.168.79.110; filename "/el4u5/pxelinux.0"; }
    - restart the dhcpd server
  2. kickstart config ( in /var/ww/kickstart/ks.cfg ):
    lang en_US.UTF-8 langsupport --default=en_US.UTF-8 en_US.UTF-8 keyboard us mouse none url --url http://192.168.79.110/el4u5/ network --bootproto=dhcp
  3. mount an Enterprise Linux iso file
    # mount -o loop Enterprise-R4-U5-i386-dvd.iso /var/www/el4u5
  4. copy all necessary files to /tftpboot/el4u5
    # up2date syslinux # mkdir /tftpboot # mkdir /tftpboot/el4u5 # cp /usr/lib/syslinux/pxelinux.0 /tftpboot/el4u5 # mkdir /tftpboot/el4u5/pxelinux.cfg # touch /tftpboot/el4u5/pxelinux.cfg/default # cp /var/www/el4u5/images/pxeboot/* /tftpboot/el4u5/
  5. configure /tfpboot/pxelinux.cfg/default entries:
    default linux timeout 100 prompt 1 LABEL linux KERNEL vmlinuz APPEND initrd=initrd.img ramdisk_size=10000 text rescue ks=http://192.168.79.110/kickstart/ks.cfg
  6. httpd config ( not necessary if you already have a running httpd )
    DocumentRoot "/var/www" # This should be changed to whatever you set DocumentRoot to. # <Directory "/var/www"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>
    - start httpd
    # /etc/init.d/httpd start
  7. tftp server - install tftp server
    # up2date tftp-server
    - enable the tftp server
    # /sbin/chkconfig --level 345 xinetd on
    - in /etc/xinetd.d/tfpt change
    "disable = yes"
    to
    "disable = no"
    - restart xinetd
    # /etc/init.d/xinetd restart
    Now your client 00:16:3E:53:17:D7, if pxe boot enabled, will boot into Rescue Mode.