Network Installation Linux (4) – PXE

PXE (Preboot Execution Environment) is a server which allows clients to boot from NIC (Network Interface Card). Since 1998, most of NICs and BIOS support PXE agents, especially for Intel’s. For PXE Linux, it works with DHCP and TFTP, which I have mentioned in the past. This time, I will say something about how to set up PXE.

We need pxeos, which is command with bunch of options, or “system-config-netboot”, which is GUI configuration tool. Most of linux distributions have these package. However, if you don’t have it, you can simply “yum -y install system-config-netboot“. After installation, you will find linux-install directory under /tftpboot. Under that directory, you will observe sub-directories and file.

[root@henrydu linux-install]# ls -ltr
total 36
-rw-r–r– 1 root root 13100 2005-12-19 17:03 pxelinux.0
drwxr-xr-x 2 root root 4096 2007-11-08 14:41 msgs
drwxr-xr-x 2 root root 4096 2007-11-08 15:14 pxelinux.cfg

pxelinux.0 is a binary file which renders several basic message to the client screen at the beginning and also follows configuration file under ./pexlinux.cfg to get environment information. There is a default configuration.

default fc7
prompt 1
timeout 5
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg

label rhel5
kernel /rhel5/vmlinuz
append ksdevice=eth0 ks=nfs:10.2.0.78:/mnt/ks/rhel5.cfg initrd=/rhel5/initrd.img

label fc7
kernel /fc7/vmlinuz
append ksdevice=eth0 ks=nfs:10.2.0.78:/mnt/ks/fc7.cfg initrd=/fc7/initrd.img

The root directory of /fc7/vmlinuz and /fc7/initrd.img is /tftpboot/linux-boot/. You can copy two files, which is located in Linux distributed image, to that directory, one is vmlinuz and the other is initrd.img. Also, you need to specify kickstart directory, which is located on NFS server.

Discussion Area - Leave a Comment




Spam Protection by WP-SpamFree Plugin