In an effort to help automate OS installation in the Dell TechCenter lab we set up a Preboot Execution Environment (PXE) server. As written on wikipedia: "The Preboot eXecution Environment (PXE, also known as 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."

We started with a base version of the Novell® SUSE® Linux® Enterprise Server (SLES) 11 OS on a Dell™ PowerEdge™ 1950 server. For our installation we disabled the firewall on the pxe/tftp server—you may want to keep the firewall and open specific ports for the necessary services (dhcp, tftp, etc.) The client we tested was on a Dell PowerEdge R710 server.

For information about using PXE with UEFI on SLES11, see "Using PXE with UEFI on PowerEdge Servers with SUSE Enterprise Linux 11".

PXE Server setup


1. Make a directory structure for installation media ISOs:

mkdir -p /exports/iso

2. Create ISOs of the DVD installation media:

dd if=/dev/cdrom of=/exports/iso/sles-11-x86_64.iso

3. Install Apache (YaST/Software/Software Management). For client software installation media access, you'll need NFS or HTTP to serve the installation media. For this exercise we chose the http route (find apache2 and install).

apache_install

4. Create the directory structure for ISO access through apache server:

mkdir -p /srv/www/htdocs/sles/11/x86_64

5. Mount ISOs (loop) instead of extracting the images for more efficient storage utilization:

mount -o loop /exports/iso/sles-11-x86_64.iso /srv/www/htdocs/sles/11/x86_64/

6. Append the following to /etc/fstab for automount of the ISOs so the mount returns automatically on boot:

/srv/www/htdocs/sles/11/x86_64 iso9660 loop 0 0

7. Add a software repository for the Web server/ISO mount you just made: (Yast/Software/Software Repositories/Add) This repository will test the apache server, mount. If you get the "License agreement " dialog box, it works. You can delete the DVD software repository at this point.

sw_repos_web

8. Install/enable TFTP Server if its not already installed. The TFTP server was installed as part of the SLES 11 default installation. In YaST, launch TFTP Server (under Network Services).

9. Click Enable, and note the boot image directory. We left it at the default /tftpboot for our lab.

tftpserver


10. Install/configure DHCP. Here in the lab we weren't using DHCP, so we did the following steps to get ours going. If you have a DHCP server, make sure and add the "next-server" and "filename" referenced here:

a. Install YaST2 DHCP Server (YaST/Software/Software Management, search on DHCP)
b. Once installed, launch DHCP Server from YaST (YaST/Newtork Services/DHCP Server)
c. We used the DHCP Server wizard, and in Step 1 of 4 (Card selection) Select desired adapter, click Select and then Next.
d. For Steps 2 and 3, enter the appropriate information:

dhcp_step2

dhcpstep3

At the end of step 4 in the DHCP Server wizard, click When Booting and then DHCP Server Expert Configuration.

dhcp_step4


After you're in DHCP Server Expert Configuration, click Expert Settings and then Yes:

expert_settings

Then select the subnet and click Edit.

pxe server on SLES 11 - The Dell TechCenter

Click Add, select next-server (input TFTP server IP)
Click Add, select filename and input "pxelinux.0" for the value.

When finished, it should look like:

pxe server on SLES 11 - The Dell TechCenter

Click OK, and then Finish

11. Create directory structure for TFTP server:

mkdir -p /tftpboot/pxelinux.cfg
mkdir -p /tftboot/sles/11/x86_64

12. Copy the necessary files for boot to the TFTP server directory structure:

cp /srv/www/htdocs/sles/11/x86_64/boot/x86_64/loader/linux /tftpboot/sles/11/x86_64cp /srv/www/htdocs/sles/11/x86_64/boot/x86_64/loader/initrd /tftpboot/sles/11/x86_64

13. Verify syslinux is installed (YaST/Software Management - search on syslinux, make sure gfxboot and syslinux both are installed).

14. Per /usr/share/doc/packages/syslinux/pxelinux.txt, copy prelinux.0 to /tftboot/ structure:

cp /usr/share/syslinux/pxelinux.0 /tftpboot/

15. For menu-driven prompts on client boot, copy menu.c32 to tftboot (usr/share/syslinux):

cp /usr/share/syslinux/menu.c32 /tftpboot/

16. Edit /tftpboot/pxelinux.cfg/default to input desired menu options. Here is an example of what we did here (Attached file at the bottom of the page as well):

pxe server on SLES 11 - The Dell TechCenter

Our TFTP server boot directory looked like this after we were done:

pxe server on SLES 11 - The Dell TechCenter

17. Now its time to boot the client!

On our PowerEdge R710, we hit F12 when we saw this screen:
pxe server on SLES 11 - The Dell TechCenter

The client grabs IP and finds the PXE server:

pxe server on SLES 11 - The Dell TechCenter

Successful transfer to our Menu (default file under /ftptboot/pxelinux.cfg/)
pxe server on SLES 11 - The Dell TechCenter

SUSE Installation Menu:
pxe server on SLES 11 - The Dell TechCenter



PXE Boot Quick Links

PXE on Wikipedia PXE FAQ
PXE Wiki Novell.com PXE Setup