I’ve recently embarked on learning about how to deploy Linux based Operating Systems over a network using (i)PXE. Some of it came easy. Some of it was hard. And some of it. I could use some help with.
The problem I’m having right now is every Debian based distro I have is derrived from Ubuntu and uses something called “casper” for netboot which was by far the easiest to configure.
However, any Debian distro that doesn’t rely on casper I have been searching and searching, and Googling, asking people questions and
I have only come up with incomplete solutions that don’t integrate well into the existing script.
Affected OS’s I’ve tried include Debian, PeppermintOS, ParrotOS, VyOS, and Kali Linux. I have no idea how to netboot these operating systems. The only vague solutions I see are netinstall .ISO’s that rely on Internet and public repo’s to download packages. I really want to host it locally but I can’t find any easy solutions anywhere.
@Windows7ge I would like to learn how to deploy Linux-based Operating systems over a network using (I)PXE. I was wondering if there were books or websites you found helpful in understanding this subject matter?
I’ve been trying that actually with no success. In the case of debian-11.4.0-amd64-netinst.iso I haven’t figured out how to point the kernel to either a .ISO file or directory consisting of decompressed .ISO contents on a HTTP server.
This starts a Debian installation menu immediately. Unlike Linux distros like CentOS or Fedora it’s menu doesn’t show me any way of mounting a network hosted repo. It wants a local media CD which I don’t have nor want to use.
No combination of kernel arguments in my other scripts seem to sway the behavior. I can’t get the kernel to notice the full .ISO or open file directory on the HTTP/FTP server.
The problem with knowing and learning how to set this up is that it requires several separate components and no one website tells you how to configure all of them.
You have to know how to install a Linux Server.
You have to know how to install Apache2.4 and DNSMASQ or ISC_DHCP_SERVER
You have to know how to write an embeded PXE script.
You have to know how to compile iPXE from source code.
You have to know how to use SSH & SFTP.
You have to be familiar with FTP & HTTP.
You have to write the back-end script that composes the screenshot in the original post.
You have to know what .ISO files are and how to open them.
You have to know what a kernel is. Where to find it. And how to extract it.
You have to know what initrd is. Where to find it. And how to extract it.
You have to understand navigating file directories and how to tell a script what path to follow to a file.
You have to understand script kernel arguments.
Then, and only then, can you boot from the network, chainlload iPXE, get to this menu, pick your OS, watch the kernel do it’s thing before promptly Kernel Panicking because you forgot a “/” somewhere.
I plan on writing a beginning to end tutorial on how to setup this entire server because I had to go to several dozen websites. Often just for a single line or two of executable code to act as a band-aid. Talk to people on several forums, and do an absolute crap-ton of trial & error guess work. I’m somewhere around 90-odd hours into this project and I only have 15 verified OS’s working but I know the current compatibility list is much greater.
I intend to post the finished tutorial on another forum but if there’s interest for it I’m willing to post it here as well if there’s a tutorial sub-forum. I don’t spend that much time here.
There’s that “Execute shell” option (near bottom of your screenshot) that lets you do whatever-you-want as a once off, but there’s also this more official way of customizing the Debian installer:
I will have to invest time later into this. I understand that almost anything can be accomplished from shell but the goal of what I’m doing here is to have the script run everything needed to get to the installer ready to install. If that’s not possible with Debian then I’ll have to investigate the available options independently.
There’s a 1000 different Linux distros. I’ll have to start a compatibility list.
Before deciding the distribution is at fault, I would try and dig a little deeper … from your config files it looks like you are not booting the proper kernel to start with … the output you show does not look like the netboot install, that should ask you to chosse from which mirror you want to install …
Can you try booting with the netinstall kernel?
You probably will need to create a full local dedian mirror to make it work though …
Oh I don’t doubt it could be something simple that I’m missing. It’s been that way with nearly every distro I currently have working. I’ve just put in a large amount of time, done a lot of Googling, asked for help on the Debian forum (no response yet) and have tried to make sense of any Debian documentation I can understand. Nothing’s working. If someone knows something I just haven’t figured out yet I’m open to all suggestions/advice.
I was experimenting with both the netboot & full DVD .ISO versions of Debian 11.4.0. I can’t recall what one is in use right now since I didn’t label them.
I’ve just gone ahead and extracted vmlinuz & initrd.gz specifically from the netinst.iso version /install.amd (not zen or gtk) and moved them to the necessary directories for my config.
The setup displayed was identical to the before-mentioned kernel/initrd.gz. No options about downloading from mirrors appeared.
I’ll try zen & gtk as they both have their own kernel and initrd.gz files but I’m not getting my hopes up at this point.
Let’s try and get some initial things sorted out …
The kernel you find in the NetInst Iso will not work when booted from pxe as it still expects local media to be available:
Network install from a minimal CD
A network install or netinst CD is a single CD which enables you to install the entire operating system. This single CD contains just the minimal amount of software to install the base system and fetch the remaining packages over the Internet.
What's better for me — the minimal bootable CD-ROM or the full CDs? It depends, but we think that in many cases the minimal CD image is better — above all, you only download the packages that you selected for installation on your machine, which saves both time and bandwidth. On the other hand, the full CDs are more suitable when installing on more than one machine, or on machines without a free Internet connection.
What types of network connections are supported during installation? The network install assumes that you have a connection to the Internet. Various different ways are supported for this, like analogue PPP dial-up, Ethernet, WLAN (with some restrictions), but ISDN is not — sorry!
So, you need to download the netboot.tar.gz file from a a mirror and get the initrd and vmlinuz files from there. Given you’ve already set up your pxe infrastructure you shouldn’t need anything else, but just in case refer to that page for pointers …
Well, you were completely correct that I was using the wrong kernel. Would have been nice if Debian made it easier to locate and perform.
As you eluded to though the next problem is the installer doesn’t like me trying to use a local server for installation. It’s insisting on public repos. Says it failed to download a file from the mirror no matter which way I type the server IP or directory to the installation files.
You should look into the http server log and see what files it expects where, I am afraid creating a (minimal) local mirror will be the quickest way to go about it … but the amd64 size is650GB … I think your best bet will be to set up aptcacherng, choose an internet mirror during the install and then setting up your local server as proxy … the first time it will pull packages from internet, then you’ll be able to replicate as needed:
Have you ever heard of KDE Neon? KDE Neon uses Ubuntu as its base. It also uses Casper, so it should be easy to add to your script. I have included a link to the organization if you want to check it out. https://neon.kde.org/
Because of the intended purpose of why I’m making this, building a repo proxy server would be well outside the scope of the project. So I’m just going to make a compromise so I can include the OS.
item debian Debian 11.4.0 (Requires Internet)
Now if I could just find answers to other Debian distros that don’t use casper… I was hoping a solution for Debian itself could be applied to other Debian based distros but that ended up not being the case. Back to Google I suppose.
I want to say it’s a spin-off of Kubuntu but I see Google says fairly otherwise:
The primary difference between the two operating systems is that Kubuntu maintains stable releases and LTS version of Ubuntu while KDE neon focuses on updating developer editions of KDE applications without maintaining stable releases of Ubuntu unless the root user actively chooses to upgrade their systems.
So KDE Neon is actually treated quite differently. It isn’t just a different desktop. I’ll definitely add it to the list.
I’d like to add some more server distros but haven’t gotten around to it yet.
@Shadowbane Maybe this will be of some use to you. It’s more of a rough draft than anything else but should still take you a step in the right direction.