I used this guide to setup my iPXE server: https://linuxhint.com/pxe_boot_ubuntu_server/
It is set up on a virtual Ubuntu (20.4.6) desktop system and, after some testing, it works perfectly for PXE booting and installing Ubuntu 22.4 and 20.4 on different client systems.
However, I can't get Debian (12.2.0) to work.
I downloaded the following full (3.7GB) iso:
https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.2.0-amd64-DVD-1.iso
and extracted it to /os-images/debian-12.2.0-amd64
Then I edtited the boot.ipxe file and added a debian menu item:
:debian-12.2.0-amd64
set os_root os-images/debian-12.2.0-amd64
kernel tftp://${server_ip}/${os_root}/install.amd/vmlinuz
initrd tftp://${server_ip}/${os_root}/install.amd/initrd.gz
imgargs vmlinuz initrd=initrd.gz ip=dhcp root=${server_ip}:${root_path}/${os_root}
boot
Now it partly works:
On my client it boots into the selection menu.
When I choose the Debian installation it does start the debian installer.
It asks me 3 questions (language, country and keymap) which I answer with the defaults.
Then, after a short screen where it detects installation media, it waits a few seconds on a blue streen, and a notification appears:
[!!] Detect and mount installation media
So, it looks like the installer cannot find the debian media.
I tried a lot of different arguments in the imgargs
using google.
However, it seems I can't find the same system setup for the iPXE environment I have.
Most examples all use the netboot.tar.gz, or are examples with older Debian versions.
I'm not sure, but I think the examples I can find don't apply on the setup I have, because it is already booting from TFTP. Am I right about that?
I do like to install it from local media, because this network is intended to be disconnected from the internet. However, if it is too difficult, I will also be able to use remote media, as long as I can integrate it with the current (working) solution for the ubuntu installer.
Not every iso is bootable over network, using NFS to mount the root file system - the issue here is not the pxe environment, it is the debian-installer. I tested the iso above in my environment and ran into the same issue like you did.
With a shell, I found out that the installation system did not even have a network card driver loaded at that moment, so that made it quite obvious why the rootfs could not be mounted - the installer lacked the kernel modules required to access the network - which is probably the reason why all the documentation refers to using
netboot.tar.gz
when it comes to a network install.Got it to work, thanks to the pointers of Martin.
Its now a non-local solution (so you'll need an internet connection at the client to dowload the installation media), still working on local installation media and preseeding. I will update this post if I got that to work.
As in my original post, I set up an iPXE environment following this guide. If you don't need Ubuntu, skip the last steps where you download the iso, copy it to the /os-images folder and add it to the menu in the boot.ipxe file.
If the PXE environment is set up, make a folder where you want to put the debian netboot files, download the debian netboot tarball into it, unpack it and clean it up:
I followed this example, this will also create links which are probably not necessary for this environment, but i did it anyway:
At this point, I started testing (boot.ipxe menu item will follow underneath) and found out that my client PC needed some additional drivers for the NIC. What I did is add all drivers from the tarball firmware.cpio.gz, but I think you can probably also add only specific ones. The complete set makes the startup pretty slow, because the client has to download them all.
In short: you have to add the drivers to initrd.gz
This is how I did that:
Edit boot.ipxe:
Add the debian installer menu item:
Now my client boots nicely into a working debian installer. As mentioned before, now I will find out how to add the preseed, and maybe using local installation media after that. If someone knows already how to do that: plz let me know!
Update: Managed to get the preseed working too. Had a lot of trouble retrieving that from tftp but it seems like the network interface is not up when it tries to retrieve the preseed file. My debian menu item in poot.ipxe is now as follows:
Note that withouth the
priority=critical
andnetcfg/dhcp_timeout=200
it fails to get the preseed file.You need to add the /pxeboot/preseeds folder and wget the example preseed file into that:
Now it is set-up and you can edit the preseed file as your configuration needs:
You can find some preseed info here