Tech News
← Back to articles

Learning to Boot from PXE

read original related products more articles

Learning to boot from PXE

Posted on November 17, 2025

I bought a new laptop, the GPD Pocket 4. It came with windows installed by default, and I wanted to install nix on it.

I grabbed a usb, dd 'd the nixos iso image on it and tried to boot. The laptop did not recognize the drive. Turns out, the drive crapped out, no computer would boot off it.

The normal thing to do would've been to just go get a new usb and install off of and go about setting the laptop up. That meant I would either have to go outside or wait for a new usb to arrive. I don't want to outside and I don't want to wait to setup my laptop. I have free time now and I have no clue when I will have free time next.

The menu had two other boot options. Something about PXE over ipv4 or ipv6. I only knew that PXE allowed networked boot. So hey, let's use this time to learn something new.

As I've learned, the first half of this process is DHCP. When a device is connected to the network it sends out a "HEY GIVE ME AN IP" message (I don't actually know how it works and didn't bother to look it up). Then your DHCP service see's this message and responds back with an IP. As part of these requests the client and server can set "options" on these requests which can send additional information. I don't know what the client sets first, but I do know the server needs to set a boot file name and location of a TFTP server. TFTP sort of like FTP.

PXE reads the boot file (usually something.pxe) from the TFTP server and then executes its code. Other boot files are then retrieved as needed from the TFTP server.

While learning this, folks on the internet dont seem too fond of TFTP, saying it could be slow. There exists iPXE which is supposed to be a better PXE. PXE (like bioses), tend to be manufacturer specific and are not created equal. iPXE tries to be better and supports a bunch of other stuff like (like booting from an ISO, and talking in HTTP). So if this all goes well i get iPXE going, point it to the iso I've already downloaded and I'm off to the races!

Spoiler alert, I didn't get to the races.

... continue reading