Network PXE Installation of SME Server 7.x - HowTo - Draft Author: John H. Bennett III
<bennettj@johnbennettservices.com> |
|
|
|
Problem: You would like a
way to install or upgrade your SME server via PXE boot. |
|
|
Assumptions:
You have a PC this is capable of PXE
booting.
You have two hard drives already
installed in the server.
To do's:
Further testing of upgrades - Seems
to work fine on my test servers for software RAID 1
Test with only 1 hard drive
Test with 3 hardrives (raid 5)
Test with 4 or more harddrives (raid
6)
STEP 1: SME server preperation
Trever
Batley has created two RPM's that make this process rather easy. You need to
download and install the most current versions of his
smeserver-tftp-server and smeserver-thinclient
rpm's located here -
http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/trevorb/7.x/Thinclient/
Then signal-event post-upgrade ; signal-event
reboot |
STEP 2: Files Preparation
After the above two RPM's are installed,
you will have a directory called /tftpboot.
1. cd /tftpboot and copy the following files from the SME Server 7 CD-ROM /images/pxeboot directory to the this directory: initrd.img 2. Either copy pxelinux.0 from http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/trevorb/7.x/Thinclient/SME_Install/ or from /usr/lib/syslinux/pxelinux.0 (Which is located in /usr/lib/syslinux/pxelinux.0 on a fresh SME Server 7 install) to this directory 3. Create a directory called pxelinux.cfg 4. Either copy the file default from http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/trevorb/7.x/Thinclient/SME_Install/pxelinux.cfg/ or create a file called default with the following contents: prompt 0 5. chmod -R 644 /tftpboot |
STEP 3: PXE client setup
Using the Thin Clients server-manager panel, make sure that PXE server is enabled and TFTP server is set to self. |
STEP 4: PXE install
You should now be ready to test your PXE
install.
I suggest watching your server logs (tail -f /var/log/messages) as your PC goes through the PXE process. If successful, you should see something similar to the below: Sep 5 07:27:13 www dhcpd: DHCPDISCOVER from 00:01:03:ea:15:5e via eth0 |
Extra Information:
1. The default file located in the
pxelinux.cfg directory takes the same
arguments as isolinux.cfg (SME 7.x) or syslinux.cfg (SME 6.x). Which
means you can add entries to the append line for further automation.
(Example - append initrd=initrd.img ks=http://IP_Address_or_Doman_name_of_Server/location_of_CD-ROM_image_files/Kickstart_file.cfg
ksdevice=eth0 class=kickstart
text ramdisk_size=8192) For more information on some of the items that can be contained in isolinux.cfg see: http://www.thebennetthome.com/sme/howto/Network%20HTTP%20installation%20SME%207.x%20-%20howto.htm. For more information on some of the items that can be contained in syslinux.cfg see: http://www.thebennetthome.com/sme/howto/Network%20HTTP%20installation%20howto.htm 2. You can setup more than one PXE distribution on your server. To do this, go to the thin clients server-manager panel and create a new distribution. Set the directory name to whatever you want and set the executable accordingly. If you are setting up another Linux distribution, then leave the executable to pxelinux.0. If setting up for Windows, then follow the appropriate instructions for PXE booting windows. I did not test any windows installations!!! (Example, say you want to PXE install SME Server 6.5.
Create a new distribution, give it a name called SME Server 6.5, and set
the directory to smeserver65. Copy from /tftpboot/pxelinux.0 to smeserver65 3. From the thin clients server-manager panel, you can change your default distribution, or you can add an individually controlled workstation entry. Adding an entry requires you to enter the mac-address of the workstation you want to PXE boot from (ifconfig -a on *nix, ipconfig on Windows), a unique device name for the workstation, which distribution to use and whether to enable or disable this entry.) 4. You can use one default distribution to install many different clients. (Example: Say you want to set up sme65 and sme7 server installs, but don't want to create a new distribution. In your default directory (/tftpboot) copy the appropriate files, but when you copy the pxe files for sme65 and sme7 rename them so they are unique. New Contents of /tftpboot: Modify the /tftpboot/pxelinux.cfg/default file to the below: prompt 1 5. Your TFTP and DHCP servers do not have to be on the same
server. |
Note: The steps listed above may not be the best way to create a PXE installation or upgrade environment, but this is what is working for me.
References:
http://linux-sxs.org/internet_serving/pxeboot.html
Trevor Batley's smeserver-thinclient and smeserver-tftp-server rpm's - http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/trevorb/7.x/Thinclient/