===== Introduction ===== If you want to install or rescue your ClearOS server from over your network or the Internet, you can install the software using PXE (Preboot Execution Environment). The instructions below detail how to configure a PXE Boot Server on ClearOS. The PXE Boot Server can then be used to install other ClearOS systems, or just other software in general. ===== Requirements ===== ==== Hardware ==== * Modern BIOS with a PCI or an on-board network card. ==== Web, DHCP and TFTP Servers ==== * app-flexshare and app-httpd (Web) * app-dnsmasq (TFTP and DHCP) * syslinux * rsync ===== Instructions ===== The following example goes through setting up a PXE server on ClearOS Enterprise. ==== Installing the Required Software ==== You need to install a few base software packages to get going: yum install app-flexshare app-httpd app-dnsmasq syslinux rsync ==== Configuring the Download Server with Flexshare ==== Next, you should create a web download share using [[User Guide:current:Flexshares]]. This is where you will store a copy of the ClearOS install files. In the example, create a share called //pxe// and make sure Web access is enabled and turning on the //Indexes// feature is recommended. You may want to enable Windows File Sharing or FTP upload the ClearOS install files to the system. ==== Downloading the Files ==== Next, you need to create the directory structure for your PXE environment. We suggest using the following, but feel free to change this to suit your needs: mkdir -p /var/flexshare/shares/pxe/clearos/enterprise/5.1 Copy the files from the ClearFoundation download servers. The best tool for the job is //rsync//, but you can also use FTP and other file management tools. cd /var/flexshare/shares/pxe/clearos/enterprise/5.1 rsync -rltv --progress rsync.clearfoundation.com::clearfoundation/clearos/enterprise/5.1/images . -or- cd /var/flexshare/shares/pxe/clearos/enterprise/5.1 wget ftp://download.clearfoundation.com/clearos/enterprise/5.1/images/* At this stage, you should make sure you can view your files via a web browser. The flexshare URL is /flexshare/pxe, e.g. http://192.168.1.1/flexshare/pxe/ ==== Configuring the TFTP Server ==== The next step is to enable the TFTP server. On ClearOS, this is provided by the Dnsmasq software. In /etc/dnsmasq.conf, add the following parameters: enable-tftp tftp-root=/var/flexshare/shares/pxe/clearos/enterprise/5.1/images/pxeboot If necessary, copy the PXE boot image into the TFTP server directory: cp /usr/lib/syslinux/pxelinux.0 /var/flexshare/shares/pxe/clearos/enterprise/5.1/images/pxeboot ==== Configuring the DHCP Server ==== To inform PXE clients that a boot server exists on your network, you need to configure your [[User Guide:current:DHCP Server]]. This should be done using the webconfig tool on ClearOS. Then, you can add the following option to the /etc/dnsmasq.conf file to configure the boot server entry: dhcp-boot=pxelinux.0,//tftp-server-hostname//,//tftp-server-IP// Change //tftp-server-hostname// to the hostname for the TFTP server, and //tftp-server-IP// to the IP address of the server. Here's an example: dhcp-boot=pxelinux.0,beaker.lan,192.168.2.2 After the configuration change, restart the DHCP server: service dnsmasq restart Note: you do not need to run your DHCP and TFTP from the same machine. ===== Client Configuration ===== On your target install system, make sure the system is configured with PXE enabled. You may need to dig into the BIOS to find these settings. If all goes well, you should see a ClearOS installer screen pop up. From there, you can follow the usual procedure to install the ClearOS over the network. ===== Links ===== * [[http://www.pxe.ca/index.html|Lots of useful information on PXE]] * [[http://tftpd32.jounin.net/|Windows TFTP server]] * [[http://www.kegel.com/linux/pxe.html|Collection of links on things you can do with PXE]] * [[http://syslinux.zytor.com/pxe.php|PXELinux]] * [[http://syslinux.zytor.com/pxe.php|etherboot]]