<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Roberto's Blog]]></title><description><![CDATA[Roberto's Blog]]></description><link>https://virtualrob.me</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 12:07:52 GMT</lastBuildDate><atom:link href="https://virtualrob.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Using Serva PXE server in Windows to boot Linux distros on a LAN PC]]></title><description><![CDATA[Introduction
Wanting to try several Linux distros in a spare PC can be quite interesting and fun, but it can also lead to a time-consuming operation of writing the ISOs to a USB/CD and using them to boot/try each distro.
A much better approach is to ...]]></description><link>https://virtualrob.me/using-serva-pxe-server-in-windows-to-boot-linux-distros-on-a-lan-pc</link><guid isPermaLink="true">https://virtualrob.me/using-serva-pxe-server-in-windows-to-boot-linux-distros-on-a-lan-pc</guid><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Roberto]]></dc:creator><pubDate>Thu, 05 Sep 2024 12:49:56 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction</h3>
<p>Wanting to try several Linux distros in a spare PC can be quite interesting and fun, but it can also lead to a time-consuming operation of writing the ISOs to a USB/CD and using them to boot/try each distro.</p>
<p>A much better approach is to setup a <a target="_blank" href="https://en.wikipedia.org/wiki/Preboot_Execution_Environment">PXE</a> environment to be able to boot the different distros over the LAN; the (free for personal use, a.k.a. "Community") PXE server I've used is called <strong>Serva</strong>; the website is <a target="_blank" href="https://www.vercot.com/~serva/default.html">here</a>; I think the definition of PXE environment that they have on their home page is very good, so I've paraphrased here:</p>
<blockquote>
<p>A Preboot eXecution Environment server offers the network resources needed by client PCs that have been configured to boot from a network device instead of booting from the classic mass storage options (SSD/HDD/DVD). The offered environment mainly consists of DHCP or proxyDHCP and TFTP server services.</p>
</blockquote>
<p>So a good way of trying different distros using bare-metal (that is, not using a virtualisation application such as VirtualBox) is to have a Windows PC that will run the Serva server and another (spare) PC, connected to the same LAN, that we will use as our testing device</p>
<h3 id="heading-some-theory-and-definitions">Some theory and definitions</h3>
<h4 id="heading-dynamic-host-configuration-protocol-dhcp">Dynamic Host Configuration Protocol (DHCP)</h4>
<p>DHCP services are needed in a network (such as a LAN) so devices connecting to it will get a uniquely assigned IP address; most ISP routers provide this functionality by default, so any device in your home LAN that requests a connection (and that includes wireless devices such as TVs, laptops, mobile phones, an wired devices such as PCs, etc.) will automatically get an IP; in the case of Serva's PXE environment, you can use its own DHCP to assign IP(s) to the booting PC or, if you have a DHCP in your router (like I have), then you'll only need to use the proxyDHCP (detailed steps below)</p>
<h4 id="heading-tftp-trivial-file-transfer-protocol">TFTP (Trivial File transfer Protocol)</h4>
<p>TFTP is a simple file-transfer protocol that is used by Serva (and of course many other applications) to transfer files in a network</p>
<h4 id="heading-computer-booting-up-process">Computer booting up process</h4>
<p>When a PC is switched on, it will try to start up (boot) by using pre-defined settings (which can be changed, as we will do below) to look for a booting device; in most cases, this is a hard disk, but it can be a USB stick, a CD/DVD ROM or a network card (NIC); this last option is the one we will use to boot (and optionally install) our Linux distributions; once the PC has started to boot, the device (for example hard disk) will "provide" the PC with the rest of the software (typically an operating system) to continue with the booting process</p>
<p>In a scenario where we are booting a PC using its network card instead of a device containing an operating system, a PXE server will provide the PC all the information that it requires: a DHCP server to assign it an IP, and a TFTP server to provide the booting PC with the software it needs to boot; so in the steps below we will provide our booting PC with a Linux distribution it can use to boot up</p>
<h3 id="heading-linux-distributions-used">Linux distributions used</h3>
<p>I'm a big fan of Linux; before it came along, I used Unix System 4 in my first job back in the day, mainly writing shell scripts, which was quite fun; I've used a few of the many Linux distributions that exist out there (see <a target="_blank" href="https://distrowatch.com/">this link</a> to have a look at the list), but I always go back to a Ubuntu-based distribution, maybe because I'm more comfortable with their command-line software manager <strong><em>apt</em></strong> (I'm a big fan of the command line), among other reasons.</p>
<p>So the distributions I have used for this post are the following:</p>
<ul>
<li><p><a target="_blank" href="https://linuxmint.com/">Linux Mint 20.2</a></p>
</li>
<li><p><a target="_blank" href="https://ubuntubudgie.org/">Ubuntu Budgie 20.04.3</a></p>
</li>
<li><p><a target="_blank" href="https://elementary.io/">Elementary OS 5.1</a></p>
</li>
<li><p><a target="_blank" href="https://zorin.com/">Zorin OS 16 Core</a></p>
</li>
<li><p><a target="_blank" href="https://get.opensuse.org/tumbleweed">openSUSE Tumbleweed</a> (<strong><em>Yes, this is a non-Ubuntu based distro!</em></strong>)</p>
</li>
</ul>
<h3 id="heading-setting-up">Setting up</h3>
<h4 id="heading-serva-pxe-server">Serva PXE Server</h4>
<p>Download Serva from <a target="_blank" href="https://www.vercot.com/~serva/download.html">here</a>; you will end up with a zipped file such as <code>Serva_Community_v4.4.0-21081411.zip</code>; unzip the file on a folder such as <code>E:\Serva_Community_v4.4.0</code> (for the purposes of this post, that will be the default ("base") folder); on this folder, create an empty folder called <code>Serva_repository</code></p>
<p>Start Serva by double-clicking on <code>Serva64.exe</code>; since this is a Community edition, you will get a prompt with a timeout before it starts; confirm that you are a Community user</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1637339712952/RfCL9QwLf.png" alt="Serva-start-screen.PNG" /></p>
<p>The first time you run Serva you may get a Windows Security Alert saying that the firewall blocked Serva; you need to allow the access so Serva can work as expected</p>
<p>Accept the license and then do as it says in the Serva main window: Go to System Menu/Settings; the system menu is located in the top-left of the window, so click on the icon and then on <code>Settings</code></p>
<p>There are quite a few settings and tabs, but we only need two of them to make this work:</p>
<ul>
<li>Click on the TFTP tab and enable <code>TFTP Server</code>; this will enable some of the controls on this tab; the important one is the <code>TFTP Server root directory</code>; click on Browse and select the <code>Serva_repository</code> folder we created above</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1637340816229/AyIqerwq-.png" alt="Serva-TFTP-configuration.PNG" /></p>
<ul>
<li><p>Click on the DHCP tab and enable <code>proxyDHCP</code> and <code>BINL</code> (without going into much detail, by enabling BINL you tell Serva to provide its own DHCP boot file)</p>
</li>
<li><p>Click Ok; Serva will show a message asking to restart it by opening it and closing it; at this point, close it but don't re-open it yet</p>
</li>
</ul>
<h4 id="heading-linux-distros">Linux distros</h4>
<p>Download the ISOs for each distro you want to try; you'll end up with files with names such as <code>ubuntu-budgie-20.04.3-desktop-amd64.iso</code> and <code>linuxmint-20.2-cinnamon-64bit.iso</code></p>
<p>If you now open folder <code>E:\Serva_Community_v4.4.0\Serva_repository</code>, you'll see that Serva has created some folders; the one we are interested in for this post is <code>NWA_PXE</code>; non-windows images are placed here so Serva will serve them (i.e. copy using TFTP) to our booting PC (there are other folders for booting Windows images, but we won't cover that here)</p>
<p>The next step is to unzip the ISOs into a folder INSIDE <code>NWA_PXE</code>; you can use a utility such as <a target="_blank" href="https://www.7-zip.org/">7Zip</a> to uncompress the ISOs, or alternatively, double click the file to mount it as a virtual drive; whichever way you use, you should end up with a folder structure such as the following:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1637595196592/GRbE9WZEZM.jpeg" alt="04 - Folder structure.jpg" /></p>
<p><strong>Important</strong>: The folder names should not contain spaces, or the corresponding entry won't show in Serva's main menu when the PC is booting</p>
<h3 id="heading-configuring-serva">Configuring Serva</h3>
<p>The next step is to configure Serva to use these folders as the distro source(s) to be served (i.e. transferred) to the booting PC</p>
<p>Once the PC starts to boot, it will need to mount the distros that Serva provides to continue with the booting process; so we need to share the NWA_PXE<code>folder; to do this, right-click on the folder, select</code>Properties<code>and then click on the</code>Sharing<code>tab; then click on</code>Share...<code>; you Windows user name should already be selected as</code> Owner<code>; just click on</code> Share<code>and then</code>Done<code>and</code>Close`.</p>
<h4 id="heading-serva-configuration-files">Serva configuration files</h4>
<p>Each one of the folders containing a distro needs a Serva configuration file called <code>ServaAsset.inf</code>; this file contains information that tells Serva what this specific distro needs to boot; for Ubuntu-based distros, the configuration is virtually the same; other distros have small differences in the configuration</p>
<p>Here's an example for a Ubuntu-based distro:</p>
<pre><code class="lang-plaintext">[PXESERVA_MENU_ENTRY] asset = LinuxMint-20.2-Cinnamon-64bit platform = amd64

kernel_bios = /NWA_PXE/$HEAD_DIR$/casper/vmlinuz append_bios = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/casper/initrd.lz boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE/$HEAD_DIR$ NFSOPTS=-ouser=&lt;Your_Username&gt;,pass=&lt;Your_password&gt;,sec=ntlmv2,vers=2.0,ro ip=dhcp ro ipv6.disable=1

kernel_efi64 = /NWA_PXE/$HEAD_DIR$/casper/vmlinuz append_efi64 = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/casper/initrd.lz boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE/$HEAD_DIR$ NFSOPTS=-ouser=&lt;Your_Username&gt;,pass=&lt;Your_password&gt;,sec=ntlm,vers=1.0,ro ip=dhcp ro ipv6.disable=1
</code></pre>
<p>And here's an example for openSUSE:</p>
<pre><code class="lang-plaintext">[PXESERVA_MENU_ENTRY]

asset = OpenSUSE-Tumbleweed-x86_64 platform = x86_64

kernel_bios = /NWA_PXE/$HEAD_DIR$/boot/x86_64/loader/linux append_bios = initrd=/NWA_PXE/$HEAD_DIR$/boot/x86_64/loader/initrd splash=silent vga=0x314 showopts netdevice=bootif install=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/

ipappend_bios = 2

kernel_efi64 = /NWA_PXE/$HEAD_DIR$/boot/x86_64/loader/linux append_efi64 = initrd=/NWA_PXE/$HEAD_DIR$/boot/x86_64/loader/initrd splash=silent vga=0x314 showopts netdevice=bootif install=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/

ipappend_efi64 = 2
</code></pre>
<p>Let's dissect a bit the main points to note on this file (note the placeholders for username and password)</p>
<p>The free text in <code>asset</code> is a label that Serva will show in the booting PC as a selectable entry you can choose; so in case you have several distros, you can select which one to boot; my Serva boot menu is shown below:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1637603219576/TurmH76bb.jpeg" alt="05 - Serva boot menu.jpg" /></p>
<p>There are two sections in the file, one for BIOS and one for UEIF (for a good explanation about these two, plus more detailed explanation of the booting process, see the <code>UEFI vs BIOS</code> link in the <code>Useful links</code> section below)</p>
<p>Note the references to the (mounted) share folder we defined above; so for example <code>/NWA_PXE/$HEAD_DIR$/casper</code> refers to the location of the <code>casper</code> folder in the shared folder structure; <code>$HEAD_DIR</code> refers to the name of the "head folder"; so that would map to, for example <code>E:\Serva_Community_v4.4.0\Serva_repository\NWA_PXE\Zorin-OS-16-Core-64-bit-r1\casper</code></p>
<p>The <code>kernel_bios</code> and <code>kernel_efi64</code> sections contain the location of the Linux kernel executable; its function is to load the OS into memory so that the server becomes usable; note that the name and/or location of this file can vary between distributions; for <code>Zorin OS</code> is <code>/casper/vmlinuz</code> and for <code>openSUSE</code> is <code>/boot/x86_64/loader/linux</code></p>
<p>The <code>append_bios</code> and <code>append_efi64</code> sections contain a reference to the location of the <code>initrd</code> file, which is the initial RAM disk; it is an initial root file system that is mounted prior to when the real root file system becomes available; note that the name of this file can vary between distributions; for <code>ElementaryOS</code> and <code>Linux Mint</code> is <code>initrd.lz</code>; for <code>openSUSE</code> and <code>Ubuntu</code> is <code>initrd</code>; and for <code>Zorin OS</code> is <code>initrd.lz4</code>; so check you enter the correct filename in the corresponding <code>ServaAsset.inf</code> file</p>
<p>Note that the location of those files can also vary</p>
<p>The <code>append_bios</code> and <code>append_efi64</code> sections also contain information necessary to mount the distro so it can be shared (TFTPd) to the booting PC; these information is provided as parameters to <code>NFSOPTS</code>; this includes username/password for the share we created above, among other things</p>
<h2 id="heading-booting-up">Booting up!</h2>
<p>Once everything is in place, follow these steps:</p>
<ul>
<li><p>Start Serva</p>
</li>
<li><p>Boot your PC and press whichever key will let you choose its boot options; this key really depends on the manufacturer; I'm trying this on an old Dell Precision T3500, and the key is F12</p>
</li>
<li><p>Select the option to boot from the network controller; it may be called something else, like network booting, LAN booting, etc. If such an option is not available, you may need to enter the BIOS setup and enable it; again, the key to enter the BIOS setup varies; it can be F2, DEL or something else.</p>
</li>
<li><p>After a brief period of time, the booting PC should receive the booting instructions from Serva, and start loading first vmlinuz, and then initrd</p>
</li>
<li><p>After initrd is loaded, the PC will try to mount the TFTP share offered by Serva and load the distro's image to memory; this may take a while, but after it's finished then the distro's GUI should show, which in many cases lets you either try the distro or install it</p>
</li>
</ul>
<p>That's it!!</p>
<h3 id="heading-useful-links">Useful links</h3>
<p><a target="_blank" href="https://www.freecodecamp.org/news/uefi-vs-bios/">UEFI vs BIOS: What's the Difference?</a></p>
<p>Thanks for reading!</p>
]]></content:encoded></item></channel></rss>