Change-Id: I57cacdff6ef56960f10789dbc81d967a74f45d5f
Reviewed-on: http://photon-jenkins.eng.vmware.com/1192
Reviewed-by: Steve Hoenisch <shoenisch@vmware.com>
Tested-by: Steve Hoenisch <shoenisch@vmware.com>
| ... | ... |
@@ -1,23 +1,24 @@ |
| 1 | 1 |
#Network PXE Boot |
| 2 | 2 |
|
| 3 |
-Photon supports pxe boot over netwrok, this is describe how you can setup a PXE boot server to install Photon. |
|
| 3 |
+Photon OS supports the Preboot Execution Environment, or PXE, over a network connection. This document describes how to set up a PXE boot server to install Photon OS. |
|
| 4 | 4 |
|
| 5 | 5 |
#Server Setup |
| 6 | 6 |
|
| 7 |
-To setup PXE server you will need to have: |
|
| 8 |
-* DHCP server to allow hosts to get an IP address. |
|
| 9 |
-* TFTP server which is file transfer protocol which is similar to FTP with no authintication. |
|
| 10 |
-* Optionally http server, this http serevr is going to serve the RPMs yum repo, or you can use the official Photon repo on bintray. Also this http serevr can be used if you want to provide kickstart config for unattended installation. |
|
| 7 |
+To set up a PXE server, you will need to have the following: |
|
| 11 | 8 |
|
| 12 |
-Setting up server instruction is based on an Ubuntu 14.04 machine assuming that it has an static IP adderess `172.16.78.134`. |
|
| 9 |
+* A DHCP server to allow hosts to get an IP address. |
|
| 10 |
+* A TFTP server, which is a file transfer protocol similar to FTP with no authentication. |
|
| 11 |
+* Optionally, an HTTP server. The HTTP server will serve the RPMs yum repo, or you can use the official Photon OS repo on Bintray. Also, this HTTP server can be used if you want to provide a kickstart config for unattended installation. |
|
| 12 |
+ |
|
| 13 |
+The instructions to set up the servers assume you have an Ubuntu 14.04 machine with a static IP address of `172.16.78.134`. |
|
| 13 | 14 |
|
| 14 | 15 |
##DHCP Setup |
| 15 |
-* Intall dhcp server |
|
| 16 |
+* Intall the DHCP server: |
|
| 16 | 17 |
``` |
| 17 | 18 |
sudo apt-get install isc-dhcp-server |
| 18 | 19 |
``` |
| 19 |
-* Edit ethernet interface in `/etc/default/isc-dhcp-server` to `INTERFACES="eth0"` |
|
| 20 |
-* Edit dhcp configuration in `/etc/dhcp/dhcpd.conf`, will allow machines to boot and get IP address via DHCP in the range `172.16.78.230 - 172.16.78.250` |
|
| 20 |
+* Edit the Ethernet interface in `/etc/default/isc-dhcp-server` to `INTERFACES="eth0"` |
|
| 21 |
+* Edit the DHCP configuration in `/etc/dhcp/dhcpd.conf` to allow machines to boot and get an IP address via DHCP in the range `172.16.78.230 - 172.16.78.250` |
|
| 21 | 22 |
``` |
| 22 | 23 |
subnet 172.16.78.0 netmask 255.255.255.0 {
|
| 23 | 24 |
range 172.16.78.230 172.16.78.250; |
| ... | ... |
@@ -29,30 +30,31 @@ Setting up server instruction is based on an Ubuntu 14.04 machine assuming that |
| 29 | 29 |
} |
| 30 | 30 |
|
| 31 | 31 |
``` |
| 32 |
-* Restart dhcp server |
|
| 32 |
+* Restart the DHCP server: |
|
| 33 | 33 |
``` |
| 34 | 34 |
sudo service isc-dhcp-server restart |
| 35 | 35 |
``` |
| 36 | 36 |
|
| 37 | 37 |
##TFTP Setup |
| 38 |
-* Install TFTP server |
|
| 38 |
+* Install the TFTP server: |
|
| 39 | 39 |
``` |
| 40 | 40 |
sudo apt-get install tftpd-hpa |
| 41 | 41 |
``` |
| 42 |
-* Enable boot service, and restrat the service |
|
| 42 |
+* Enable the boot service and restart the service: |
|
| 43 | 43 |
``` |
| 44 | 44 |
sudo update-inetd --enable BOOT |
| 45 | 45 |
sudo service tftpd-hpa restart |
| 46 | 46 |
``` |
| 47 |
-##Optional: http server setup |
|
| 48 |
-This is step is only needed if: |
|
| 49 |
-* Planning to serve the ks config file through this server, please refer to [Kickstart support](kickstart.md) for more details. |
|
| 47 |
+ |
|
| 48 |
+##Optional: HTTP server setup |
|
| 49 |
+ |
|
| 50 |
+This step is only needed if you are planning to serve the ks config file through this server; refer to [Kickstart support](kickstart.md) for details. |
|
| 50 | 51 |
* Serving your local yum repo. |
| 51 | 52 |
You can install apache http web server |
| 52 | 53 |
``` |
| 53 | 54 |
sudo apt-get install apache2 |
| 54 | 55 |
``` |
| 55 |
-Mount the photon iso to get the RPMS repo and sample ks config file. |
|
| 56 |
+Mount the Photon iso to get the RPMS repo and sample ks config file. |
|
| 56 | 57 |
``` |
| 57 | 58 |
mkdir /mnt/photon-iso |
| 58 | 59 |
sudo mount <photon_iso> /mnt/photon-iso/ |
| ... | ... |
@@ -61,18 +63,18 @@ Copy the RPMS repo. |
| 61 | 61 |
``` |
| 62 | 62 |
cp -r /mnt/photon-iso/RPMS /var/www/html/ |
| 63 | 63 |
``` |
| 64 |
-To support ks, may be you can copy the sample config from the iso and editing it, please refer to [Kickstart support](kickstart.md) for more details. |
|
| 64 |
+To support ks, you can copy the sample config file from the iso and edit it; refer to [Kickstart support](kickstart.md) for details. |
|
| 65 | 65 |
``` |
| 66 | 66 |
cp /mnt/photon-iso/isolinux/sample_ks.cfg /var/www/html/my_ks.cfg |
| 67 | 67 |
``` |
| 68 | 68 |
|
| 69 | 69 |
##PXE boot files setup |
| 70 |
-* Mount photon.iso to get linux and initrd images |
|
| 70 |
+* Mount photon.iso to get Linux and initrd images: |
|
| 71 | 71 |
``` |
| 72 | 72 |
mkdir /mnt/photon-iso |
| 73 | 73 |
sudo mount <photon_iso> /mnt/photon-iso/ |
| 74 | 74 |
``` |
| 75 |
-* Setting the PXE boot files |
|
| 75 |
+* Setting the PXE boot files: |
|
| 76 | 76 |
``` |
| 77 | 77 |
wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz |
| 78 | 78 |
tar -xvf syslinux-6.03.tar.gz |
| ... | ... |
@@ -86,10 +88,10 @@ cp ~/syslinux-6.03/bios/core/pxelinux.0 . |
| 86 | 86 |
mkdir pxelinux.cfg |
| 87 | 87 |
mv isolinux.cfg pxelinux.cfg/default |
| 88 | 88 |
``` |
| 89 |
-* Update repo param to point to http yum repo, you may pass official photon bintray repo. |
|
| 89 |
+* Update repo param to point to http yum repo; you may pass official photon bintray repo. |
|
| 90 | 90 |
``` |
| 91 | 91 |
sed -i "s/append/append repo=http:\/\/172.16.78.134\/RPMS/g" menu.cfg |
| 92 | 92 |
popd |
| 93 | 93 |
``` |
| 94 |
-* Optionally, you can add your ks config file, please refer [Kickstart support](kickstart.md) for more details. |
|
| 94 |
+* Optionally, you can add your ks config file; see [Kickstart support](kickstart.md) for details. |
|
| 95 | 95 |
|