Skip to content

Comment on Rocky Linux releases its first release candidateparent

Comments

I expect PXE booting hasn't changed much in 15 years, so you can go find The Linux Documentation Project's HOWTOs on PXE and network booting and it should be about the same now. After that you just need to learn how to extract and create an initrd, and how the init system works to trace the execution of your network boot system.

This is also where shell script-based init systems rock. It's pretty easy to figure out how things get executed in an unusual environment like a network-installer because you can just open up the files used by your installer and follow them. To figure out how systemd might work in a PXE environment you'll need to find the version of systemd and then go download the source code and start reading... Might want to keep a notebook as you go.

Hell, I wrote my own PXE server (from scratch, starting with UDP primitives for DHCP and TFTP) that could PXE boot and track/log the status of several concurrently PXE booting servers in a rack. That sounds crazy, but its' surprisingly easy in Elixir. It was arguably easier (and more reproducible) to do this than to figure out how to configure, say, isc-dhcpd to give out specific ip addresses based on a mac-ip lookup table you put on s3, log the progress of each client, and then ninja out isc-dhcpcd to not exist anymore once you've provisioned the rack (and then figure out what to do if you had an error)... you can imagine the nightmarish statefulness problems with system config files all over the place.

learn how to extract and create an initrd

that was the hard part. CentOS and Ubuntu (poorly documented) give you a specific bootstrapping pathway that would kick in the initial installer, and at the other end you would have the system as you wanted it. The PXE instructions for alpine drops you into a shell. I couldn't figure out how to create and launch a "script" that would kick off the software installation beyond the basics. Like I said, it's probably easy, just not my wheelhouse.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.