How To: Boot Ubuntu 20.04 LTS Over Network PXE Using SERVA on Windows 7/8/10
Step by step tutorial how to boot and install Ubuntu 20.04 LTS over the network with PXE Server from other host machine running Windows 10. The software used is SERVA Community Edition.
One day I was having trouble finding an empty USB stick to install the Ubuntu operating system to my friend’s laptop. I was in a hurry with no stick and a computer that had no DVD drive, the only possible solution left was booting the Ubuntu Desktop 20.04 LTS via network PXE from my Windows 10 laptop.
I successfully configured a PXE server with a free community version of SERVA software on my Windows 10 laptop (host). The boot and installation of Ubuntu Desktop on the other laptop (client) went smoothly. For the server version of Ubuntu, the procedure is the same.
So here it goes …
- Both host and client computers must be connected to the same network.
The easiest way to achieve this is to use your existing local network. So your existing (WiFi) router assigns the IP addresses, and Serva software is configured as DHCP Proxy.
The host machine where Serva is installed could be connected via WiFi. Although the wired connection is recommended. It’s faster. The client, however, must be connected via ethernet cable to the router. Obviously, it cannot connect to the WiFi before and during boot.
- Ubuntu ISO image
Head over to the official Ubuntu website and download the ubuntu-20.04-desktop-amd64.iso file. If you need a server version, just download that one, the procedure is the same.
- SERVA Free Comunity Edition
This is a fully working free version of PXE Server software for Windows. This is for non-commercial use only, please buy a license if you use it in a professional manner. Download it from here. At the time of writing, it’s the Serva_Community_v3.2.0.
Step By Step Tutorial
Serva: Extract files
You need to extract the Serva .zip file. It doesn’t matter where. You may create a new folder named “serva” on the Desktop and extract the .zip file into it.
Serva: Create root folder
Create a root folder for Serva. The name and the location don’t matter, as you will point to it in the Serva settings in the next steps. For example, let’s create a folder directly on a C: drive, called “serva_root“.
Serva: Run Serva
Run Serva64.exe (or Serva32.exe if you are on a 32-bit OS like Windows 7 32-bit). Wait for the countdown counter and click “I’m a “Community” user”. If your Windows Firewall is enabled, you get a warning. You need to ALLOW it. If you use some other 3rd party Firewall, you need to Allow Serva to access through it. Or you may just disable it for now.
Click on the icon on the top left corner and go to “Settings”.
Serva: TFTP Settings
Tick the TFTP Server box and make sure you set the Root directory to C:\serva_root folder, created previously. Leave the rest as default.
Serva: DHCP Settings
Move to the DHCP tab and tick proxyDHCP and BINL box. Leave the rest as default.
Serva: Quit and Re-run
Click OK, close Serva, and re-run it again. This is a must because only when Serva starts it generates all the necessary folders in the root folder. So if you make any changes to the folders under C:\serva_root, then you should always quit and re-run the application before a PXE boot.
Ubuntu ISO: Copy the Content
Inside the C:\serva_root\NWA_PXE create new folder ubuntu and copy all the content from the disk image ubuntu-20.04-desktop-amd64.iso into it. You can mount the .iso file with Windows Explorer (right-click on the file and select “Open With -> Windows Explorer). Or with any other tool.
Inside the C:\serva_root\NWA_PXE\ubuntu folder, create a new Text Document and paste the following text:
[PXESERVA_MENU_ENTRY]asset = Ubuntu LTS 20.04 Desktop Live
platform = amd64
kernel_bios = /NWA_PXE/$HEAD_DIR$/casper/vmlinuz
append_bios = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/casper/initrd boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE_SHARE/$HEAD_DIR$ NFSOPTS=-ouser=serva,pass=avres,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 boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE_SHARE/$HEAD_DIR$ NFSOPTS=-ouser=serva,pass=avres,sec=ntlm,vers=1.0,ro ip=dhcp ro ipv6.disable=1
Save and close the text editor and rename the file to ServaAsset.inf
Be cautious to rename the file extension properly from .txt to .inf. Many times people wrongly rename the files to something like ServaAsset.inf.txt 🙂
File: INITRD_N11.2.4.GZ Go to https://www.vercot.com/~serva/an/NonWindowsPXE3.html and scroll down to section 3.6 Ubuntu and download the file INITRD_N11.2.4.GZ (or click here, to direct link to file). This is an initial ramdisk, required for a Ubuntu to boot properly.
Copy (don’t extract) the INITRD_N11.2.4.GZ file to C:\serva_root\NWA_PXE\ubuntu\casper folder.
This step is not needed anymore.
Windows: Create Username
Next thing is to create a username called serva with password avres. Click Start and write “cmd” and run Command Prompt as Administrator (right-click -> Run as administrator).
Type the following:
net user serva avres /ADD
Windows: Share NWA_PXE folder
Right-click on NWA_PXE folder inside C:\serva_root and click Properties. Go to the Sharing tab and click Advanced Sharing… . Tick Share this folder, set the Share name to NWA_PXE_SHARE and click “OK” two times.
Windows: Enable SMBv1/CIFS
SMBv1/CIFS is not installed by default in Windows 10 Fall Creators Update version 1709 and up. You need to enable it.
Go to Control Panel -> Programs, click on “Turn Windows features on or off“. Tick the SMB 1.0/CIFS File Sharing Support box, click OK and restart the computer.
Run Serva. After the countdown, you are all ready to go. Serva now listens to requests from the local network.
You may see something more in the log, that’s if Serva makes some changes when it starts. Nothing important.
You are now ready to boot up the client machine. Make sure you enable boot up from network in the BIOS and place it to the first place in the boot order.
If you don’t know how to do it, check the manual of your motherboard or laptop. I can’t tell precisely as every motherboard, or a laptop computer has different settings and menus in BIOS.
If all goes well, the Ubuntu system boots up an from there, you are on your own. 🙂
I hope this guide helps some of you. If you have any questions or a suggestion, drop a comment below.