How to Install Ubuntu via PXE Server Using Local DVD Sources

PXE or Preboot eXecution Environment is a server-client mechanism which instructs a client machine to boot form network.

In this guide we’ll show how to install Ubuntu Server via a PXE server with local HTTP sources mirrored from Ubuntu server ISO image via Apache web server. The PXE server used in this tutorial is Dnsmasq Server.

3. Also, after you’ve finished editing the dnsmasq configuration file, create the directory for the PXE netboot files by issuing the below command and restart dnsmasq daemon to apply changes. Check dnsmasq service status to see if it has been started.

9. Next, open HTTP port in firewall and navigate to your machine IP address via a browser (http://192.168.1.14/ubuntu) in order to test if you can reach sources via HTTP protocol.

# ufw allow http

Check HTTP Ubuntu Sources

Step 4: Setup PXE Server Configuration File

10. In order to be able to pivot the rootfs via PXE and local sources, Ubuntu needs to be instructed via a preseed file. Create the following local-sources.seed file in your web server document root path with the following content.

Here, make sure you replace the IP address accordingly. It should be the IP address where web resources are located. In this guide the web sources, the PXE server and TFTP server are hosted on the same system. In a crowded network you might want to run PXE, TFTP and web services on separate machines in order to improve PXE network speed.

Step 6: Install Ubuntu with Local Sources via PXE

16. To install Ubuntu server via PXE and use the local network installation sources, reboot your machine client, instruct the BIOS to boot from network and at the first PXE menu screen choose the first option as illustrated in the below images.

Select Network Boot

Select PXE Boot Option

Install Ubuntu using PXE

17. The installation procedure should be performed as usual. When the installer reaches the Ubuntu archive mirror country setup, use the up keyboard arrow to move to the first option, which says: enter information manually.

Select Ubuntu Mirror Archive

18. Press [enter] key to update this option, delete the mirror string and add the IP address of the web server mirror sources and press enter to continue as illustrated in the below image.

http://192.168.1.14

Enter Ubuntu Mirror Archive Hostname

19. On the next screen, add your mirror archive directory as shown below and press enter key to continue with the installation process and usually.

/ubuntu

Select Ubuntu Mirror Archive Directory

20. In case you want to see information about what packages are downloaded from your network local mirror, press [CTRL+ALT+F2] keys in order to change machine virtual console and issue the following command.

# tail –f /var/log/syslog

Check Network Mirror Logs

21. After the installation of the Ubuntu server finishes, login to the newly installed system and run the following command with root privileges in order to update the repositories packages from local network sources to official Ubuntu mirrors.

The mirrors needs to be changed in order to update the system using the internet repositories.

Assure you replace the IP address according to the IP address of your own web local sources.

Official Ubuntu Network Sources

That’s all! You can now update your Ubuntu server system and install all required software. Installing Ubuntu via PXE and a local network source mirror can improve the installation speed and can save internet bandwidth and costs in case of deploying a large number of servers in a short period of time at your premises.

I am using your tutorial to made a pxe server but I found something really confusing as you download the server ISO and mount the desktop ISO how these possible,I am bit confuse about it, please provide me the solution for these.

You are over reacting. I want to say that is very important to write from the beginning what are minimal conditions to use this setup. And I think first at the blocking conditions (like PXE bugs, BIOS bugs

Also it would be very useful for your readers (me included here), to show some use case like this: this tutorial can be use if you have a lab network when you need to install/reinstall for many times the ubuntu OS.

And the last thing, if I want to install a new Ubuntu OS, I use Clonezilla or Urbackup who are faster and simple compared with PXE.

Why I should install Ubuntu/whatever via PXE? And if my host can not use PXE (some mother boards have bugs related with pxe). And if I already have a dhcp in use ? I am sure that you need to put this observations on the required things.