|
SLES /
Setting up a PXE Boot ServerPXE (or Pre-eXecution Environment) Booting is where a machine BIOS uses DHCP and TFTP information to boot into an environment independent of the media on the server To create a PXE Boot Server you need four things:
Creating a properly configured DHCP server. So, the first thing that needs to be done is to create a properly configured DHCP server for PXE booting. This is normally not too hard, however for PXE booting, you need to make sure that in addition to the normal IP information you also send the PXE boot information to the workstation as well. To do this using a Netware DHCP server, following the steps below:
![]() On a Linux DHCP server you need to add three options to the dhcpd.conf file (either through YaST or manually). I recently found myself in a position where I needed to setup a PXEBoot Server on a client site where use of DHCP was forbidden. Fun! So in order to solve this problem I needed to create a DHCP server that would only respond to PXE requests but not normal DHCP requests. Below is the dhcpd.conf file I used:
# Custom dhcpd.conf file
#
# This configuration will only respond to PXE requests
default-lease-time 14400;
max-lease-time 7200;
ddns-update-style none;
ddns-updates off;
allow booting;
option domain-name "domain.name";
option domain-name-servers 192.168.99.40, 192.168.99.41;
option routers 192.168.1.1;
# Define rules to identify DHCP Requests from PXE devices
class "pxe" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
}
subnet 192.168.0.0 netmask 255.255.0.0 {
pool {
default-lease-time 180; # no long lease time required for booting
max-lease-time 360; # booted system does its own dhcp request
server-name "pxeservername.domain.name";
next-server pxeservername.; # in case your local DNS only handles
# unqualified domains keep trailing '.'
filename "pxelinux.0";
allow members of "pxe"; # only allow pxe class to receive dhcp
range 192.168.99.30 192.168.99.39;
}
}
Creating a properly configured TFTP server. Once you have a DHCP server that is providing the PXE Boot information, you need to insure that the specified server is responding to TFTP (Trivial FTP) requests. Setting up a TFTP server on SLES10 is almost too simple!
yast2 -i tftp
yast2 tftp-server
Setting up a PXELINUX install properly. PXELinux is a package include in the SYSLinux suite which is a SYSLINUX derivative, used for booting Linux off a network server. The process of installing PXELinux and configuring it to work with the TFTP server we setup above is detailed below:
yast2 -i syslinux
cp /usr/share/syslinux/pxelinux.0 /tftpboot
cp /(path to SLED10 media)/boot/i386/loader/memtest /tftpboot/memtest cp /(path to SLED10 media)/boot/i386/loader/linux /tftpboot/sled10.linux cp /(path to SLED10 media)/boot/i386/loader/initrd /tftpboot/sled10.initrd
cp /(path to SLES10 media)/boot/i386/loader/linux /tftpboot/sles10.linux cp /(path to SLES10 media)/boot/i386/loader/initrd /tftpboot/sles10.initrd
cp /(path to DSL initrd image files)/boot/isolinux/linux24 /tftpboot/dsl.linux24 cp /(path to DSL initrd image files)/boot/isolinux/minirt24.gz /tftpboot/dsl.minirt24.gz
mkdir /tftpboot/pxelinux.cfg
cp /(path to media)/boot/i386/loader/isolinux.cfg /tftpboot/pxelinux.cfg/default
cp /(path to media)/boot/i386/loader/message /tftpboot/boot.msg
Note: I have an archive file with all the relevant test and message files in it. But you can get an idea from the files in the DSL initrd ISO image. The benefit of renaming the linux and initrd files is that it allows you to copy additional kernels and make then available for booting. For instance, I created a this PXE Boot server to allow booting of the SLED and SLES installation programs (even thought they really aren't that different) and a DSL (Damn Small Linux) distribution. The DSL distribution allows administrators to boot a machine directly into DSL much as they would with a Live CD. Allowing them to perform maintenance on the machine without booting the physical hard drive. References: |