Preboot eXecution Environment

The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.

The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.

PXE can be considered one of the ways to load the operating system on a computer. When the computer has the PXE capabilities, the bios shows the user the ability to choose among the possible devices to load the operating system, booting from the network.

If this option is selected, the firmware PXE uses DHCP to configure an IP address on the network adapter and locate a server (the "boot server") via TFTP to download a file, storing it in RAM memory. This file is then executed, providing for booting an operating system.

In standard mode, the DHCP server does not provide directly the boot server, but acts as a "PXE redirection service", which redirects the client to the PXE server available. The PXE server are modified DHCP servers, which use UDP port 4011, and provide the client with the IP address of the boot server and the name of the network bootstrap program (NBP) to download.

In practice, usually the PXE firmware is able to directly receive the necessary parameters from the DHCP server to identify the server and the boot file to download, and you can configure a standard DHCP server to provide the necessary parameters to boot via PXE.
sudo apt-get install tftpd-hpa dhcp3-server netkit-inetd lftp

Modify the /etc/default/tftpd-hpa file as follows
RUN_DEAMON="yes" TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot" TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -v -v --secure"

The last row will have a verbose log. Now we work on the files related to the DHCP Service:
vim /etc/dhcp3/dhcpd.conf

and write:
option domain-name-servers 8.8.8.8;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
subnet 113.112.117.0 netmask 255.255.255.0 {range 113.112.117.118 113.112.117.250; filename "pxelinux.0";
option subnet-mask 255.255.255.0;
option broadcast-address 113.112.117.255;
option routers 113.112.117.1;
next-server 113.112.117.118; }

clearly ip addresses are totally invented, you put the right ones. The filename parameter is usually pxelinux.0 but can be modified at will by placing it where it  is convenient to you. It is not over yet with DHCP...
vim /etc/default/dhcp3-server

specifying the interface to use with the INTERFACES directive. We put in /var/ lib/tftpboot an Ubuntu distribution netboot version taking it from here
lftp -c "open http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/; mirror netboot/"

then we start the services
sudo /etc/init.d/tftpd-hpa start
sudo /etc/init.d/dhcp3-server start

and we pass to the configuration of the PC terminal on which it will be installing the operating system.

Usually the modern BIOS have the option of the boot set the F12 key, but I recommend the classic RTFM ... to dispel any doubt. the computer that will be used as a terminal try the IP address via DHCP and once it has obtained this will allow access to the folder of the tftp server from showing the typical GRUB installation.

I usually work with server versions of Ubuntu, but it could happen that the desktop version, using the graphical installer does not allow the proper display of the options, especially if the machine on which you want to proceed is a bit 'old and has not large-capacity video graphics.

in this case, edit the
/var/lib/tftpboot/ubuntu-installer/i386/boot-screens
and write
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/
ubuntu-installer/i386/boot-screens/boot.txt
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/
ubuntu-installer/i386/boot-screens/splash.rle

This will allow you to boot with options also apply to older machines.

Privacy Policy