PxE Server on Raspberry Pi 5

December 26, 2024, 21:37

dinoxoxo

Hello, I couldn't find any info about this yet, I want to use my raspberry Pi 5 to host multiple OS installations over the network, is it possible?, any guide you would recommend me? I have only found info on how to boot a Raspberry Pi OS from the network without a SD card, but I want to automate the process for the computers that I have to fix and reinstall the OS without having to create multiple OS installation sticks and swap it to every computer I'm fixing, thank you so much

thunder07337

As I understand pxe Server, this can't work because the Pi has an ARM architecture and other computers have an x86 architecture.

oops.se

PXE Boot is quite simple: The basic setup is the following: - DHCP server - TFTP server - the initrd and the kernel image to be transferred to the client (x86) There is a lot of guides, just search for "linux pxe boot debian bookworm" https://reintech.io/blog/setting-up-pxe-boot-server-debian-12 To create a menu where you can select a OS is highly depending on your skills and what OS's your dealing with. I have done it many years ago with Windows and Linux from the same menu. My suggestion is to examine programs that can create "multi boot ISO/USB" and adopt that to your PXE boot environment.

thunder07337

Do I understand correctly that the ISO is stored in this path
/path/to/debian-installer
?

oops.se

They need to be accessible via TFTP as it is the delivery method of the install media from server to client. TFTP_DIRECTORY="/srv/tftp"

thunder07337

I mean the following: Step 5: Add the Boot Images Copy your boot images to the TFTP root directory and the NFS export directory. For example, if you are using a Debian installer:
cp -r /path/to/debian-installer /srv/tftp/
Are the .ISO files stored in this directory? Or what kind of "images" does the author mean?

oops.se

I don't remember exactly, but inside the ISO file there is a image file. But this official doc has more details https://wiki.debian.org/PXEBootInstall and cover your question and some.