Configuring PXE network boot server on Ubuntu 22.04 LTS (2023)

“PXE is a protocol used to boot operating systems over the network. You can use this method to install your favorite Linux distribution on your laptop, desktop or server via PXE over the network.

In this article, I'll show you how to set up Ubuntu 22.04 LTS as a PXE boot server and how to PXE boot Ubuntu Desktop 22.04 LTS Live Installer on a computer on the network so that you can install it without the need for a CD/DVD drive. . or USB stick. So let's start."

  1. network topology
  2. Configuring a static IP address on Ubuntu Server 22.04 LTS
  3. Configuring a Static IP Address in Ubuntu Desktop 22.04 LTS
  4. (Optional) Preparing Ubuntu Desktop 22.04 LTS to install a DNS server
  5. Creating the necessary directory structure
  6. Download iPXE source code and build iPXE on Ubuntu 22.04 LTS
  7. Copy compiled iPXE firmwares to /pxeboot/firmware directory
  8. Installing and Configuring a DHCP and TFTP Server on Ubuntu 22.04 LTS
  9. Installing and Configuring NFS Server on Ubuntu 22.04 LTS
  10. Configurando iPXE para PXE Boot Ubuntu Desktop 22.04 LTS Live Installer
  11. Arranque PXE Ubuntu Desktop 22.04 LTS Live Installer
  12. Configuring iPXE for PXE booting on other Linux distributions
  13. conclusion
  14. References

network topology

I will be setting up an Ubuntu 22.04 LTS machine (PXE boot server) as a PXE boot server using iPXE firmware. The PXE boot server will also function as a DHCP and TFTP server. They are required for PXE boot to work. Just to demonstrate how it all works, I'm going to show you how to configure the PXE boot server to boot the Ubuntu Desktop 22.04 LTS Live installer on a computer (PXE-client) so you can install Ubuntu Desktop 22.04 LTS on it without any CD/DVD drive or USB device.
Configuring PXE network boot server on Ubuntu 22.04 LTS (1)

Configuring a static IP address on Ubuntu Server 22.04 LTS

Before proceeding, it's best to configure the PXE boot server with a fixed/static IP address. In this section, I will show you how to configure a static/fixed IP address on Ubuntu Server 22.04 LTS.

To configure a fixed/static IP address on Ubuntu Server 22.04 LTS, open the netplan configuration file/etc/netplan/00-installer-config.yamlwith himnanotext editor as follows:

PSsudo nano /etc./red plan/00-installer-config.yaml

Configuring PXE network boot server on Ubuntu 22.04 LTS (2)

By default, DHCP is enabled for the network interface.ens33, as you can see in the screenshot below.

Configuring PXE network boot server on Ubuntu 22.04 LTS (3)

To set a static/fixed IP address192.168.0.130(What else/24netmask, gateway address192.168.0.1and DNS nameservers1.1.1.1 e 8.8.8.8), change the settings of theens33network interface as follows. Once finished, press<Ctrl> + Xfollowed byand and <Enter>to save the netplan configuration file.

Configuring PXE network boot server on Ubuntu 22.04 LTS (4)

To apply the changes, run the following command:

PSsudoapply network plan

Configuring PXE network boot server on Ubuntu 22.04 LTS (5)

A static/fixed IP address192.168.0.130 must be set to ens33network interface, as you can see in the screenshot below.

PSipone

Configuring PXE network boot server on Ubuntu 22.04 LTS (6)

It should also be able to resolve DNS names to IP addresses as you can see in the screenshot below.

PSwhistle -c3google.com

Configuring PXE network boot server on Ubuntu 22.04 LTS (7)

Configuring a Static IP Address in Ubuntu Desktop 22.04 LTS

Even if you're using Ubuntu Desktop 22.04 LTS instead of Ubuntu Server 22.04 LTS to set up a PXE boot server, it's still a good idea to set up a fixed/static IP address on your computer. In this section, I will show you how to configure a static/fixed IP address in Ubuntu Desktop 22.04 LTS.

To find the name of the currently active Network Manager connection, run the following command:

PSnmcli connection show

Configuring PXE network boot server on Ubuntu 22.04 LTS (8)

The name of the currently active Network Manager connection isWired connection 1.

Configuring PXE network boot server on Ubuntu 22.04 LTS (9)

To set a static/fixed IP address192.168.0.130(What else/24 network mask, input direction192.168.0.1and DNS nameservers1.1.1.1 e 8.8.8.8) for network manager connectionwired connection 1, run the following command:

