Published on 2020-09-03
Categories:
tech
Tags:
100DaysToOffload
Have you been there too?
I seems to never find my spare USB drives when I need them. This week, I wanted to re-install my laptop but could not find an unused USB drive to put the ISO on.
This is when I found PXE and NetBoot.xyz image.
PXE stands for Preboot eXecution Environment. It’s a way to distribute boot images over network.
It uses a combination of TFTP (Tiny File Transfer Protocol) for transferring images and DHCP for discovery.
It enables to boot most machines over network.
While searching how to setup PXE, I’ve discovered netboot.xyz. If you boot one of their images, you will get a menu which allows you to select live images, install images, rescue images.
Here is what it looks like:
And selecting network installs shows this:
Select an image, it will download and boot it.
Self hosting TFTP is relatively easy if you have a WRT router, PfSense/OpenSense, FreeNAS. It’s not much more difficult to install on any Linux server.
In my case, I have the choice between:
The setup is straight forward:
If you want to verify your setup, just download a TFTP client (for example, atftp), connect to the TFTP server and get netboot.xyz.kpxe. This should download the images served by your TFTP server.
Once you have TFTP working, the last piece missing is the DHCP configuration.
What happens is your DHCP server, which most PC get an IP from, can give additional information, like the TFTP / images to use during PXE network booting.
This seems to be limited to some routers, but most FOSS firewall or routers allow you to configure PXE.
On my OpnSense Firewall, I need to:
Now, to boot using PXE on any PC or even in VirtualBox, you need to select network in the boot menu. After getting an IP address, you should boot the netboot.xyz image.
I’ve missed writing on my blog… Life, vacation, making major backyard refactor put me away from the keyboard for some time.
Special congrats to folks who made it to the 100 posts. This is quite an achievement.
I don’t think I’ll get this anytime soon, but I plan to continue posting regularly.
This is day 14 of my #100DaysToOffload. You can read more about the challenge here: https://100daystooffload.com.
For comments, use email or Mastodon
Don't forget to subscribe to my RSS feed!