How to Install Ubuntu Server 18.04 over a Network - GraspingTech (2024)

This tutorial will show you how to create a PXE server and use it to install Ubuntu over a network. This is ideal if you want to install Ubuntu on a large number of computers at once.

Table of Contents

Introduction

In this guide, I will show you how to create a PXE server on Ubuntu 18.04 using Dnsmasq. The PXE server will hand out IP addresses using DHCP and will serve the Ubuntu netboot files over TFTP.

We will also configure a client to PXE boot and install Ubuntu over the network using the minimal amount of packages needed to start the system.

After installing Ubuntu on the client machine, any future packages will be downloaded from the internet.

Prerequisites

Before we begin, you will need toinstall Ubuntu Server 18.04,configure it with a static IPandinstall Dnsmasq. You will also need a client machine with PXE boot enabled in the BIOS.

If you don’t have the physical hardware required to perform the steps below, you can use a desktop virtualization program such asVMware Workstation*orVMware Fusion*to follow along.

In this tutorial, I’m using a MacBook Pro withVMware Fusion 11.5*to run two virtual machines, one for the PXE server, and the other as the client, which will have Ubuntu installed over the network.

Let’s begin.

Step 1: Install and Configure Dnsmasq

In this tutorial, I will use the following network settings, but you’ll want to change them to suit your environment:

-----------------------------------PXE Server-----------------------------------IP Address: 10.1.1.250DHCP Range: 10.1.1.11 to 10.1.1.249Gateway: 10.1.1.2Domain: example.labhostname: dnsmasq

Follow the steps inthis tutorial. to install Dnsmasq on Ubuntu. Once finished, you should have adnsmasq.conffile that looks like the following:Advertisem*nts

# Global settingsdomain-neededbogus-privno-resolvexpand-hostsfilterwin2k# Upstream nameserversserver=8.8.4.4server=8.8.8.8# domain namedomain=example.lablocal=/example.lab/listen-address=127.0.0.1listen-address=10.1.1.250# DHCP optionsdhcp-range=10.1.1.10,10.1.1.249,12hdhcp-lease-max=100dhcp-option=option:router,10.1.1.2dhcp-option=option:dns-server,10.1.1.250dhcp-option=option:netmask,255.255.255.0

Modify the network settings in the file to suit your environment.

Note:Since we are using the DHCP server built-in to Dnsmasq, you may need to disable any other DHCP server you have on your network.

Step 2: Enable TFTP Server and Download Ubuntu Netboot files

Add the following options to the file to enable the TFTP server:

enable-tftptftp-root=/srv/tftp

Download and extract the Ubuntu files to the tftp root directory by running the following commands:

cd /tmpwget http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/netboot.tar.gzsudo tar -xvzf netboot.tar.gz -C /srv/tftp/sudo chown -R nobody:nogroup /srv/tftp/

Step 3: Configure the DHCP Server to send the name of the boot image

Add the following option to thednsmasq.conffile to send the name of the image to boot.

dhcp-boot=pxelinux.0

Determine the MAC address of your client machine that you want to install Ubuntu on.

If you’re following along using VMware Fusion, it can be found by clickingSettings, then on theNetwork Adapterand thenAdvanced Settings.How to Install Ubuntu Server 18.04 over a Network - GraspingTech (1)

Now assuming your MAC address is00:50:56:39:87:7Aand you want to assign an IP address of10.1.1.21, add the following to thednsmasq.conffile:

dhcp-host=00:50:56:39:87:7A,10.1.1.21,ubuntu-net

Save the changes and restart dnsmasq with the following command to apply the changes:

sudo systemctl restart dnsmasq

Step 4: Power on Client and Test

Power on your client machine and it should boot using PXE. The DHCP server will assign it the fixed IP address specified in the previous step and then the client will download the Ubuntu boot image from the TFTP server.

The following screenshots show this in action on a VMware Fusion virtual machine.

How to Install Ubuntu Server 18.04 over a Network - GraspingTech (2)
How to Install Ubuntu Server 18.04 over a Network - GraspingTech (3)

Note:After clicking install, the screen will freeze for a minute as the files are transferred.

Now you can walk through the installation of Ubuntu as you would normally.

Conclusion

In this tutorial, we configured Dnsmasq on Ubuntu Server 18.04 to work as a DHCP, PXE and TFTP server. We setup a fixed IP for a client and tested booting the Ubuntu net installer over the network.

Next steps

After installing Ubuntu over the network, future packages will be downloaded from the internet. Depending on how many machines you have on the network, you might want to change it so that all files are downloaded over the local network. Another thing you might want to do, is use a Kickstart file to fully automate the installation.

How to Install Ubuntu Server 18.04 over a Network - GraspingTech (4)

David Miller

David Miller is a seasoned tech aficionado with a profound expertise in NGINX and Ubuntu. With a career spanning over a decade, David has honed his skills in optimizing web servers and enhancing server performance to perfection. His deep-rooted passion for open-source technologies has led him to become a go-to resource in the field. Whether it’s crafting intricate NGINX configurations or troubleshooting complex Ubuntu server issues, David’s problem-solving prowess shines through.

How to Install Ubuntu Server 18.04 over a Network - GraspingTech (2024)

FAQs

Can I install Ubuntu from network? ›

