<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The HyRax Macrocosm &#187; Networking</title>
	<atom:link href="http://www.serenux.com/tag/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serenux.com</link>
	<description>Life, the Universe and Ubuntu.</description>
	<lastBuildDate>Mon, 21 Jun 2010 10:45:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>HowTo: Get an Ubuntu Live CD to boot off a PXE server</title>
		<link>http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/</link>
		<comments>http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/#comments</comments>
		<pubDate>Sun, 30 May 2010 15:09:22 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=717</guid>
		<description><![CDATA[Following my article about creating your own PXE network boot server, here is the first practical use you can put it to &#8211; taking the Ubuntu Live CD and turning it into a network-bootable version! Network booting the Live CD has obvious advantages &#8211; aside from booting faster than CD (especially on a gigabit network), [...]]]></description>
			<content:encoded><![CDATA[<p>Following my article about <a title="How to setup your own PXE boot server" href="http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/" target="_blank">creating your own PXE network boot server</a>, here is the first practical use you can put it to &#8211; taking the Ubuntu Live CD and turning it into a network-bootable version!</p>
<p>Network booting the Live CD has obvious advantages &#8211; aside from booting faster than CD (especially on a gigabit network), it is indispensable as an emergency boot medium in a workplace environment, especially for broken Windows systems, and allows for Ubuntu effortless installations on netbook PC&#8217;s that don&#8217;t have optical drives and saves you having to have a USB stick handy.</p>
<p><span id="more-717"></span><em><strong>Pre-requisites</strong></em></p>
<ul>
<li>You need a working Linux PXE boot server. Doesn&#8217;t have to be Ubuntu, but it needs to be Linux. You cannot use a Windows PXE server.</li>
<li>An Ubuntu 10.04 Live CD ISO or physical CD. Can be the 32-bit or 64-bit ISO, but you can also setup both of them at once!</li>
<li>At least 700MB of drive space on your PXE server, more if you want to have more than one CD available.</li>
<li>This tutorial was put together using Ubuntu Server 10.04 Lucid Lynx, but should work with all future releases and older versions to at least Ubuntu Server 8.04 Hardy Heron.</li>
</ul>
<p><em><strong>Getting it together</strong></em></p>
<ol>
<li>Login to your PXE server and mount the CD or ISO image (in this example we are copying the 32-bit disc). Assuming the CD is mounted at /media/cdrom, copy the CD&#8217;s files to your server as follows:
<pre><span style="color: #000080;">$ sudo mkdir -p /srv/tftp/ubuntu-livecd-boot/i386
$ sudo mkdir -p /srv/ubuntu-livecd/i386
$ sudo cp -av /media/cdrom/* /srv/ubuntu-livecd/i386
$ sudo cp -av /media/cdrom/casper/initrd.lz /srv/tftp/ubuntu-livecd-boot/i386
$ sudo cp -av /media/cdrom/casper/vmlinuz /srv/tftp/ubuntu-livecd-boot/i386</span></pre>
<p>(if you want to setup the 64-bit disc, then replace all instances of &#8220;i386&#8243; with &#8220;amd64&#8243;, or you can setup both architectures by setting up both directories)<br />
.</li>
<li>Make sure the permissions of the files to be loaded by TFTP are correct:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv</span></pre>
</li>
<li>The astute of you will have noticed that we have copied the Ubuntu CD outside of the TFTP directory and that we have made a separate copy of only two of the disc&#8217;s files inside the TFTP directory. Why is this? Well, the <em>vmlinuz</em> and <em>initrd.lz</em> files are the only files that TFTP will need to download to get started with the boot process. After that, we will use NFS to deliver the rest of the Live CD, so let&#8217;s set that up:
<pre><span style="color: #000080;">$ sudo apt-get install nfs-kernel-server</span>
</pre>
<p>Note: I should point out that the files that are copied to the NFS share do not have to be on the PXE server. The NFS server can be any box as NFS is not related to PXE at all.</p>
<p><span style="color: #000080;"> </span></li>
<li>Once that is installed, we need to define an NFS share. This is done in the NFS exports file, so let&#8217;s get that into a text editor:
<pre><span style="color: #000080;">$ sudo nano /etc/exports</span></pre>
</li>
<li>Add the following line to the bottom of the file:
<pre><span style="color: #000080;"># Ubuntu Live CD files for PXE booting
/srv/ubuntu-livecd/i386        *(ro,async,no_root_squash,no_subtree_check)</span></pre>
<p>&#8230;if you are setting up the 64-bit version, replace &#8220;i386&#8243; with &#8220;amd64&#8243;, or if setting up both architectures, list it as follows:</p>
<pre><span style="color: #000080;"># Ubuntu Live CD files for PXE booting
/srv/ubuntu-livecd/i386        *(ro,async,no_root_squash,no_subtree_check)
/srv/ubuntu-livecd/amd64       *(ro,async,no_root_squash,no_subtree_check)
</span></pre>
<p>A breakdown of the parameters on the right is as follows:</p>
<ul>
<li>The asterisk means &#8220;share with everyone on this network, regardless of who they are&#8221;.</li>
<li>The &#8220;ro&#8221; parameter means to share the data as read-only.</li>
<li>The &#8220;async&#8221; parameter allows the NFS server to reply before data is written to the share. Since it&#8217;s mounted as read-only anyway, the parameter is only there to keep NFS&#8217; syntax happy.</li>
<li>The &#8220;no_root_squash&#8221; parameter means to allow the NFS client to use the mount as a root filesystem, otherwise it&#8217;s mounted as &#8220;nobody&#8221; instead of &#8220;root&#8221;. Since the LiveCD is essentially a diskless client, we need to be able to define the NFS mount as a root volume.</li>
<li>The &#8220;no_subtree_check&#8221; parameter helps to speed up transfers. Normally NFS will check to see if a requested file exists in an exported sub-directory. This slows things down, so turning this off means the only check that is made is that the requested file exists on the exported filesystem. Subtree checking can also cause issues when an open file is renamed, but since the export is read-only, this is irrelevant.<br />
.</li>
</ul>
</li>
<li>Save your changes with CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now have NFS re-read its export file and begin sharing the specified directories with:
<pre><span style="color: #000080;">$ sudo exportfs -a</span></pre>
</li>
<li>We&#8217;re nearly ready to rock and/or roll. All we need to do now is prepare the PXE boot menu to launch the Live CD for us. Assuming you followed by previous tutorial and your boot menu file is called <em>mybootmenu.cfg</em>:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>Assuming your NFS server&#8217;s IP address is 192.168.0.10, insert the following lines for a 32-bit Live CD entry:
<pre><span style="color: #000080;">label Live CD 32-bit
    kernel ubuntu-livecd/i386/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.0.10:/srv/ubuntu-livecd/i386 initrd=ubuntu-livecd/i386/initrd.lz -- splash quiet</span></pre>
<p>&#8230;and if you are doing 64-bit, you can replace or add as a separate menu option the following:</p>
<pre><span style="color: #000080;">label Live CD 64-bit
</span><span style="color: #000080;">    kernel ubuntu-livecd/amd64/vmlinuz
    append boot=casper netboot=nfs  nfsroot=192.168.0.10:/srv/ubuntu-livecd/amd64  initrd=ubuntu-livecd/amd64/initrd.lz -- splash quiet
</span><span style="color: #000080;"> </span></pre>
<p>The <em>kernel</em> line is the actual kernel that is loaded to run the session. The <em>append</em> line tells the boot process several things. First up, the <em>casper</em> directory contains the boot files (a SquashFS image in the case of the Live CD), the root of the NFS file system is located on the server with the IP <em>192.168.0.10</em> under the path <em>/srv/ubuntu-livecd/i386</em> (or <em>amd64</em>) and that the image to fire up the RAM disk with is located under <em>ubuntu-livecd/i386/initrd.lz</em> and finally we have advised the boot process to suppress console messages and display the splash screen while loading. From this point on, the <em>initrd.lz</em> is extracted and will grab the SquashFS image from the <em>casper</em> directory via NFS, extract it and commence running it. All other files that the disc needs to do its thing (such as when installing Ubuntu from the Live environment) are also provided by the NFS share.</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>You&#8217;re now ready to go &#8211; reboot your PXE workstation and you should now see an entry for your Live CD. Upon choosing it, your system should fire up with the Live environment! Once booted, you can even do an Ubuntu install to the PC you started on as though you&#8217;d booted from a CD or USB device!<br />
.<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/MultibootPXE.png"><img class="aligncenter size-medium wp-image-723" title="Showing two Live CD options in my PXE boot menu" src="http://www.serenux.com/wp-content/uploads/2010/05/MultibootPXE-300x224.png" alt="" width="300" height="224" /></a></li>
</ol>
<p>Enjoy! <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HowTo: Setup your own PXE Boot Server using Ubuntu Server</title>
		<link>http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/</link>
		<comments>http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/#comments</comments>
		<pubDate>Sun, 30 May 2010 12:09:01 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=527</guid>
		<description><![CDATA[The Preboot eXecution Environment (PXE) provides a means of starting up a PC using a network adapter instead of the traditional method of hard-drive, USB flash stick, CD or floppy disk. Why would you want to boot a PC from the network? Well, it opens the door to booting diskless workstations, eg: Internet Cafe PC&#8217;s, [...]]]></description>
			<content:encoded><![CDATA[<p>The Preboot eXecution Environment (PXE) provides a means of starting up a PC using a network adapter instead of the traditional method of hard-drive, USB flash stick, CD or floppy disk.</p>
<p>Why would you want to boot a PC from the network? Well, it opens the door to booting diskless workstations, eg: Internet Cafe PC&#8217;s, or if you regularly install tens or hundreds of PC&#8217;s, you can start the installer on all those machines at once without needing to have individual boot/install media for each machine. You can even use Linux PXE for starting Microsoft Windows network installers and tools.</p>
<p>This article is going to show you how to setup a standard Ubuntu 10.04 Lucid Lynx Server to respond to a PXE boot request and present a boot menu ONLY. I will put practical applications such as installing Ubuntu over the network or booting a Live CD over the network into separate future articles.</p>
<p><span id="more-527"></span><em><strong>Pre-requisites:</strong></em></p>
<ul>
<li>A PC or virtual machine with an installation of Ubuntu Server on it. This tutorial was written using an Ubuntu Lucid 10.04 Server, but these instructions will work equally well on nearly any version of Ubuntu Server. This tutorial will not detail the initial build of a server as it is relatively straight forward.</li>
<li>A DHCP server that allows you to specific PXE boot information. Most consumer routers will <span style="text-decoration: underline;">not</span> give you these options. Suitable DHCP servers are the DHCP daemon on Ubuntu Server, third-party Linux router solutions such as Smoothwall or pfSense, and Windows Server among others.</li>
<li>If your DHCP server is a dedicated network/firewall device that you do not wish to use as a file server to serve the network boot files, then you will need a separate PC to be a file server as well.</li>
<li>Some free disk space. PXE booting take bugger-all space, but whatever you plan to serve from it will need space. If you plan to setup the Ubuntu Live CD to be bootable from PXE, you will need 700MB+ of hard-drive space on that server. You will need more than this if you wish to host things like multiple LiveCD&#8217;s such as both the 32-bit and 64-bit versions, or multiple different distributions.</li>
<li>A PC workstation that has PXE boot capability. Any PC built in the last 10 years should definitely have this capability, though you may be required to enable it in BIOS. If you do not have a PC that can do this, you can use a virtual machine such as Virtualbox instead (you could have a virtual machine PXE boot off a virtual PXE boot server too! <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</li>
<li>A copy of Ubuntu Server 10.04 that suits your server&#8217;s architechture.</li>
<li>A copy of the Ubuntu ALTERNATE Install CD 10.04 that we need to get some PXE boot files from. Unfortunately the Live CD does NOT contain the files we need.</li>
</ul>
<p>At the end of this exercise we will have a PXE server that will boot into a selection menu that will give us choices of things to do. We&#8217;re also going to pretty up the menu with a background image instead of just having plain boring text, and we&#8217;ll do this using some of the existing elements on the Ubuntu CD as most of the work has been done for you already!</p>
<p><em><strong>Getting it together:</strong></em></p>
<ol>
<li>Login to your server.<br />
.</li>
<li>Let&#8217;s install the software we need:
<pre><span style="color: #000080;">$ sudo apt-get install tftpd-hpa inetutils-inetd</span></pre>
<p>&#8230;this will install a Trivial FTP server which is essentially a super-simple FTP server plus the inetd daemon which will listen out for TFTP requests and direct them to the TFTP daemon.Before you ask, no you cannot use a regular FTP daemon like <em>vsftpd</em> or similar. It has to be a TFTP daemon. Beware: Ubuntu has two TFTP options in the repository &#8211; you <em>must</em> use the HPA version of the daemon as shown, as it handles large boot images while the other daemon does not. If you don&#8217;t use it, you will see boot errors.</li>
<li>By default Ubuntu sets up the TFTP daemon&#8217;s root directory to be <em>/var/lib/tftpboot</em> which may not suit your requirements. For the purposes of this tutorial, we will be changing this to <em>/srv/tftp</em> instead. To do this, we need to edit the <em>/etc/inetd.conf</em> file in a text editor:
<pre><span style="color: #000080;">$ sudo nano /etc/inetd.conf</span></pre>
</li>
<li>Scroll down to the bottom of the file and modify the <em>tftp</em> line (or add it if it&#8217;s missing) and substitute <em>/var/lib/tftpboot</em> bit on the end of that line with the path to your preferred directory:
<pre><span style="color: #000080;">tftp    dgram   udp    wait    root    /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s <strong>/srv/tftp</strong></span></pre>
</li>
<li>Save your changes by pressing CTRL+X and then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now we need to tell the Trivial FTP daemon where our TFTP root is. Open its config file with:
<pre><span style="color: #000080;">$ sudo nano /etc/default/tftpd-hpa</span></pre>
</li>
<li>Modify the <em>TFTP_DIRECTORY</em> line (usually the fourth line from the top) to be <em>/srv/tftp</em>:
<pre><span style="color: #000080;"># /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"</span><strong><span style="color: #000080;">
TFTP_DIRECTORY="/srv/tftp"</span></strong><span style="color: #000080;">
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"</span></pre>
</li>
<li>Save your changes by pressing CTRL+X and then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now we just need to restart the inetd and tftp services with:
<pre><span style="color: #000080;">$ sudo service inetutils-inetd restart
$ sudo service tftpd-hpa restart</span></pre>
</li>
<li>So that&#8217;s the TFTP daemon ready to serve files to a PXE agent. Now we need to create the directory where we will be putting all our PXE goodness into:
<pre><span style="color: #000080;">$ sudo mkdir -p /srv/tftp</span></pre>
</li>
<li>We now need to copy some files off the Ubuntu Alternate Install CD that make up the PXE boot files and the menu config files. I will use the 32-bit disc in this example, though the files are the same on the 64-bit disc for this step. Insert the CD or mount the downloaded Ubuntu Alternate Install CD ISO. In this case I will assume you have a physical CD mounted at <em>/media/cdrom</em>.
<pre><span style="color: #000080;">$ sudo cp /media/cdrom/install/netboot/pxelinux.0 /srv/tftp
$ sudo mkdir -p /srv/tftp/ubuntu-installer/i386
$ cd /media/cdrom/install/netboot/ubuntu-installer/i386
$ sudo cp -R boot-screens /srv/tftp/ubuntu-installer/i386
$ sudo cp initrd.gz linux /srv/tftp/ubuntu-installer/i386
</span></pre>
<p>(if you&#8217;re using the 64-bit CD, substitute all instances of &#8220;i386&#8243; above with &#8220;amd64&#8243; instead.)<br />
.</p>
<p><span style="color: #000080;"> </span></li>
<li>Now we need to setup the initial PXE boot process:
<pre><span style="color: #000080;">$ sudo mkdir /srv/tftp/pxelinux.cfg
$ sudo nano /srv/tftp/pxelinux.cfg/default</span></pre>
</li>
<li>You will now be looking at a blank text editor. In this, type the following:
<pre><span style="color: #000080;">include mybootmenu.cfg
default boot-screens/vesamenu.c32
prompt 0
timeout 100</span>
</pre>
<p>The <em>timeout 100</em> line will provide a 10 second countdown before it automatically chooses the default PXE menu option when you boot into it. If you do not want a timeout, then change this to <em>timeout 0</em> instead.</li>
<li>Press CTRL+X and then &#8220;Y&#8221; and then Enter to save your changes.<br />
.</li>
<li>Now let&#8217;s setup our actual boot menu that we&#8217;ll be choosing options from:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>Again you&#8217;ll be looking at a blank text editor. Type (or copy &amp; paste) in the following. Indenting text is not important, but makes it more readable:
<pre><span style="color: #000080;">menu hshift 13
menu width 49
menu margin 8
menu title My Customised Network Boot Menu
include ubuntu-installer/i386/boot-screens/stdmenu.cfg
menu begin Cool options
    default myfirstoption
    label myfirstoption
        menu label This is a menu item
    label mysecondoption
        menu label This is another option
menu end</span></pre>
<p><span style="color: #000080;"> </span></li>
<li>Press CTRL+X, then press &#8220;Y&#8221; and then Enter to save your changes.<br />
.</li>
<li>Finally, we need to change the permissions of all files concerned because TFTP will not read any files unless they are set to full access:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv
</span></pre>
</li>
<li>That&#8217;s PXE server side ready to go. Now we need to tell PXE clients where to find the PXE boot server. <em>If you are NOT using Ubuntu as your DHCP server, then skip to step 23</em>, otherwise do the following:<span style="color: #000080;"> </span><span style="color: #000080;"><br />
</span></p>
<pre><span style="color: #000080;">$ sudo nano /etc/dhcp3/dhcp.conf</span></pre>
</li>
<li>This opens up the DHCP config file into your text editor. Assuming your PXE server is at 192.168.0.10, scroll right to the very bottom of this file and add the following:
<pre><span style="color: #000080;">next-server 192.168.0.10</span><span style="color: #000080;">
filename "/srv/tftp/pxelinux.0";</span></pre>
<p>(note the semi-colon on the end)<br />
.</li>
<li>Press CTRL+X, then &#8220;Y&#8221; and then Enter to save your changes.<br />
.</li>
<li>Restart the DHCP daemon with:<span style="color: #000080;"> </span><span style="color: #000080;"><br />
</span></p>
<pre><span style="color: #000080;">$ sudo /etc/init.d/dhcpd restart</span></pre>
</li>
<li>If you&#8217;re using a non-Ubuntu DHCP server, then look for any &#8220;network boot&#8221; options and specify the PXE boot server&#8217;s IP address and path to the <em>pxelinux.0</em> file there. For example, in Smoothwall, you would go to Services-&gt;DHCP and then check the &#8220;Network boot enabled&#8221; checkbox, then specify &#8220;192.168.0.10&#8243; (to suit our tutorial) into the &#8220;Boot server&#8221; box and &#8220;/var/lib/tftpboot/pxelinux.0&#8243; in the &#8220;Boot filename&#8221; box and &#8220;/srv/tftp&#8221; in the &#8220;Root path&#8221; box.<a href="http://www.serenux.com/wp-content/uploads/2010/05/SmoothwallConfig.png"><img class="aligncenter size-medium wp-image-712" title="Smoothwall PXE Configuration" src="http://www.serenux.com/wp-content/uploads/2010/05/SmoothwallConfig-300x103.png" alt="An example of configuring Smoothwall to allow PXE booting" width="300" height="103" /></a><br />
.</li>
<li>We should now be ready to try out our PXE boot server! On your test workstation or VM, enable booting off the network (in the case of PXE booting a Virtualbox VM, you must ensure that the network adapter is set to &#8220;bridged mode&#8221; instead of &#8220;NAT&#8221;) and fire away. You should first see your PC launch its PXE agent, looking for a DHCP server to tell it where the PXE server is:<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEStartBooting.png"><img class="aligncenter size-medium wp-image-704" title="Looking for a PXE server" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEStartBooting-300x166.png" alt="" width="300" height="166" /><br />
</a></li>
<li>If your PXE server is working, within a few seconds you will see your boot menu!<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu1.png"><img class="aligncenter size-medium wp-image-702" title="My First PXE Menu!" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu1-300x225.png" alt="" width="300" height="225" /></a>&#8230;and if you hit Enter on &#8220;cool options&#8221; you will now see a sub-menu showing your two options that we created.<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu2.png"><img class="aligncenter size-medium wp-image-703" title="Our sub-menu of options" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu2-300x225.png" alt="" width="300" height="225" /></a></li>
<li>Well this is all well and good, but the menu currently doesn&#8217;t actually DO anything other than show us a bunch of options. How about we provide something, say the Memory Test application from the Ubuntu CD? Plus we&#8217;ll add an option to boot from the first HDD in your system. If your CD is still mounted on the server, then go back into the terminal you&#8217;ve been working in and copy over the MemTest app as follows:
<pre><span style="color: #000080;">$ sudo cp /media/cdrom/install/mt86plus /srv/tftp</span></pre>
</li>
<li>Now let&#8217;s add a menu entry for it:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>Modify the file so that it now looks like the following (add just the bolded lines):
<pre><span style="color: #000080;">menu hshift 13
menu width 49
menu margin 8
menu title My Customised Network Boot Menu
include ubuntu-installer/i386/boot-screens/stdmenu.cfg
<strong>label Boot from the first HDD
    localboot 0
label Memory Tester
    kernel mt86plus</strong>
menu begin Cool options
    default myfirstoption
    label myfirstoption
        menu label This is a menu item
    label mysecondoption
        menu label This is another option
menu end</span></pre>
</li>
<li>Save your changes and exit.<br />
.</li>
<li>Reboot your test PC via PXE and this time you will see your menu sport the new menu options at the top (you could have equally placed them at the bottom too):<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu3.png"><img class="aligncenter size-medium wp-image-705" title="Added boot and memtest menu options" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu3-300x225.png" alt="" width="300" height="225" /></a></li>
<li>Choosing &#8220;Memory Tester&#8221; from the menu will launch the MemTest app straight away, just like off the CD. But by now you are probably wondering &#8220;Aren&#8217;t be building off Ubuntu 10.04? Why does the menu have the old logo on it? Can we change it?&#8221; Sure, we can!<br />
.</li>
<li>The Ubuntu 10.04 installer CD HAS got the new Ubuntu logo, but for some reason it&#8217;s only saved as a PCX file which won&#8217;t work for the PXE boot menu. We can fix this by simply re-saving the PCX file as a PNG file. To start with, get a copy of the <em>splash.pcx</em> file from the <em>/isolinux</em> directory on the Ubuntu CD. This is the new Ubuntu logo that you normally see on the CD&#8217;s boot menu.<br />
.</li>
<li>Load this file into an image editor such as The GIMP and re-save it as a PNG file, eg: <em>splash.png</em> (of course there&#8217;s nothing stopping you from creating your own graphic either &#8211; just make sure it&#8217;s no greater than 640&#215;480 in size and indexed down to 16 colours).<br />
<em>.<br />
</em></li>
<li>Copy the re-saved image file into <em>/srv/tftp/ubuntu-installer/i386/boot-screens</em> and overwrite the original <em>splash.png</em> file.<br />
.</li>
<li>Ensure that the permissions of the file are set correctly again with:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv</span></pre>
</li>
<li>And when you reboot your PXE workstation again, your menu will now look like:<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu4.png"><img class="aligncenter size-medium wp-image-706" title="The PXE boot menu with an alternate background graphic" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu4-300x225.png" alt="" width="300" height="225" /></a></li>
</ol>
<p>And there you have it. A working PXE server with menu!</p>
<p>I will document further uses of the PXE boot facility in future articles, including <a title="How to setup a Live CD for a PXE environment" href="http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/" target="_blank">how to boot the Live CD environment without the CD or a USB key</a>, setup the ability to use your local Ubuntu mirror as an installation source for new installs, how to launch tools like Clonezilla and also how to setup a diskless boot system that uses PXE to do a normal Ubuntu desktop boot directly off the network without a local hard-drive.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HowTo: Configure Ubuntu to be able to use and respond to NetBIOS hostname queries like Windows does</title>
		<link>http://www.serenux.com/2009/09/howto-configure-ubuntu-to-be-able-to-use-and-respond-to-netbios-hostname-queries-like-windows-does/</link>
		<comments>http://www.serenux.com/2009/09/howto-configure-ubuntu-to-be-able-to-use-and-respond-to-netbios-hostname-queries-like-windows-does/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 13:24:07 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=616</guid>
		<description><![CDATA[Users in the Windows world are very used to referencing PC&#8217;s via their NetBIOS names instead of their IP address. If your PC has a dynamic IP address (DHCP-assigned) of 192.168.0.12 and its hostname (computer name) is &#8220;gordon&#8221;, Windows users can happily jump into a command line or an Explorer window and ping the name [...]]]></description>
			<content:encoded><![CDATA[<p>Users in the Windows world are very used to referencing PC&#8217;s via their NetBIOS names instead of their IP address. If your PC has a dynamic IP address (DHCP-assigned) of 192.168.0.12 and its hostname (computer name) is &#8220;gordon&#8221;, Windows users can happily jump into a command line or an Explorer window and ping the name &#8220;gordon&#8221; which will magically resolve to 192.168.0.12.</p>
<p>If your host is not configured with a Hosts file entry on your local PC or a DNS entry to associate a name with an IP address, Ubuntu can only use the IP address of that PC to communicate with it which means you have to remember what that IP address is with your feeble grey-matter in your head. Likewise, Ubuntu will not respond to a Windows PC pinging its NetBIOS name because Ubuntu does not use NetBIOS at all by default and so it will ignore such requests.</p>
<p>So how do we get Ubuntu to resolve NetBIOS names like Windows? And how can we allow Windows to ping Ubuntu like another Windows PC? Read on&#8230;</p>
<p><span id="more-616"></span></p>
<p>Let&#8217;s illustrate the problem first. You&#8217;ll need a Windows PC on your network to test this. For this article, the Ubuntu PC will be called &#8220;gordon&#8221; and the Windows PC will be called &#8220;alyx&#8221;.</p>
<p>On either PC, if you open a terminal or Command Line window and ping the opposing machine, eg:</p>
<pre><span style="color: #000080;">$ ping alyx</span></pre>
<p>or</p>
<pre><span style="color: #000080;">C:\&gt; ping gordon</span></pre>
<p>You get an error stating that the host cannot be found. Now in the case of Windows, if you were to ping another Windows PC instead of an Ubuntu PC, you can ping its name with no problem.</p>
<p>Let&#8217;s sort this out, shall we?</p>
<p><span style="color: #0000ff;"><em><strong>Allowing Ubuntu to ping Windows NetBIOS names</strong></em></span></p>
<p>Ubuntu is setup for Linux use, not Windows use, so we need to install a package that will allow Ubuntu to more readily mix in with Windows networks and use NetBIOS. This package is called &#8220;winbind&#8221;.</p>
<ol>
<li>Open a terminal and type in the following at the terminal prompt:
<pre><span style="color: #000080;">$ sudo apt-get install winbind</span></pre>
</li>
<li>Once installed, we need to tell Ubuntu to use WINS (as provided by winbind) to resolve host names. Type in:
<pre><span style="color: #000080;">$ sudo gedit /etc/nsswitch.conf</span></pre>
<p>&#8230;which will open the file into the Gnome Editor.<br />
.</li>
<li>Scroll down to the line that starts with &#8220;hosts:&#8221;. In Ubuntu Jaunty, it looks similar to this:
<pre><span style="color: #000080;">hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4</span></pre>
</li>
<li>Add the word &#8220;wins&#8221; on the end of this line such that is now looks like:
<pre><span style="color: #000080;">hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4 wins</span></pre>
</li>
<li>Save and exit the editor.<br />
.</li>
<li>Now let&#8217;s ping the name of our Windows box again.
<pre><span style="color: #000080;">$ ping alyx</span></pre>
<p>&#8230;and it now resolves!<br />
.</li>
<li>Pat yourself on the back.</li>
</ol>
<p><span style="color: #0000ff;"><em><strong>Allowing Windows to ping Ubuntu NetBIOS names</strong></em></span></p>
<p>This is just one half of the equation. We now need to allow Windows to be able to ping Ubuntu PC&#8217;s using its NetBIOS name. This requires Ubuntu to recognise and respond to that request. We need to setup a server daemon to do this. In Ubuntu, this particular server daemon is called Samba.</p>
<ol>
<li>Installing Samba is simplicity itself. Open a terminal and type in:
<pre><span style="color: #000080;">$ sudo apt-get install samba</span></pre>
</li>
<li>Once that has finished, your Ubuntu PC will automagically respond to all NetBIOS queries for its hostname straight away, and that&#8217;s not just from Windows machines, but other Ubuntu machines (configured with the &#8220;winbind&#8221; package) as well.<br />
.</li>
<li>Pat yourself on the back again. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2009/09/howto-configure-ubuntu-to-be-able-to-use-and-respond-to-netbios-hostname-queries-like-windows-does/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