PSmodifying nmcli connection"Wired connection 1"ipv4.método manual ipv4.addresses 192.168.0.130/24gw4 192.168.0.1 ipv4.dns 1.1.1.1,8.8.8.8

Configuring PXE network boot server on Ubuntu 22.04 LTS (10)

For the changes to take effect, run the following command:

PSactive nmcli connection"Wired connection 1"

Configuring PXE network boot server on Ubuntu 22.04 LTS (11)

A static/fixed IP address192.168.0.130must be set to theens33network interface, as you can see in the screenshot below.

PSipone

Configuring PXE network boot server on Ubuntu 22.04 LTS (12)

It should also be able to resolve DNS names to IP addresses as you can see in the screenshot below.

PSwhistle -c3google.com

Configuring PXE network boot server on Ubuntu 22.04 LTS (13)

(Optional) Preparing Ubuntu Desktop 22.04 LTS to install a DNS server

On Ubuntu Desktop 22.04 LTS, NetworkManager will run asystemd-resueltoservice that will act as a local DNS caching server. Thesystemd-resueltoservice uses theUDP port 53, the same asdnsmasq🇧🇷 So while theservice resolved by systemdIs running,dnsmasqdoes not work. If you are using Ubuntu Desktop 22.04 LTS to configure a PXE boot server, you must disable and stop thesystemd-resueltoservice before installing/running dnsmasq.

stop theservice resolved by systemd, run the following command:

PSsudosystemctl stop systemd-resuelto

Configuring PXE network boot server on Ubuntu 22.04 LTS (14)

Also, remove thesystemd-resueltoservice from system startup so that it is no longer automatically started at boot time.

PSsudosystemctl deshabilitar systemd-resuelto

Configuring PXE network boot server on Ubuntu 22.04 LTS (15)

Remove the symbolic link from/etc/resolv.conf filewith the following command:

PSsudo disconnect /etc./resolv.conf

Configuring PXE network boot server on Ubuntu 22.04 LTS (16)

create a new/etc/resolv.conf filewith himnanotext editor as follows:

PSsudo nano /etc./resolv.conf

Configuring PXE network boot server on Ubuntu 22.04 LTS (17)

(Video) Ubuntu autoinstall over PXE

Write the following lines in the/etc/resolv.conf file.

Once finished, press<Ctrl> + X followed by Y and <Enter>to save the/etc/resolv.conf file.

Configuring PXE network boot server on Ubuntu 22.04 LTS (18)

It should also be able to resolve DNS names to IP addresses again, as you can see in the screenshot below.

PSwhistle -c3google.com

Configuring PXE network boot server on Ubuntu 22.04 LTS (19)

Creating the necessary directory structure

In this section, I'll create all the necessary directories for PXE boot (using iPXE firmware) to work.

I planned the directory structure as follows:

/pxe boot

  • context/
  • firmware/
  • os-images/

Nodirectory /pxeboot/config/, I will store all iPXE boot configuration files.

No/pxeboot/firmware/ directory, I will store all iPXE bootable firmware files.

Nodirectory /pxeboot/os-images/, I'll create a separate subdirectory for each of the Linux distributions (which I want to PXE boot) and store the contents of the ISO images for those Linux distributions there. For example, to PXE boot Ubuntu Desktop 22.04 LTS, you can create a directoryubuntu-22.04-desktop-amd64/ in directory /pxeboot/os-images/and store the contents of the Ubuntu Desktop 22.04 LTS ISO image in that directory.

To create all necessary directory structures, run the following command:

PSsudo mkdir -pv /pxe boot/{config,firmware,os-images}

Configuring PXE network boot server on Ubuntu 22.04 LTS (20)

All directory structures required for PXE booting must be created.

Configuring PXE network boot server on Ubuntu 22.04 LTS (21)

Download iPXE source code and build iPXE on Ubuntu 22.04 LTS

In this section, I'll show you how to download the iPXE source code and compile it on Ubuntu 22.04 LTS so we can use it for PXE booting.

First, refresh the APT package repository cache with the following command:

PSsudoproper update

Configuring PXE network boot server on Ubuntu 22.04 LTS (22)

To install the necessary build dependencies for iPXE, run the following command:

PSsudofitinstall not pcbuild-essential liblzma-dev isolinuxgit

Configuring PXE network boot server on Ubuntu 22.04 LTS (23)

To confirm the installation, pressY and then press <Enter>.

Configuring PXE network boot server on Ubuntu 22.04 LTS (24)

