{"id":20,"date":"2020-08-03T13:00:00","date_gmt":"2020-08-03T13:00:00","guid":{"rendered":"http:\/\/10.171.10.16:10000\/?p=20"},"modified":"2022-01-16T17:15:00","modified_gmt":"2022-01-16T17:15:00","slug":"ertyerterg","status":"publish","type":"post","link":"https:\/\/dannypayne.me\/?p=20","title":{"rendered":"Building a PXE boot server"},"content":{"rendered":"\n<p>This post is the first in a series on building\/setting up\/improving a PXE boot server with CentOS. By the end of this series we&#8217;ll have a fully configured PXE boot server and be able to perform unattended installations of CentOS 7. <br>Inside my homelab, I build and tear down VM&#8217;s often, and wanted a way to relatively quickly build a new machine without having to go through the process manually. After some research, I realised that this entirely possible with a handful of packages and some setup\/configuration.<\/p>\n\n\n\n<p>I&#8217;m going to assume you&#8217;ve already got a VM setup for this, but for convenience I&#8217;m going to set this up on a new VM, with the details\/specs as follows:<br><br><strong>Server IP<\/strong>: 10.176.40.10<br><strong>Hostname<\/strong>: b-pxe.ad.goatfarm.co.uk<br><strong>OS<\/strong>: CentOS 7<br><strong>CPU<\/strong>: 2 cores<br><strong>RAM<\/strong>: 2GB<br><strong>Hard disk<\/strong>: 100GB (thin provisioned)<br><strong>Firewalld is disabled, and SELinux is set to Permissive<\/strong><br><br>The VM will be setup with a standard CentOS Minimal install using the <strong><a rel=\"noreferrer noopener\" href=\"http:\/\/isoredirect.centos.org\/centos\/7.8.2003\/isos\/x86_64\/\" target=\"_blank\">CentOS-7-x86_64-DVD-2003<\/a><\/strong> ISO obtained from the CentOS Mirror List; boot the ISO, run through the setup, select <strong>Minimal Install<\/strong>, login at the console once the install has completed and set an IP and hostname. Reboot the VM again for good measure and then we can SSH into it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Install required packages<\/strong><\/h3>\n\n\n\n<p>Now the VM is back up and running, we can start the setup. You&#8217;re going to want to install the following packages\/run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">yum -y install tftp-server vsftpd xinetd syslinux pykickstart wget nano <\/code><\/pre>\n\n\n\n<p>Note that we&#8217;re not installing <code>DNSMASQ<\/code> server on our VM as lots of other guides will tell you to do &#8211; that&#8217;s handled on our router\/firewall.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/07\/2020-08-03-21_35_42-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE.jpg\" alt=\"\" class=\"wp-image-53\" width=\"799\" height=\"479\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-03-21_35_42-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE.jpg 1000w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-03-21_35_42-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE-300x180.jpg 300w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-03-21_35_42-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE-768x461.jpg 768w\" sizes=\"auto, (max-width: 799px) 100vw, 799px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Populate SYSLINUX bootloaders<\/strong><\/h3>\n\n\n\n<p>At this point, we&#8217;re ready to start copying files and editing configs. To kick things off, we&#8217;re going to copy all of the SYSLINUX bootloader files into our tftpboot folder. We can quickly do this with the following commands to copy and then verify the copy was successful:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">cp -r \/usr\/share\/syslinux\/* \/var\/lib\/tftpboot\nls \/var\/lib\/tftpboot<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/07\/2020-08-03-21_40_39-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE.jpg\" alt=\"\" class=\"wp-image-61\" width=\"720\" height=\"150\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-03-21_40_39-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE.jpg 942w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-03-21_40_39-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE-300x63.jpg 300w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-03-21_40_39-mRemoteNG-Homelab-MRemoteNG.xml-B-PXE-768x161.jpg 768w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Enable and start services<\/strong><\/h3>\n\n\n\n<p>Before we can continue, we need to start and enable the services we&#8217;ve just installed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">systemctl start xinetd vsftpd\nsystemctl enable xinetd vsftpd<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Now we&#8217;ve copied the bootloader files, we also need to edit the TFTP server config file, which can be found at <code>\/etc\/xinetd.d\/tftp<\/code>. <br>We just need to change a single option within the file; <code>disable = yes<\/code> to <code>disabled = no<\/code>. Open the file with a text editor (<code>nano<\/code>, <code>vi<\/code>, etc) change, save and quit. <br>Another quick way to do this would be to use the <code>sed<\/code> command as follows: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">sed -i '14 s\/yes\/no\/' \/etc\/xinetd.d\/tftp<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Copy CentOS installation files<\/strong><\/h3>\n\n\n\n<p>Now we&#8217;re going to want to copy our installation files from our CentOS DVD image to the FTP directory. Before we do this, we&#8217;re going to need to create a directory for the files to go into within the FTP directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">mkdir \/var\/ftp\/centos7<\/code><\/pre>\n\n\n\n<p><br>Assuming the DVD is still in the VM&#8217;s virtual DVD drive, we quickly mount it and verify that it&#8217;s mounted correctly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">mount -o loop \/dev\/cdrom \/mnt\nls \/mnt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/07\/2020-08-04-10_33_45-Window.jpg\" alt=\"\" class=\"wp-image-66\" width=\"706\" height=\"78\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-04-10_33_45-Window.jpg 751w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/07\/2020-08-04-10_33_45-Window-300x34.jpg 300w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p>Next, we can copy the files with and then verify they copied successfully:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">cp -av \/mnt\/* \/var\/ftp\/centos7\/\nls \/var\/ftp\/centos7<\/code><\/pre>\n\n\n\n<p>Finally, we need to copy the CentOS bootable kernel and initrd files from the DVD to the tftpboot folder, and unmount the installation DVD:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">mkdir \/var\/lib\/tftpboot\/centos7\ncp \/mnt\/images\/pxeboot\/vmlinuz \/var\/lib\/tftpboot\/centos7\ncp \/mnt\/images\/pxeboot\/initrd.img \/var\/lib\/tftpboot\/centos7\numount \/mnt<\/code><\/pre>\n\n\n\n<p>Note that we&#8217;re putting everything related to CentOS 7 within it&#8217;s own folders &#8211; this is so we can differentiate between each OS if we decide to add another OS to this PXE server at a later date. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Creating Kickstart file<\/strong><\/h3>\n\n\n\n<p>At this point, we&#8217;re almost ready to create our basic kickstart file for an unattended installation. <br>We&#8217;re going to create this file in the same location we put out CentOS 7 installation files; <code>\/var\/ftp\/centos7\/<\/code>. <br>Before we do this, we need to generate ourselves an encrypted root password with a quick Python one-liner &#8211; we&#8217;ll use this when we create the kickstart file. Run the following command and enter a password when prompted, and the output will be an encrypted password:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">python -c 'import crypt,getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/08\/2020-08-05-11_02_12-Window.jpg\" alt=\"\" class=\"wp-image-95\" width=\"791\" height=\"41\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-05-11_02_12-Window.jpg 981w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-05-11_02_12-Window-300x16.jpg 300w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-05-11_02_12-Window-768x40.jpg 768w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><\/figure>\n\n\n\n<p>Take note of the output string, in my case <code>$6$knygtSMiA2ehNpE9$e8k2WyNkZPXozT9Tiw0YMf63k.9YIJNeF7QsxPNA8sboI84fHuw38lyjYbzpNxUfzb\/eyjT6LWxM1nxnOkNRy1<\/code> &#8211; we&#8217;ll need this in a moment.<br>Note that we&#8217;re using <code>SHA256<\/code> and our <code>authconfig<\/code> below is also set to <code>sha256<\/code>. <br>If out <code>authconfig<\/code> was set to <code>enablemd5<\/code> we could use <code>openssl<\/code> to generate the string. <\/p>\n\n\n\n<p>Below is an example kickstart file to perform an unattended installation of CentOS 7. The file is relatively self-explanatory &#8211; note that this <strong>WILL<\/strong> format and erase any drive when used. <br><br>You&#8217;ll need to replace the <strong>FTP IP<\/strong> address on <strong>line 5<\/strong> with the IP of your own server, and change the <strong>rootpw <\/strong>value on <strong>line 25<\/strong> to the output string of your password as generated above. Any additional repos or packages can be added on <strong>lines 46 <\/strong>and <strong>52 <\/strong>respectively.  If you don&#8217;t want the VM to update after the install completes, just comment out <strong>line 66<\/strong>. <br><br>This kickstart file has been saved to the following location: <code>\/var\/ftp\/centos7\/anaconda-ks.cfg<\/code><\/p>\n\n\n\n<pre title=\"\/var\/ftp\/centos7\/anaconda-ks.cfg\" class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">#version=DEVEL\n# System authorization information\nauth --enableshadow --passalgo=sha512\n# Use network installation\nurl --url=\"ftp:\/\/10.176.40.10\/centos7\"\n# Use text install\ntext\n# Run the Setup Agent on first boot\nfirstboot --enable\nignoredisk --only-use=sda\n# Keyboard layouts\nkeyboard --vckeymap=gb --xlayouts='gb'\n# System language\nlang en_GB.UTF-8\n# Reboot after install\nreboot\n\n# Set network information\nnetwork --bootproto=dhcp --device=ens192 --nameserver=1.1.1.1 --ipv6=auto --activate\n# Disable Firewall\/Selinux\nfirewall --disabled\nselinux --disabled\n\n# Root password\nrootpw --iscrypted $6$knygtSMiA2ehNpE9$e8k2WyNkZPXozT9Tiw0YMf63k.9YIJNeF7QsxPNA8sboI84fHuw38lyjYbzpNxUfzb\/eyjT6LWxM1nxnOkNRy1\n\n# System services\nservices --enabled=\"chronyd\"\n# System timezone\ntimezone Europe\/London --isUtc\n\n################################### partitions\n# Partition clearing information\nclearpart --all --initlabel --drives=sda\nzerombr\n\n# Disk partitioning information\nautopart --type=plain --fstype=ext4\n\n# Repos\nrepo --name=base --baseurl=http:\/\/mirror.centos.org\/centos\/7.3.1611\/os\/x86_64\/\nrepo --name=epel-release --baseurl=http:\/\/anorien.csc.warwick.ac.uk\/mirrors\/epel\/7\/x86_64\/\n\n%packages\n@base\n@core\nepel-release\nbzip2\nwget\ncurl\nnano\nhtop\n%end\n\n%addon com_redhat_kdump --enable --reserve-mb='auto'\n\n%end\n\n%anaconda\npwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty\npwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok\npwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty\n%end\n\n%post\nyum update -y\n\n%end<\/code><\/pre>\n\n\n\n<p>To verify our kickstart is correctly understood and is usable, we can use the <code>ksvalidator<\/code> command from the <code>pykickstart<\/code> package we installed earlier. If there are any problems, you&#8217;ll receive an error message telling you what&#8217;s wrong. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/08\/2020-08-04-16_15_48-Window.jpg\" alt=\"\" class=\"wp-image-78\" width=\"469\" height=\"80\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-04-16_15_48-Window.jpg 399w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-04-16_15_48-Window-300x51.jpg 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Creating PXE boot menu file<\/strong><\/h3>\n\n\n\n<p>Next we&#8217;re going to create our PXE boot menu. This is where we can select between different options to install different OS&#8217;s. For the moment, our PXE menu is going to contain a couple of options for installing CentOS 7 with\/without a kickstart, and with\/without our FTP network repo we setup above. <br>To create the directory and default menu file, we&#8217;ll need to run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">mkdir \/var\/lib\/tftpboot\/pxelinux.cfg \ntouch \/var\/lib\/tftpboot\/pxelinux.cfg\/default<\/code><\/pre>\n\n\n\n<p>Below is an example of a boot menu &#8211; this allows you to boot the CentOS installation<br>&#8211; Without using a kickstart file<br>&#8211; Using our local repo and kickstart file<br>&#8211; Using an external repo and our own kickstart file<br>&#8211; To the local drive and skip the installation<br><br>you&#8217;ll need to replace the IP address on <strong>lines 11, 16<\/strong> and <strong>21<\/strong> with the IP of your own server.<br>Note that the <code>kernel<\/code> lines are point to files relative to itself within the <code>pxelinux.cfg<\/code> directory &#8211; these are the bootloader files we coped over earlier.  <br><br>This boot menu file has been saved to the following location: <code>\/var\/lib\/tftpboot\/pxelinux.cfg\/default<\/code> <\/p>\n\n\n\n<pre title=\"\/var\/lib\/tftpboot\/pxelinux.cfg\/default\" class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">default menu.c32\nprompt 0\ntimeout 300\nONTIMEOUT local\n\nmenu title ########## PXE Boot Menu ##########\n\nlabel 1\nmenu label ^1) Install clean CentOS 7 x64 with Network Repo\nkernel centos7\/vmlinuz\nappend initrd=centos7\/initrd.img method=ftp:\/\/10.176.40.10\/centos7 devfs=nomount\n\nlabel 2\nmenu label ^2) Install Kickstarted CentOS 7 x64 with Network Repo\nkernel centos7\/vmlinuz\nappend initrd=centos7\/initrd.img method=ftp:\/\/10.176.40.10\/centos7 devfs=nomount inst.ks=ftp:\/\/10.176.40.10\/centos7\/anaconda-ks.cfg\n\nlabel 3\nmenu label ^3) Install Kickstarted CentOS 7 x64 with http:\/\/mirror.centos.org Repo\nkernel centos7\/vmlinuz\nappend initrd=centos7\/initrd.img method=http:\/\/mirror.centos.org\/centos\/7\/os\/x86_64\/ inst.ks=ftp:\/\/10.176.40.10\/centos7\/anaconda-ks.cfg\n\nlabel 4\nmenu label ^4) Boot from local drive\nLOCALBOOT 0<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Enable and start services<\/strong><\/h3>\n\n\n\n<p>Now we&#8217;re ready to enable and start our services.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash line-numbers\">systemctl enable vsftpd\nsystemctl enable xinetd\nsystemctl start vsftpd\nsystemctl start xinetd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Configure DHCP\/firewall to allow PXE booting<\/strong><\/h3>\n\n\n\n<p>The final thing we need to configure before we can attempt to PXE boot a client is our router\/firewall. Within the DHCP settings of our router\/firewall we need to edit\/enable the following settings:<br>&#8211; TFTP Server<br>&#8211; Next Server<br>&#8211; Default file name<br>If we&#8217;re unable to configure them specific settings, we can also specify DHCP <strong>options 66<\/strong> and <strong>67<\/strong>.  <\/p>\n\n\n\n<p>In my examples, I&#8217;m going to be configuring these settings on <strong>PFSense <\/strong>and also a <strong>Unifi UDM Pro<\/strong>.<br><br>On our <strong>PFSense<\/strong>, we&#8217;re going to want to navigate to <strong>Services <\/strong>&gt; <strong>DHCP Server<\/strong> &gt; <em><strong>Network name<\/strong><\/em>.<br>Scroll to the bottom of the page and find <strong>TFTP<\/strong>. Click <strong>Display Advanced<\/strong> and enter the IP of your PXE server &#8211; in my case, <strong>10.176.40.10<\/strong>.<br>Next, scroll down to <strong>Network Booting<\/strong> and click <strong>Display Advanced<\/strong>. Tick the checkbox for <strong>Enables network booting<\/strong> and enter the IP of your PXE server in the <strong>Next Server<\/strong> box.<br>In the <strong>Default BIOS file name<\/strong> box we&#8217;re going to enter the following: <code>pxelinux.0<\/code> &#8211; This is one of the files we copied right at the beginning. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"333\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/08\/2020-08-04-20_58_24-COLO-PFSENSE01.ad_.goatfarm.co_.uk-Services_-DHCP-Server_-COLOBLOGNETWORK.jpg\" alt=\"\" class=\"wp-image-86\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-04-20_58_24-COLO-PFSENSE01.ad_.goatfarm.co_.uk-Services_-DHCP-Server_-COLOBLOGNETWORK.jpg 742w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-04-20_58_24-COLO-PFSENSE01.ad_.goatfarm.co_.uk-Services_-DHCP-Server_-COLOBLOGNETWORK-300x135.jpg 300w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><\/figure><\/div>\n\n\n\n<p>After doing this, fire up a test machine and try to PXE boot. If you get the correct boot menu\/etc then we&#8217;re good to go!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"520\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/07\/Pxeboot2.gif\" alt=\"\" class=\"wp-image-85\"\/><\/figure><\/div>\n\n\n\n<p>For the second example on our<strong> Unifi UDM Pro<\/strong>, we&#8217;re going to want to navigate to <strong>Settings<\/strong> from the <strong>dashboard<\/strong>. From <strong>Settings<\/strong>, navigate to <strong>Networks<\/strong> on the left-hand side, select your network on the right-hand side, and click <strong>Edit<\/strong>.<br>Scroll down the page and find <strong>Advanced DHCP Options<\/strong>. Tick the <strong>Enable network boot<\/strong> checkbox, and enter the IP of your PXE server &#8211; in my case, <strong>10.176.40.10<\/strong>. In the <strong>Filename<\/strong> box, enter <code>pxelinux.0<\/code>. The last box we need to enter details in is the <strong>DHCP TFTP Server<\/strong> &#8211; enter the IP of your PXE server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/08\/2020-08-04-21_23_22-UDMPRO-UniFi-Network.jpg\" alt=\"\" class=\"wp-image-87\" width=\"699\" height=\"242\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-04-21_23_22-UDMPRO-UniFi-Network.jpg 718w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/2020-08-04-21_23_22-UDMPRO-UniFi-Network-300x104.jpg 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/figure>\n\n\n\n<p>Scroll down, hit the <strong>Save <\/strong>button, and then try to PXE boot a client.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/08\/Pxeboot3.gif\" alt=\"\" class=\"wp-image-88\" width=\"692\" height=\"473\"\/><\/figure>\n\n\n\n<p>If everything has worked successfully, we should be able to select the <strong>second<\/strong> boot option, and after a few moments, the automated installation should begin.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/10.171.10.16:10000\/wp-content\/uploads\/2020\/08\/B-PXEBOOT-2020-08-05-11-33-51-1024x614.png\" alt=\"\" class=\"wp-image-96\" width=\"699\" height=\"419\" srcset=\"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/B-PXEBOOT-2020-08-05-11-33-51-1024x614.png 1024w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/B-PXEBOOT-2020-08-05-11-33-51-300x180.png 300w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/B-PXEBOOT-2020-08-05-11-33-51-768x461.png 768w, https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/B-PXEBOOT-2020-08-05-11-33-51.png 1280w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/figure>\n\n\n\n<p>Once the VM has completed the installation and rebooted, you&#8217;ll be landed at a <code>localhost<\/code> login prompt, and the VM will have installed as per the kickstart file we created &#8211; you&#8217;ll be able to login as root with the password we encrypted, and use the packages we specified in the kickstart file (<code>wget<\/code>,<code>curl<\/code>,<code>nano<\/code>,<code>htop<\/code>). The VM will have a DHCP IP so you&#8217;ll need to configure it with a static IP if required, and also set a hostname. <\/p>\n\n\n\n<p>&#8230; Aaaaaand that concludes this post!<br>In another post, I&#8217;m going to go through the process of modifying our kickstart file to prompt for a hostname\/IP address, and also explain how we can automate some configuration of packages through the kickstart file and post-scripts. Stay tuned! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is the first in a series on building\/setting up\/improving a PXE boot server with CentOS 7.<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/dannypayne.me\/?p=20\">Read more<span class=\"screen-reader-text\">Building a PXE boot server<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":81,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12,6],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-archive","category-homelab","excerpt","zoom","full-without-featured","even","excerpt-0"],"jetpack_featured_media_url":"https:\/\/dannypayne.me\/wp-content\/uploads\/2020\/08\/B-PXEBOOT-2020-08-04-19-15-25-e1597247862651.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dannypayne.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":28,"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":243,"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions\/243"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dannypayne.me\/index.php?rest_route=\/wp\/v2\/media\/81"}],"wp:attachment":[{"href":"https:\/\/dannypayne.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dannypayne.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dannypayne.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}