Now, you are allowed to boot over a network through multiple devices without having the physical presence of boot media like hard drives or USB sticks. Yes, this is practical in the current era of the usage of a network boot server.

 

This setup is ideal for businesses that need to manage their large networks,  simplify their automated deployments, or create diskless workstations. 

 

Therefore, in this blog post, we will enlighten you with the concept of how to setup Network Boot Debian Linux Server using the PXE (Preboot Execution Environment). 

 

Prerequisites To Setup Network Boot Debian Linux Server

 

To Setup Network boot Debian Linux server, let’s know the prerequisites that you need to have to begin the process. Here is the list:-

 

A Debian Server: 

 

You need to have a machine that can run on Debian Linux to act as the PXE server.

 

Network Configuration: 

 

You are also required to have a local network configured with DHCP (Dynamic Host Configuration Protocol).

 

Superuser Privileges: 

 

To Setup Network Boot Debian Linux Server, you also need administrative access to the server.

 

TFTP Server: 

 

A TFTP (Trivial File Transfer Protocol) server is also essential here for transferring the boot files.

 

Devices Configured with PXE Boot: 

 

Here, you must have the devices that are practically configured to boot over the network using the PXE (Preboot Execution Environment).

 

Step-by-Step Guide on How to Setup Network Boot Debian Linux Server

 

Here are the following steps that you need to follow in sequence to setup Network Boot Debian Linux Server. 

 

1. Install the Required Package

 

To set up the PXE (Preboot Execution Environment), you need to install the necessary and appropriate package on your Debian server. 

 

For this, open a terminal and run this command:-

sudo apt update

sudo apt install isc-dhcp-server tftpd-hpa syslinux pxelinux nfs-kernel-server -y

 

2. Configure the DHCP Server

 

 

The DHCP (Dynamic Host Configuration Protocol) server allows you to use PXE-based devices along with the IP addresses and boot file information.

 

For this, you need to open the DHCP (Dynamic Host Configuration Protocol) configuration file using:




Now, you can add or modify the following configuration using this:- 

 

Next to this, you have to restart your DHCP server using the below command:


 

3. Set Up the TFTP Server

 

Here, you need to set up the TFTP (Trivial File Transfer Protocol) server for transferring the boot files with PXE-enabled devices.

 

Next to this, you are required to edit the TFTP server configuration using the below command. This will assist you in making sure that your setup network boot Debian Linux server configuration is more smooth and seamless:-

 

This will allow you to make sure that your configuration includes all of these:-

Once, you have been sure then create the TFTP directory and restart the service:-

 

4. Install and Configure PXE Boot Files

 

 

Here you have to initiate the network boot using PXE boot files. For this, you can take the required bootloader files from the following:-

 

Next to this, create the configuration directory and default file using the below command:-

 

Once, it’s done, then you have to add the following configuration to the default file using the:-

 

 

5. Set Up the NFS (Network File System) Server 

 

In this step, your NFS (Network File System) server will share the Debian filesystem with the client systems.

 

Here, you have to Install the NFS server package using the below command to Setup Network Boot Debian Linux Server:-



Next to this, you’re required to export the required directory for which you can use the below command: 



Now, add up the following lines for the smooth exportation: 


/srv/nfsroot 192.168.1.0/24(ro,no_root_squash,no_subtree_check)


Here, you have to create and set up the NFS root directory. For this, use the below command:



Finally, you can restart the NFS service for the activation:


 

6. Configure Boot Files 

 

In this step, you need the Debian kernel, vmlinuz, and the initial ramdisk which is initrd.img. You can simply obtain these from the Debian installation ISO (International Organization for Standardization) or can do them online as well.

 

Here, you can follow the below-mentioned file and use it in the TFTP (Trivial File Transfer Protocol) directory:-

 

 

7. Test the PXE Boot

 

To test out the PXE boot, you have to configure a client machine to boot from the network which is usually possible through the BIOS or UEFI settings.

 

Next to this, you need to reboot the client and make sure that it receives an IP address and boot files from the PXE (Preboot Execution Environment) server.

 

Here’s the Tips to troubleshoot the common Issue

 

TFTP Errors: 

 

Here, you have to make sure that your TFTP server directory permissions are correct.

 

DHCP Configuration Issues:

 

Additionally, you are required to check the DHCP logs regularly to figure out the errors and to be sure that all the services are running smoothly.

 

PXE Boot Failures: 

 

You need to verify the bootloader and kernel files to make sure that they have been configured correctly.

 

Setting up a Network Boot Server for Debian Linux is an efficient way to manage networked systems smoothly. Therefore, by following the above-mentioned steps, you can streamline a smooth deployment and simplify maintenance of the system in your own environment.

 

Final Thoughts:

 

Managing the systems and their performance in this hectic era has been very crucial and difficult. So, in this article, we’ll enlighten you on how to setup a Network Boot Server for Debian Linux to drive efficient management with multiple devices. We’ll also show you how to leverage PXE and configure DHCP, TFTP, and NFS to create a centralized solution for automated deployments & diskless workstations. Therefore, by following the outlined steps you can drive a a smooth and reliable setup that will allow you to save time. Plus, to saves resources while maintaining a powerful network infrastructure. So, what are you waiting for, let’s jump into the main content. 


Related Post:

How to Set up a Lightweight Time Sync Solution using Tiny Core Linux for NTP Server?