Using Serva PXE server in Windows to boot Linux distros on a LAN PC
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 setup a PXE 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 Serva; the website is here; I think the definition of PXE environment that they have on their home page is very good, so I've paraphrased here:
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.
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
Some theory and definitions
Dynamic Host Configuration Protocol (DHCP)
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)
TFTP (Trivial File transfer Protocol)
TFTP is a simple file-transfer protocol that is used by Serva (and of course many other applications) to transfer files in a network
Computer booting up process
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
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
Linux distributions used
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 this link 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 apt (I'm a big fan of the command line), among other reasons.
So the distributions I have used for this post are the following:
openSUSE Tumbleweed (Yes, this is a non-Ubuntu based distro!)
Setting up
Serva PXE Server
Download Serva from here; you will end up with a zipped file such as Serva_Community_v4.4.0-21081411.zip; unzip the file on a folder such as E:\Serva_Community_v4.4.0 (for the purposes of this post, that will be the default ("base") folder); on this folder, create an empty folder called Serva_repository
Start Serva by double-clicking on Serva64.exe; since this is a Community edition, you will get a prompt with a timeout before it starts; confirm that you are a Community user

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
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 Settings
There are quite a few settings and tabs, but we only need two of them to make this work:
- Click on the TFTP tab and enable
TFTP Server; this will enable some of the controls on this tab; the important one is theTFTP Server root directory; click on Browse and select theServa_repositoryfolder we created above

Click on the DHCP tab and enable
proxyDHCPandBINL(without going into much detail, by enabling BINL you tell Serva to provide its own DHCP boot file)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
Linux distros
Download the ISOs for each distro you want to try; you'll end up with files with names such as ubuntu-budgie-20.04.3-desktop-amd64.iso and linuxmint-20.2-cinnamon-64bit.iso
If you now open folder E:\Serva_Community_v4.4.0\Serva_repository, you'll see that Serva has created some folders; the one we are interested in for this post is NWA_PXE; 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)
The next step is to unzip the ISOs into a folder INSIDE NWA_PXE; you can use a utility such as 7Zip 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:

Important: The folder names should not contain spaces, or the corresponding entry won't show in Serva's main menu when the PC is booting
Configuring Serva
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
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_PXEfolder; to do this, right-click on the folder, selectPropertiesand then click on theSharingtab; then click onShare...; you Windows user name should already be selected as Owner; just click on Shareand thenDoneandClose`.
Serva configuration files
Each one of the folders containing a distro needs a Serva configuration file called ServaAsset.inf; 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
Here's an example for a Ubuntu-based distro:
[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=<Your_Username>,pass=<Your_password>,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=<Your_Username>,pass=<Your_password>,sec=ntlm,vers=1.0,ro ip=dhcp ro ipv6.disable=1
And here's an example for openSUSE:
[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
Let's dissect a bit the main points to note on this file (note the placeholders for username and password)
The free text in asset 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:

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 UEFI vs BIOS link in the Useful links section below)
Note the references to the (mounted) share folder we defined above; so for example /NWA_PXE/$HEAD_DIR$/casper refers to the location of the casper folder in the shared folder structure; $HEAD_DIR refers to the name of the "head folder"; so that would map to, for example E:\Serva_Community_v4.4.0\Serva_repository\NWA_PXE\Zorin-OS-16-Core-64-bit-r1\casper
The kernel_bios and kernel_efi64 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 Zorin OS is /casper/vmlinuz and for openSUSE is /boot/x86_64/loader/linux
The append_bios and append_efi64 sections contain a reference to the location of the initrd 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 ElementaryOS and Linux Mint is initrd.lz; for openSUSE and Ubuntu is initrd; and for Zorin OS is initrd.lz4; so check you enter the correct filename in the corresponding ServaAsset.inf file
Note that the location of those files can also vary
The append_bios and append_efi64 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 NFSOPTS; this includes username/password for the share we created above, among other things
Booting up!
Once everything is in place, follow these steps:
Start Serva
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
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.
After a brief period of time, the booting PC should receive the booting instructions from Serva, and start loading first vmlinuz, and then initrd
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
That's it!!
Useful links
UEFI vs BIOS: What's the Difference?
Thanks for reading!