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
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).
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.
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.
Boot image directory
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:
At the end of step 4 in the DHCP Server wizard, click When Booting and then DHCP Server Expert Configuration.
After you're in DHCP Server Expert Configuration, click Expert Settings and then Yes:
Then select the subnet and click Edit.
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:
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
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):
Our TFTP server boot directory looked like this after we were done:
17. Now its time to boot the client!
On our PowerEdge R710, we hit F12 when we saw this screen:
The client grabs IP and finds the PXE server:
Successful transfer to our Menu (default file under /ftptboot/pxelinux.cfg/)
SUSE Installation Menu:
PXE Boot Quick Links