All necessary packages will be downloaded from the Internet. It will take a while to complete.

Configuring PXE network boot server on Ubuntu 22.04 LTS (25)

Once the packages are downloaded, they will be installed one by one. It will take a few seconds to complete.

Configuring PXE network boot server on Ubuntu 22.04 LTS (26)

At this point, all required dependency packages should be installed.

Configuring PXE network boot server on Ubuntu 22.04 LTS (27)

Now navigate to the~/Downloadsdirectory as follows:

PSCD~/downloads

Configuring PXE network boot server on Ubuntu 22.04 LTS (28)

Clone the iPXE GitHub repository to your Ubuntu 22.04 LTS machine as follows:

PSclonehttps://github.com/ipxe/ipxe.git

Configuring PXE network boot server on Ubuntu 22.04 LTS (29)

The iPXE GitHub repository needs to be cloned.

Configuring PXE network boot server on Ubuntu 22.04 LTS (30)

a new directoryipxe/must be created in~/Downloadsdirectory, as you can see in the screenshot below.

PSls -lh

Configuring PXE network boot server on Ubuntu 22.04 LTS (31)

Navigate to theipxe/src/directory as follows:

PSCDipxe/origin

Configuring PXE network boot server on Ubuntu 22.04 LTS (32)

You should see many directories that contain the iPXE source code.

PSls -lh

Configuring PXE network boot server on Ubuntu 22.04 LTS (33)

To configure iPXE to boot automatically from an iPXE init script stored ondirectory /pxeboot/config/from your computer, you will need to create an iPXE init script and incorporate it into the iPXE firmware when compiling it.

Create an iPXE init scriptbootconfig.ipxe and open it with nanotext editor as follows:

PSnanobootconfig.ipxe

Configuring PXE network boot server on Ubuntu 22.04 LTS (34)

Write the following lines of code in thebootconfig.ipxe file.

(Video) How to configure PXE Network Boot Server for Ubuntu 18.04 Server

#!ipxe

dhcp

Cadena tftp://192.168.0.130/context/boot.ipxe

When finished, save the file by pressing<Ctrl> + X followed by Y and <Enter>.

Configuring PXE network boot server on Ubuntu 22.04 LTS (35)

