PXE

From Technologia Incognita
Revision as of 13:02, 23 June 2024 by X (talk | contribs) (Add PXE page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PXE Boot

This describes, on a higher level, how PXE works (for x86_64 desktop computers) and how to set it up.

How it works

  1. The computer boots up
  2. It does DHCP stuff to get an IP address, gateway IP, etc.
  3. Within that DHCP stuff, it also gets information that points it to a file hosted on a TFTP server
  4. The computer gets that file on that TFTP server and somehow boots it
  5. Now, we're booted on it, and we have whatever the PXE server provided us
  6. In our case (with pxelinux.0), we can define things in pxelinux.cfg which define different boot configurations, for different Operating Systems, images, boot options, etc.

DHCP

DHCP is just the way that computers get their local IP addresses automatically, stands for "Dynamic Host Configuration Protocol", as it does a bunch of network-related things.

A computer knows where the PXE is, because when it does DHCP, the DHCP server provides that information in the packet.

  • "Next server IP address": address of the TFTP server
  • "Boot file name": what it should boot up (e.g. pxelinux.0)

TFTP

TFTP stands for "Trivial File Transfer Protocol" and is akin to a simplified version of FTP.

It simply stores some files, accessible via the network. It's what PXE uses.

  1. The computer gets the "Boot file name" from the "Next server IP address", which it got from DHCP.
  2. It somehow runs that, and shows you things, which you can configure through pxelinux.cfg.
  3. In our case, we have a menu with various images and services, all configured via that file.

Note that all of those files must come from the same distribution, that is, if you are using the pxelinux and syslinux packages provided by your distribution, they should work. In our case, Debian just works.