The network installer lets you install Ubuntu over a network. It includes the minimal set of packages needed to start and the rest of the packages are downloaded over the network. Since only current packages are downloaded, there is no need to upgrade packages immediately after installation.

How do I install Ubuntu 18.04 Server? ›

Be sure to change the boot order in the BIOS settings so that your installation media is first in Boot priority.
  1. Choose the Language. ...
  2. Select Keyboard Layout. ...
  3. Select Ubuntu or MAAS (Metal As A Service) ...
  4. Network Settings. ...
  5. Proxy Settings. ...
  6. Select network mirror. ...
  7. Hard Disk Setup. ...
  8. Choose hard disk to install to.

How to install Ubuntu from PXE server? ›

  1. Step 1: Installing the Required Packages. Begin by updating the package list and installing the necessary software: ...
  2. Step 2: Configuring the DHCP Server. ...
  3. Step 3: Preparing the TFTP Server. ...
  4. Step 4: Configuring the NFS Server. ...
  5. Step 5: Adding Boot Images.
Feb 2, 2024

How to install Linux OS over network? ›

How to Install OS Linux over Network
  1. Configure DHCP Server. If already have dhcp server add configuration for PXE on your conf and skip this step. ...
  2. Configure TFTP(Trivial File Transfer Protocol) Server. ...
  3. Configure HTTP server. ...
  4. Create PXE file for boot.
Jul 15, 2022

How do I access Ubuntu Server from outside network? ›

To do this, you need to port forward your router to have port 4321 on your router be redirected to port 4321 on your Ubuntu machine. First step is to determine your Ubuntu servers private IP address (can be found with the command ip a ).

How to setup local network Ubuntu? ›

To manually set your network settings:
  1. Open the Activities overview and start typing Settings.
  2. Click on Settings.
  3. If you plug in to the network with a cable, click Network. ...
  4. Click the. ...
  5. Select the IPv4 or IPv6 tab and change the Method to Manual.
  6. Type in the IP Address and Gateway, as well as the appropriate Netmask.

Is Ubuntu 18.04 still supported? ›

Ubuntu 18.04 LTS, installed by millions of users and continuing to have a massive footprint on AWS, hit its End of Life (EOL) in May 2023.

How to manually install Ubuntu server? ›

2.1 Installing Ubuntu Server
  1. Select your language and location.
  2. In "Network Configuration", choose your network card ( eth0 for the first network card). ...
  3. Enter your chosen "hostname".
  4. Enter the "username" and "password" for the system administrator. ...
  5. Set your time zone.

How to install Linux from PXE boot? ›

To Install the Linux Operating System From a PXE Server
  1. Power cycle the workstation.
  2. Hold down the F8 key until you see the BBS Popup menu. ...
  3. Select a Network: IBA GE Slot entry and press Enter. ...
  4. When prompted, press F12 for a network service boot. ...
  5. Select the image that you want to install.

How to install Ubuntu directly from the Internet? ›

Download Network Installer Image

Once you have downloaded the Ubuntu 20.04 Netboot ISO image, create a bootable media using Rufu tool or create a bootable USB drive using LiveUSB Creator called Unetbootin. Once you have a bootable installation media, you can proceed to start the installation.

What is PXE boot installation? ›

A Preboot Execution Environment(PXE) is a client-server interface that enables the computers in a network to be booted from the server. After preparing the target computers, the PC image in local and remote offices can be deployed for the PXE-enabled clients.

How do I boot my OS from a network? ›

Press F2 continuously when you power up your machine until it enters its BIOS Setup. Navigate to the Boot menu. Enable Boot to Network. Press F10 to save changes and exit the BIOS setup.

How to install Ubuntu without USB? ›

Download and install UNetbootin. Download the ISO for the Ubuntu version you want. Create a small partition (4 to 8 GB), preferably on a disk other than the new one if it is a rotating disk, but it could be that same new drive. Think of this as the installation disk that will get what is on the ISO image.

How to install Ubuntu from another computer? ›

Ubuntu can be installed on multiple computers at the same time using a process called network installation or network booting. This involves creating a bootable image of the operating system and copying it to a network server, from where it can be accessed by multiple computers.

Does installing Ubuntu require internet connection? ›

Once you've chosen one, click Continue. Next you will be asked to connect to wi-fi, this will allow Ubuntu to download updates and third party drivers (such as NVIDIA graphics drivers) during installation. Once you have connected to wi-fi (or chosen to proceed offline) then we can continue to the installation setup.

How to share Ubuntu on a network? ›

Share your personal files
  1. Open the Activities overview and start typing Sharing.
  2. Click on Sharing to open the panel.
  3. If the Sharing switch in the top-right of the window is set to off, switch it to on. ...
  4. Select Personal File Sharing.
  5. Switch the Personal File Sharing switch to on.

Can you install Ubuntu from within Windows? ›

Installing Ubuntu on a Windows computer is no different from dual-booting any operating system. In fact, it's easier than most, because Ubuntu is designed to be one of the most straight forward of Linux distributions, and it shows.

Top Articles
Latest Posts
Article information

Author: Lakeisha Bayer VM

Last Updated:

Views: 6573

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Lakeisha Bayer VM

Birthday: 1997-10-17

Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

Phone: +3571527672278

Job: Manufacturing Agent

Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.