TO USE: Here,192.168.0.130is the IP address of my Ubuntu 22.04 LTS machine that I am configuring as a PXE boot server (PXE boot server🇧🇷 It will be different for you.

Configuring PXE network boot server on Ubuntu 22.04 LTS (36)

To compile iPXE BIOS and UEFI firmware and embed thebootconfig.ipxe iPXE boot scripton compiled firmwares, run the following command:

PSDoescompartment/ipxe.pxe container/undioly.kpxe bin/undioly.kkpxe bin/undioly.kkkpxe bin-x86_64-efi/ipxe.efiEMBEDDED=bootconfig.ipxe

Configuring PXE network boot server on Ubuntu 22.04 LTS (37)

iPXE boot firmware files are being compiled for BIOS and UEFI systems. It will take a few seconds to complete.

Configuring PXE network boot server on Ubuntu 22.04 LTS (38)

iPXE boot firmware files for BIOS and UEFI systems are being compiled...

Configuring PXE network boot server on Ubuntu 22.04 LTS (39)

iPXE boot firmware files for BIOS and UEFI systems are compiled at this point.

Configuring PXE network boot server on Ubuntu 22.04 LTS (40)

Copy compiled iPXE firmwares to /pxeboot/firmware directory

After the iPXE boot firmware files are compiled, copy them to the/pxeboot/firmware directoryof your Ubuntu 22.04 LTS PXE boot server so that PXE client computers can access them via TFTP.

PSsudo c.p. -vcompartment/{ipxe.pxe,undionly.kpxe,undionly.kkpxe,undionly.kkkpxe}bin-x86_64-efi/ipxe.efi/pxe boot/firmware/

Configuring PXE network boot server on Ubuntu 22.04 LTS (41)

The iPXE boot firmware files must be copied to the/pxeboot/firmware directory.

Configuring PXE network boot server on Ubuntu 22.04 LTS (42)

Once the iPXE boot firmware files are copied to the/pxeboot/firmware directory, the directory structure of the/pxeboot directoryshould look like shown in the screenshot below.

Here the iPXE boot firmware filesipxe.pxe, undioly.kpxe, undioly.kkpxe e undioly.kkkpxethey are for PXE booting on BIOS systems. The iPXE boot firmware fileipxe.efi is for PXE booting on UEFI systems.

Configuring PXE network boot server on Ubuntu 22.04 LTS (43)

For more information on iPXE boot firmware files, read theiPXE Compilation for BIOS Based Motherboards and iPXE Compilation for UEFI Based Motherboards from ArticleHow to Configure Synology NAS as PXE Boot Server to Boot Linux Installation Images Over Network with iPXE (BIOS and UEFI Version) em linuxhint. com.

Installing and Configuring a DHCP and TFTP Server on Ubuntu 22.04 LTS

For PXE boot to work, you will need a working DHCP and TFTP server on your computer. There are many DHCP and TFTP server software. But in this article I will usednsmasq. dnsmasqit is primarily a DNS and DHCP server that can also be configured as a TFTP server.

No Ubuntu 22.04 LTS,dnsmasqit is not installed by default. But it is available in Ubuntu 22.04 official package repository and you can install it with APT package manager very easily.

installdnsmasqon Ubuntu 22.04 LTS run the following command:

PSsudofitinstall not pcdnsmasq-y

Configuring PXE network boot server on Ubuntu 22.04 LTS (44)

dnsmasq must be installed.

Configuring PXE network boot server on Ubuntu 22.04 LTS (45)

Let's create a new dnsmasq. Then, rename the original./etc/dnsmasq.conf file to /etc/dnsmasq.conf.backupAs follows:

PSsudo m.v. -v /etc./dnsmasq.conf/etc./dnsmasq.conf.backup

Configuring PXE network boot server on Ubuntu 22.04 LTS (46)

Create an empty dnsmasq configuration file/etc/dnsmasq.confwith the following command:

PSsudo nano /etc./dnsmasq.conf

Configuring PXE network boot server on Ubuntu 22.04 LTS (47)

Write the following lines in the dnsmasq configuration file/etc/dnsmasq.conf:

Interface=ens33

interfaces de enlace

domain=linuxhint.local

dhcp-rango=ens38,192.168.0.180,192.168.0.200,255.255.255.0,8h

dhcp-option=option:router,192.168.0.1

dhcp-option=option:dns-server,1.1.1.1

dhcp-option=option:dns-server,8.8.8.8

habilitar-tftp

tftp-root=/pxe boot

# boot configuration for BIOS systems

dhcp-match=set:bios-x86,option:client-arch,0

dhcp-boot=etiqueta:bios-x86,firmware/ipxe.pxe

# boot configuration for UEFI systems

dhcp-match=set:efi-x86_64,option:client-arch,7

dhcp-match=set:efi-x86_64,option:client-arch,9

dhcp-boot=etiqueta:efi-x86_64,firmware/ipxe.efi

The final configuration file should look like the following screenshot.

(Video) complete pxe boot server tutorial Ubuntu 16 2018 | network booting | PXE Server Setup

To save the dnsmasq configuration file/etc/dnsmasq.conf, press<Ctrl> + X followed by Y and <Enter>.

Configuring PXE network boot server on Ubuntu 22.04 LTS (48)

Here,ens33is the name of the network interface for which DHCP¹ is enabled.

I configured the DHCP server to assign IP addresses in the range192.168.0.180-192.168.0.200on PXE boot clients. Thethe router/gateway address is 192.168.0.1🇧🇷 DNS servers are1.1.1.1 e 8.8.8.82.

TO USE: If you don't know the network interface name of your Ubuntu 22.04 LTS machine, you can run theipa command to discover.

Configuring PXE network boot server on Ubuntu 22.04 LTS (49)

These 2 sections are used to detect whether a PXE client is BIOS or UEFI based.

If a PXE client is BIOS-based, the DHCP server serves the iPXE firmware file/pxeboot/firmware/ipxe.pxe¹.

If a PXE client is UEFI based, the DHCP server serves the iPXE firmware file/pxeboot/firmware/ipxe.efi².

Configuring PXE network boot server on Ubuntu 22.04 LTS (50)

For the changes to take effect, restart thednsmasqserver as follows:

PSsudosystemctl reiniciar dnsmasq

Configuring PXE network boot server on Ubuntu 22.04 LTS (51)

To check if thednsmasqthe service isrun, run the following command:

PSsudosystemctl status dnsmasq

Configuring PXE network boot server on Ubuntu 22.04 LTS (52)

As you can see, thednsmasq service is running🇧🇷 So it's configured correctly.

Configuring PXE network boot server on Ubuntu 22.04 LTS (53)

Installing and Configuring NFS Server on Ubuntu 22.04 LTS

Usos do Ubuntu Desktop 22.04 LTSCasperto start the live installation mode.Casperit only supports PXE boot over NFS protocol. Other Linux distributions like Fedora, CentOS/RHEL also support PXE boot via NFS protocol. Therefore, to boot Ubuntu Desktop 22.04 LTS and many other Linux distributions via PXE, you must have a fully functional NFS server accessible over the network.

To install NFS server on Ubuntu 22.04 LTS, run the following command:

PSsudofitinstall not pcNFS-kernel-servidor

Configuring PXE network boot server on Ubuntu 22.04 LTS (54)

To confirm the installation, pressY and then press <Enter>.

Configuring PXE network boot server on Ubuntu 22.04 LTS (55)

The NFS server must be installed.

Configuring PXE network boot server on Ubuntu 22.04 LTS (56)

Open the NFS server configuration file/etc/exportsAs follows:

PSsudo nano /etc./export

Configuring PXE network boot server on Ubuntu 22.04 LTS (57)

to share the/pxeboot directoryvia NFS, add the following line to the end of the /etc/exports file:

/pxe boot*(Ro,synchronize,no_wdelay,insecure_locks,no_root_squash,insecure,no_subtree_check)

Once finished, press<Ctrl> + X followed by Y and <Enter>to save the NFS configuration file/etc/exports.

Configuring PXE network boot server on Ubuntu 22.04 LTS (58)

To make the new NFS share/pxeboot available, run the following command:

PSsudoexportfs-do

Configuring PXE network boot server on Ubuntu 22.04 LTS (59)

Configurando iPXE para PXE Boot Ubuntu Desktop 22.04 LTS Live Installer

In this section, I'll show you how to configure iPXE on your Ubuntu 22.04 LTS PXE boot server to PXE boot Ubuntu Desktop 22.04 LTS Live Installer on other computers (PXE clients).

TO USE: If you want to configure iPXE on your Ubuntu 22.04 LTS PXE boot server to boot other Linux distributions via PXE, you will need to make the necessary changes. This shouldn't be too difficult.

First, navigate to the~/Downloadsdirectory of your Ubuntu 22.04 LTS PXE boot server as follows:

Configuring PXE network boot server on Ubuntu 22.04 LTS (60)

To download the Ubuntu Desktop 22.04 LTS ISO image from the official Ubuntu website, run the following command:

PSwgethttps://releases.ubuntu.com/jam/ubuntu-22.04-desktop-amd64.iso

Configuring PXE network boot server on Ubuntu 22.04 LTS (61)

Ubuntu Desktop 22.04 LTS ISO image is being downloaded. It will take a while to complete. I already downloaded. So I won't waste my time re-downloading here.

Configuring PXE network boot server on Ubuntu 22.04 LTS (62)

Once Ubuntu Desktop 22.04 LTS ISO image fileubuntu-22.04-desktop-amd64.isois downloaded, you must find it in~/Downloadsdirectory of your PXE boot server.

Configuring PXE network boot server on Ubuntu 22.04 LTS (63)

Mount Ubuntu Desktop 22.04 LTS ISO fileubuntu-22.04-desktop-amd64.isono/mntdirectory as follows:

PSsudo Mount -oties ~/downloads/ubuntu-22.04-desktop-amd64.iso/mnt

Configuring PXE network boot server on Ubuntu 22.04 LTS (64)

Create a dedicated directoryubuntu-22.04-desktop-amd64/to store the contents of the Ubuntu Desktop 22.04 LTS ISO image on thedirectory /pxeboot/os-images/As follows:

PSsudo mkdir -pv /pxe boot/os-images/ubuntu-22.04-desktop-amd64

Configuring PXE network boot server on Ubuntu 22.04 LTS (65)

To copy the contents of the Ubuntu Desktop 22.04 LTS ISO image to the/pxeboot/os-images/ubuntu-22.04-desktop-amd64/directory withsynchronize, run the following command:

PSsudosynchronize- avz /mnt/ /pxe boot/os-images/ubuntu-22.04-desktop-amd64/

(Video) aioboot - pxe server - how to install ubuntu os (step by step)

Configuring PXE network boot server on Ubuntu 22.04 LTS (66)

TO USE: If you don't havesynchronizeinstalled on Ubuntu 22.04 LTS and need help installingsynchronizeon Ubuntu 22.04 LTS read the articleHow to Use the rsync Command to Copy Files in Ubuntu.

The contents of the Ubuntu Desktop 22.04 LTS ISO image is being copied to thedirectory /pxeboot/os-images/ubuntu-22.04-desktop-amd64/🇧🇷 It will take a while to complete.

Configuring PXE network boot server on Ubuntu 22.04 LTS (67)

At this point, the contents of the Ubuntu Desktop 22.04 LTS ISO image must be copied to the/pxeboot/os-images/ubuntu-22.04-desktop-amd64/ directory.

Configuring PXE network boot server on Ubuntu 22.04 LTS (68)

Unmount Ubuntu Desktop 22.04 LTS ISO image from/mnt directoryAs follows:

PSsudo disassemble /mnt

Configuring PXE network boot server on Ubuntu 22.04 LTS (69)

You can also remove theUbuntu Desktop 22.04 LTS Imagen ISO ubuntu-22.04-desktop-amd64.isofrom the PXE boot server, if desired.

PSrm -v~/downloads/ubuntu-22.04-desktop-amd64.iso

Configuring PXE network boot server on Ubuntu 22.04 LTS (70)

Now create default iPXE boot configuration file/pxeboot/config/boot.ipxeand open it withnanotext editor as follows:

PSsudo nano /pxe boot/context/boot.ipxe

Configuring PXE network boot server on Ubuntu 22.04 LTS (71)

Write the following lines in the iPXE boot configuration file/pxeboot/config/boot.ipxe:

#!ipxe

to establishservidor_ip 192.168.0.130

to establishroot_path/pxe boot

menu Select an operating system to boot

free item-22.04-desktop-amd64 Install Ubuntu desktop22.04LTS

choose--failure salida --time's up 10000option&&e${option}

:ubuntu-22.04-desktop-amd64

to establishos_root free-22.04-desktop-amd64

kernel tftp://${servidor_ip}/${operating_system_root}/Casper/vmlinuz

initrd tftp://${servidor_ip}/${operating_system_root}/Casper/initrd

imgargsvmlinuzinitrd=initrdthrow away=casper maybe-ubiquitynetwork boot=nfsip=dhcpnfsroot=${servidor_ip}:${root_path}/${operating_system_root}calm splash---

throw away

Once finished, press<Ctrl> + X followed by Y and <Enter>to save the iPXE boot configuration file/pxeboot/config/boot.ipxe.

Configuring PXE network boot server on Ubuntu 22.04 LTS (72)

Here,IP do servidoris the ip address of Ubuntu 22.04 LTS PXE bootserver¹, youroot_pathis the NFS² shared path.

ubuntu-22.04-desktop-amd64is the label of the start menu entryInstale o Ubuntu Desktop 22.04 LTSand startup codes forArranque PXE Ubuntu Desktop 22.04 LTSthey are also labeled with the same name³.

os_rootis the name of the subdirectory indirectory /pxeboot/os-images/where you copied the contents of the Ubuntu Desktop 22.04 LTS ISO⁴ image.

Configuring PXE network boot server on Ubuntu 22.04 LTS (73)

Arranque PXE Ubuntu Desktop 22.04 LTS Live Installer

Now boot any computer on the network via PXE and you will see that the iPXE firmware is being used for the PXE boot process.

Configuring PXE network boot server on Ubuntu 22.04 LTS (74)

Once the iPXE firmware has booted, you should see the following boot menu.

selectInstall or Ubuntu Desktop 22.04 LTS and press <Enter>.

Configuring PXE network boot server on Ubuntu 22.04 LTS (75)

You should see that iPXE is downloading thevmlinuz is initrdPXE boot server files.

Configuring PXE network boot server on Ubuntu 22.04 LTS (76)

Ubuntu Desktop 22.04 LTS installer is starting...

Configuring PXE network boot server on Ubuntu 22.04 LTS (77)

Once the Ubuntu Desktop 22.04 LTS installer has started, you should see the following window. You can install Ubuntu Desktop 22.04 LTS on your computer normally from here. If you need help installing Ubuntu Desktop 22.04 LTS on your computer, read the articleInstalling Ubuntu Desktop 20.04 LTS🇧🇷 Although the article is for Ubuntu Desktop 20.04 LTS, it may still be helpful.

Configuring PXE network boot server on Ubuntu 22.04 LTS (78)

If you want to try Ubuntu Desktop 22.04 LTS in Live mode, click onTry Ubuntu.

Configuring PXE network boot server on Ubuntu 22.04 LTS (79)

Ubuntu Desktop 22.04 LTS should boot with PXE in live mode.

Configuring PXE network boot server on Ubuntu 22.04 LTS (80)

Configuring iPXE for PXE booting on other Linux distributions

Likewise, you can configure iPXE and PXE boot server to boot other Linux distributions. Simply create a new directory for your desired Linux distribution indirectory /pxeboot/os-images/and copy the necessary files from the ISO image of your desired Linux distribution into the newly created directory. Then add a new menu entry and boot code for the desired Linux distribution to the iPXE boot configuration file./pxeboot/config/boot.ipxe.

Adding a New Menu Entry and Boot Code to the iPXE Boot Configuration File/pxeboot/config/boot.ipxetoo easy

Just open the iPXE boot configuration file/pxeboot/config/boot.ipxewith himnanotext editor as follows:

PSsudo nano /pxe boot/context/boot.ipxe

Configuring PXE network boot server on Ubuntu 22.04 LTS (81)

Then add a new menu entry and the required initialization code as shown in the screenshot below.

Once finished, press<Ctrl> + X followed by Y and <Enter>to save the/pxeboot/config/boot.ipxe file.

Configuring PXE network boot server on Ubuntu 22.04 LTS (82)

Now, if you PXE boot other computers on the network, you will see a new menu entry for your desired Linux distribution and you can boot from there.

Configuring PXE network boot server on Ubuntu 22.04 LTS (83)

(Video) Setting up an UEFI PXE server on Linux (Part 1)

If you need help configuring iPXE boot to PXE on the following Linux distributions, read the articleHow to Configure Synology NAS as PXE Boot Server to Boot Linux Installation Images Over Network with iPXE (BIOS and UEFI Version)em Linux Hint. com.

  • Ubuntu Desktop 20.04 LTS
  • Ubuntu Server 20.04 LTS
  • Ubuntu Server 22.04 LTS
  • Fedora 36 workstation

conclusion

In this article, I showed you how to configure Ubuntu 22.04 LTS as a PXE boot server with iPXE. I also showed you how to configure the PXE boot server to boot the Ubuntu Desktop 22.04 LTS installer from PXE in live mode so that you can install it on your computer without the need for a CD/DVD drive or USB stick.

References

  1. network plan | Backend independent network configuration in YAML
  2. Chapter 36. Manual Configuration of the /etc/resolv.conf File Red Hat Enterprise Linux 8 | Red Hat Customer Portal
  3. network: problem with DnsMasq, DHCP proxy, PXE for UEFI clients: server failure
  4. dnsmasq.conf.pxe.uefi · GitHub

FAQs

How to configure PXE boot server in Linux step by step? ›

  1. Step 1: Assign static IP address to PXE Boot Server. ...
  2. Step 2: Install FTP server and copy OS CD / DVD content to FTP path. ...
  3. Step 3: Install and configure httpd / Apache / Web server. ...
  4. Step 4: Generate unattended configuration file. ...
  5. Step 5: Install and configure tftp Server and DHCP server.
Mar 20, 2016

Why is PXE boot not working? ›

If the DHCP server or the WDS/PXE-enabled DP isn't on the same subnet or VLAN as the client computer, they won't see or hear the PXE request broadcast from the client. Therefore, the servers won't respond to the PXE request.

How do I enable PXE boot server? ›

Steps to enable PXE boot in BIOS.
...
Environment
  1. Press F2 during boot to enter BIOS setup.
  2. Go to Advanced Settings > Boot Menu.
  3. Select Boot Configuration and uncheck Boot Network Devices Last.
  4. From the Boot Configuration menu, go to Network Boot and enable UEFI PCE & iSCSI.
  5. Select either Ethernet1 Boot or Ethernet2 Boot.

Do you need a DHCP server to PXE boot? ›

The PXE service requires a DHCP server configured to provide boot server, or the TFTP PXE server, information and any specific start-up instructions required for the target board.

How to set up PXE boot in Ubuntu? ›

PXE Booting Ubuntu Desktop 22.04 LTS Live Installer

Now, boot any computer on the network via PXE, and you should see that the iPXE firmware is being used for the PXE boot process. Once the iPXE firmware is initialized, you should see the following boot menu. Select Install Ubuntu Desktop 22.04 LTS and press <Enter>.

What ports are needed for PXE boot? ›

PXE uses DHCP ports and TFTP to download the binary files. For TFTP and DHCP, you need to enable ports 67, 69, and 4011. The TFTP and multicast servers use ports in the range 64001 through 65000 by default.

How do I know if PXE boot is enabled? ›

Test whether the device can start when it's plugged into a switch on the same subnet as the PXE-enabled DP. If it can, the issue likely involves the router configuration. Make sure that the DHCP (67 and 68), TFTP (69), and BINL (4011) ports are open between the client computer, the DHCP server, and the PXE DP.

What is UEFI PXE booting? ›

UEFI PXE Boot Configuration. PXE is used to execute an operating system's bootstrap program using a network connection. The PXE Client sends a DHCP request with PXE specific options. The DHCP server response contains the Network Bootstrap Program (NBP) filename and a list of TFTP boot servers.

Is PXE boot enabled by default? ›

Disabling PXE boot

PXE is enabled by default on all computers. However, it can also be disabled. The disabling procedure varies by vendor. But in general, PXE can only be disabled from the BIOS (Basic Input Output System) interface.

How to set up PXE boot for UEFI hardware? ›

From the System Utilities screen, select System Configuration > BIOS/Platform Configuration (RBSU) > Network Options > Network Boot Options > UEFI PXE Boot Policy and press Enter. Select a setting and press Enter.

How do you initiate a PXE boot? ›

Enabling a PXE device:
  1. During startup, press and hold or continuously press F2 to enter the BIOS Setup Utility screen.
  2. Select PXE Device Enable, press Enter, and select Enable from the displayed dialog box. Press Enter to confirm your selection, and press F10 to save the settings and exit.

How does PXE boot work in Linux? ›

About PXE Booting and Kickstart Technology
  1. Target Machine (either bare metal or with boot sector removed) is booted.
  2. The Network Interface Card (NIC) of the machine triggers a DHCP request.
  3. DHCP server intercepts the request and responds with standard information (IP, subnet mask, gateway, DNS etc.).

What happens if there is no DHCP server? ›

If the device does not receive an IP address, which happens when there is no DHCP server on the network or when the DHCP server is not responding, the device assigns itself an address. Auto IP addresses always follow this pattern: 169.254. x.y, where x and y are any two numbers between 0 and 255.

What would happen if you don't have a DHCP server installed? ›

Dynamic Host Configuration Protocol (DHCP) is a core network service that makes it easy to manage the TCP/IP settings of the computers on your network. Without DHCP, you'd need to go to each computer and manually assign it an IP address, subnet mask, default gateway and other network settings.

What DHCP options are needed for PXE boot? ›

In the PXE booting process, after the client receives the PXE answer it needs to go to the next step, which is to download a boot environment. This is where DHCP options 66 and 67 come in. Option 66 tells the PXE booted client what the Boot server IP is and option 67 is the Boot file that needs to be loaded.

Can you PXE boot a server? ›

Preboot Execution Environment (PXE) Boot Server. A Preboot Execution Environment(PXE) is a client-server interface that allows computers in a network to be booted from the server before deploying the obtained PC image in local and remote offices, for PXE-enabled clients.

How do I setup a network device on Linux? ›

If you are working with a Linux system using a GUI, you can configure the network interface via an icon in the far upper right of the screen. The function of this icon is very similar to the windows “TV Set” down in the lower right of the screen in the taskbar of a Windows desktop system.

What is PXE boot configuration? ›

PXE is an industry standard created by Intel that provides pre-boot services within the devices firmware that enables devices to download network boot programs to client computers. Configuration Manager relies on the Windows Deployment Services (WDS) server role via the WDS PXE provider.

Videos

1. How to configure PXE Network Boot Server for Ubuntu 18.04 Desktop
(Heikki Koivisto)
2. autoinstall Ubuntu desktop over network
(Heikki Koivisto)
3. Netboot PXE Ubuntu 20.04
(Pascal Noisette)
4. Install Ubuntu 16.04 via PXE and network boot
(theurbanpenguin)
5. Install TFTP Server on Ubuntu 20.04 Server, configuration and testing
(Hitoriki Batosai)
6. UEFI PXE | HTTP and NFS | Live Booting Ubuntu Over LAN (Part 2)
(ALSETEMA)
Top Articles
Latest Posts
Article information

Author: Cheryll Lueilwitz

Last Updated: 11/19/2022

Views: 5664

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Cheryll Lueilwitz

Birthday: 1997-12-23

Address: 4653 O'Kon Hill, Lake Juanstad, AR 65469

Phone: +494124489301

Job: Marketing Representative

Hobby: Reading, Ice skating, Foraging, BASE jumping, Hiking, Skateboarding, Kayaking

Introduction: My name is Cheryll Lueilwitz, I am a sparkling, clean, super, lucky, joyous, outstanding, lucky person who loves writing and wants to share my knowledge and understanding with you.