Network PXE Installation of SME Server 7.x - HowTo - Draft

Author:  John H. Bennett III <bennettj@johnbennettservices.com>
Contributor:
  
Release supported:
SME 7.x
License: GPL
Last updated: Friday, September 08, 2006 05:23 AM


Problem:  You would like a way to install or upgrade your SME server via PXE boot. 
Solution:
  Follow this HowTo.


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

After the server comes back up, you will have a Thin Clients server-manager panel underneath the Configuration section.


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
init586.img
vmlinuz
vmlz586

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
implicit 0
timeout 0
default install

label install
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192

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
Sep 5 07:27:14 www dhcpd: DHCPOFFER on 10.10.10.39 to 00:01:03:ea:15:5e via eth0
Sep 5 07:27:14 www dhcpd: DHCPDISCOVER from 00:01:03:ea:15:5e via eth0
Sep 5 07:27:14 www dhcpd: DHCPOFFER on 10.10.10.39 to 00:01:03:ea:15:5e via eth0
Sep 5 07:27:16 www dhcpd: DHCPDISCOVER from 00:01:03:ea:15:5e via eth0
Sep 5 07:27:16 www dhcpd: DHCPOFFER on 10.10.10.39 to 00:01:03:ea:15:5e via eth0
Sep 5 07:27:17 www dhcpd: DHCPREQUEST for 10.10.10.39 (10.10.10.41) from 00:01:03:ea:15:5e via eth0
Sep 5 07:27:17 www dhcpd: DHCPACK on 10.10.10.39 to 00:01:03:ea:15:5e via eth0
Sep 5 12:27:17 www in.tftpd[7214]: RRQ from 10.10.10.39 filename /pxelinux.0
Sep 5 12:27:17 www in.tftpd[7216]: RRQ from 10.10.10.39 filename /pxelinux.0
Sep 5 12:27:17 www in.tftpd[7214]: tftp: client does not accept options
Sep 5 12:27:17 www in.tftpd[7218]: RRQ from 10.10.10.39 filename /pxelinux.cfg/01-00-01-03-ea-15-5e
Sep 5 12:27:17 www in.tftpd[7220]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A0A0A27
Sep 5 12:27:17 www in.tftpd[7222]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A0A0A2
Sep 5 12:27:17 www in.tftpd[7224]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A0A0A
Sep 5 12:27:17 www in.tftpd[7226]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A0A0
Sep 5 12:27:17 www in.tftpd[7228]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A0A
Sep 5 12:27:17 www in.tftpd[7230]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A0
Sep 5 12:27:18 www in.tftpd[7232]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0A
Sep 5 12:27:18 www in.tftpd[7234]: RRQ from 10.10.10.39 filename /pxelinux.cfg/0
Sep 5 12:27:18 www in.tftpd[7236]: RRQ from 10.10.10.39 filename /pxelinux.cfg/default
Sep 5 12:27:18 www in.tftpd[7238]: RRQ from 10.10.10.39 filename /vmlinuz
Sep 5 12:27:18 www in.tftpd[7240]: RRQ from 10.10.10.39 filename /initrd.img


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)

Legend:
Location of the CD-ROM image files on the HTTP server
Name of the kickstart configuration file that will be used during the install or upgrade
Network interface to use for the install. - This is optional.
Use text based install method.  Remove text for gui install (SME 7.x only)

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.
Create a smeserver65 directory under the tftpboot directory on your server.  (mkdir /tftpboot/smeserver65)
Create a pxelinux.cfg directory under the smeserver65 directory.  (mkdir /tftpboot/smeserver65/pxelinux.cfg)
Copy the following files from the SME Server 6.5 /images/pxeboot CD to the smeserver65 directory:
     initrd.img
     vmlinuz

Copy from /tftpboot/pxelinux.0 to smeserver65
chmod -R 644 /tftpboot/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:
          drw-r--r-- 3 root root 4096 Sep 6 07:52 .
          drw-r--r-- 4 root root 4096 Sep 5 22:38 ..
          -rw-r--r-- 1 root root 11822 Sep 4 23:26 pxelinux.0
          drw-r--r-- 2 root root 4096 Sep 5 22:41 pxelinux.cfg
          -rw-r--r-- 1 root root 564258 Nov 20 2005 sme6-initrd.img
          -rw-r--r-- 1 root root 836758 Nov 20 2005 sme6-vmlinuz
          -rw-r--r-- 1 root root 3358327 Sep 4 23:52 sme7-initrd.img
          -rw-r--r-- 1 root root 1473787 Sep 4 23:52 sme7-vmlinuz

Modify the /tftpboot/pxelinux.cfg/default file to the below:

     prompt 1
     implicit 0
     timeout 600
     default sme65

     label sme65
     kernel sme6-vmlinuz
     append initrd=sme6-initrd.img ramdisk_size=8192
     label sme7
     kernel sme7-vmlinuz
     append initrd=sme7-initrd.img ramdisk_size=8192

When you next PXE boot your workstation, you should end up at a boot: prompt.  You will need to either hit enter (sme65 install), or type in one of your label names to begin the installation - sme65 or sme7.)

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/