Tuesday, December 9, 2008

Preboot Execution Environment(PXE) Booting

The Preboot eXecution Environment (PXE, aka Pre-Execution Environment, or 'pixie') is an environment to boot computers using a network interface independently of available data storage devices (like hard disks) or installed operating systems.

PXE was introduced as part of the Wired for Management framework by Intel and is described in the specification (v2.1) published by Intel and Systemsoft on September 20, 1999. It makes use of several network protocols like IP, UDP, DHCP and TFTP and of concepts like GUID/UUID and Universal Network Device Interface and extends the firmware of the PXE client (the computer to be bootstrapped via PXE) with a set of predefined APIs.

The term PXE client only refers to the role that the machine takes in the PXE boot process. A PXE client can be a server, desktop, laptop or any other machine that is equipped with a PXE boot code.

In this article I will show how to configure a Server for PXE booting and also a client for the same in RHEl5.

Diskless installation/PXE installation-Article :

Server hostname Name - station1
Server IP Address -
DHCP Server -

Step-1 --> Set up DHCP Server on
# vi /etc/dhcpd.conf
ddns-update-style none;
subnet netmask {
option routers;
option subnet-mask;
option domain-name "example.com";
option domain-name-servers;
default-lease-time 21600;
max-lease-time 43200;
option root-path "/tftpboot/";
filename "pxelinux.0";
:wq (Save this file)
# service dhcpd restart
# chkconfig dhcpd on

Step-2 --> Now Setup PEX boot.
# mkdir /tftpboot
# cp /root/pxelinux.0 /tftpboot/.
# cp /root/memdisk/ /tftpboot/.
Note: Pl scrap your mail Id's for -- ("pxelinux.0", "memdisk") files.

Step-3 --> Configure 'tftp' server
# chkconfig tftp on ( This will enable tftp from /etc/xinetd.d/tftp file )
# service xinetd restart
# /etc/init.d/dhcpd restart

Step-4 --> Setup PXE file's from the RedHat 1st cd. Insert RedHat 1st disk and copy the 'initrd.img' and 'vmlinuz' to /root directory.
# cd /root
# cp initrd.img /tftpboot/.
# cp vmlinuz /tftpboot/.
also copy and rename to
# cp initrd.img /tftpboot/fc2-initrd.img
# cp vmlinuz /tftpboot/fc2-vmlinuz
# cd /tftpboot
# mkdir pxelinux.cfg
# cd pxelinux.cfg
# touch default
# vi default
default install
# Always prompt
prompt 1
display pxeboot.msg
# Boot automatically after 30 seconds in tenths of a second
timeout 300
label local
localboot 0
label install
kernel vmlinuz
append initrd=initrd.img
:wq ( save this file )

Step-5 --> Now mount the ISO

Let's copt the RedHat ISO to /tmp directory ( ISO Name ->RHEL5.0_1.iso)

# mount -o loop -t iso9660 /tpm/RHEL5.0_1.iso /media/cdrom
# mount /dev/cdrom /media/cdrom

Step-6 --> Make NFS Share

# vi /etc/exportfs

/media/cdrom *(rw,sync)

:wq (Save the file)

# service nfs restart
# chkconfig nfs on
# service dhcpd restart

Step-7 --> Now just set your client to boot from network(F12)

boot: PRESS Enter.....

No comments:

Post a Comment