PXE Server » History » Version 1
Joseph Foley, 2015-09-05 02:59
| 1 | 1 | Joseph Foley | h1. PXE Server |
|---|---|---|---|
| 2 | |||
| 3 | this image server lives on giljagaur because there is a potential security risk. |
||
| 4 | Note: foley setup the multiboot, but it is not documented yet. It is in SVN under Machines/PXE |
||
| 5 | |||
| 6 | h2. Default config |
||
| 7 | |||
| 8 | * user root, passwd 100feet |
||
| 9 | * user test, passwd heistesty! |
||
| 10 | |||
| 11 | h2. Guides |
||
| 12 | |||
| 13 | * https://help.ubuntu.com/community/PXEInstallMultiDistro |
||
| 14 | * https://help.ubuntu.com/community/PXEInstallServer |
||
| 15 | * Debugging TFTP https://help.ubuntu.com/community/UbuntuLTSP/Troubleshooting/TFTP |
||
| 16 | * Kickstart https://help.ubuntu.com/community/KickstartCompatibility |
||
| 17 | |||
| 18 | h2. Installation |
||
| 19 | |||
| 20 | # Login to pxe.dev.ru.is (password 100feet for now) |
||
| 21 | <pre>ssh root@pxe.dev.ru.is</pre> |
||
| 22 | |||
| 23 | # Install packages |
||
| 24 | <pre>sudo apt-get install openbsd-inetd tftpd-hpa</pre> |
||
| 25 | # setup [[DHCP Server]] to give appropriate image (edit /etc/dhcp3/dhcpd.conf on dhcp.dev.ru.is) |
||
| 26 | <pre>subnet 130.208.209.0 netmask 255.255.255.224 { |
||
| 27 | <other config here> |
||
| 28 | filename "pxelinux.0"; |
||
| 29 | next-server pxe; |
||
| 30 | } |
||
| 31 | </pre> |
||
| 32 | # Download the latest version of the alternate install netboot stuff (@precise@ is the name of ubuntu release 12.04, change it for installing an different version) |
||
| 33 | <pre> |
||
| 34 | wget -r -nH -P ubuntu-netboot/ --cut-dirs=8 -np http://ubuntu.lhi.is/ubuntu/dists/precise/main/installer-i386/current/images/netboot/ |
||
| 35 | # remove some unnecessary files |
||
| 36 | find ubuntu-netboot/ -name 'index.html*' -exec rm {} \; |
||
| 37 | </pre> |
||
| 38 | # Copy the data into the tftp directory |
||
| 39 | <pre>sudo cp -r ubuntu-netboot/* /var/lib/tftpboot/</pre> |
||
| 40 | # Test that tfpd is working. You should see a pxelinux.0 file when this runs correctly and some information about the transfer |
||
| 41 | <pre>sudo apt-get install tftp-hpa |
||
| 42 | cd /tmp |
||
| 43 | tftp pxe -v -m binary -c get pxelinux.0 |
||
| 44 | </pre> |
||
| 45 | |||
| 46 | h3. Kickstart |
||
| 47 | |||
| 48 | Kickstart allows you to answer most of the questions that would occur during install beforehand and save this information as file. |
||
| 49 | |||
| 50 | # Install apache (or some other webserver) to make the kickstart file available |
||
| 51 | <pre>sudo apt-get install apache2</pre> |
||
| 52 | # Find a debian machine with Xwindows and use system-config-kickstart to create @ks.cfg@ |
||
| 53 | <pre>sudo apt-get install system-config-kickstart |
||
| 54 | system-config-kickstart |
||
| 55 | scp ks.cfg root@pxe.dev.ru.is:/var/www # copy to http server on pxe</pre> |
||
| 56 | # OR Grab the @ks.cfg@ from SVN in Machines/PXE. You may need to be in www-data group on the machine |
||
| 57 | <pre>cp /afs/dev.ru.is/project/devnet/workspace/Machines/PXE/ks.cfg /var/www</pre> |
||
| 58 | # edit the pxe boot menu @/var/lib/tftpboot/ubuntu-installer/i386/boot-screens/txt.cfg@ (@text.cfg@ in older versions) and add the following lines to add an entry which uses the kickstart file |
||
| 59 | <pre>label install-ks |
||
| 60 | menu label ^Install using Kickstart |
||
| 61 | menu default |
||
| 62 | kernel ubuntu-installer/i386/linux |
||
| 63 | append ks=http://pxe.dev.ru.is/ks.cfg vga=normal initrd=ubuntu-install\ |
||
| 64 | er/i386/initrd.gz -- |
||
| 65 | </pre> |
||
| 66 | |||
| 67 | h3. Install Useful things |
||
| 68 | |||
| 69 | * apt-get install openssh-server |