J. Austin Hughey
A Mad Scientist's Notebook

A Mad Scientist's Notebook

PXE Boot: pixiecore + netboot.xyz = Easy Mode

No more USB sticks, no more ISOs, and no more maintenance!

J. Austin Hughey's photo
J. Austin Hughey
·Mar 23, 2022·

3 min read

Listen to this article

Problem: you want to quickly boot something over network (PXE boot) to install an operating system on another machine, but don't want to go through the hassle and long-term maintenance involved with setting up a real PXE boot environment (tftp, dhcp server, and so on).

Solution: pixiecore on your dev machine booting a netboot.xyz EFI allows you to navigate a text menu from the booting machine, select an operating system to download (live disk, installer, etc.) then you install from there.

HOW-TO

Skipping straight to the point (see below for reference, explanation, advisories):

# Install pixiecore
$ go install "go.universe.tf/netboot/cmd/pixiecore@latest" # needs go 1.17, see tips
# assuming you downloaded the netboot efi already
$ pixiecore boot "$HOME/Downloads/netboot.xyz.efi" --bootmsg "booting from pxe" -d --ipxe-efi64 "$HOME/Downloads/netboot.xyz.efi" -t

Tips

  • Try booting over UEFI PXE using VirtualBox, VMWare Fusion/Workstation, etc. first to test your config before fooling with real physical hardware. Makes it easier to validate before jumping in "for reals".
  • An alternative if you want to maintain a physical disk is Ventoy. Grab it, run its built in scripts (possible security concerns), builds a few partitions on a USB stick, then copy and paste some ISOs on the right partition, slam it into the machine and boot. Now you get a list of ISOs to pick from when booting.
    • BE ADVISED: Security concerns may exist for this project. See below.
  • Regarding Go: Version 1.18 changed the way that go get works. As of that version it now manages module dependencies and no longer fetches, compiles and installs tools/binaries built in Go. You want go install for that as of 1.18, however, pixiecore won't build in 1.18, so you need to run go install using go 1.17, no newer. This is because they project is basically abandonware now for whatever reason.
    • If you know of a better way to do this, or a better (maintained!) project, please let me know!
    • If using Homebrew, try this:
$ go version # if > 1.17, run the following:
$ brew unlink go
$ brew install go@1.17
$ brew link go@1.17`

Now re-run go install and it should compile. Be sure to check that your GOPATH is in $PATH so your shell can find the binary!

About

  • pixiecore
    • Written in Go
    • Last update as of this writing was in 2021 (not quite a year ago)
    • Readme says no longer maintained, so may not work far into the future
  • netboot.xyz
    • Supported as of date of this writing afaict
    • Updates list of available stuff out there
    • Primarily Linux distros

BE ADVISED

  • pixiecore may not be maintained anymore, so its usefulness may decrease as time goes on.
  • Any time you're booting over network, especially with images from the public internet such as netboot.xyz, be damn sure you trust that remote resource because there's no guarantee you're not getting an altered OS image. Journalists and citizens victims of authoritarian governments, beware!

Regarding Ventoy as an alternative:

  • Be advised:
    • Project is open source, but developed primarily in China.
    • Releases contain binaries that are run by various scripts (/bin/sh):
      • No SBOM available (afaict)
      • No third-party audits/analysis (afaict)
      • No reproduceable builds (afaict)
      • If privacy or opsec are important in your scenario, I recommend the old fashioned way instead.
    • Just because the project is developed by folks from China doesn't automatically make the it, or its developers, somehow "bad". Ventoy is actually very good software. We just don't know if President Pooh Bear has fiddled with it or not.