Hi everyone!
If you have ever installed Linux on a remote server via IPMI/KVM using a laggy mouse cursor, you know the pain.
It’s manageable for one server, but what if you need to set up 10? Sure, the "proper" way is to set up your own PXE server, configure TFTP, DHCP, bootloaders, and write kickstart configs. But what if your remote servers are in different VLANs or scattered across different Data Centers? Setting up infrastructure for each location is a hassle.
I decided to try and automate this process. The result is net2boot.xyz — a free service that generates a tiny 2MB ISO for fully automated system installation.
How it started
At first, I used grub2-mkrescue to manually assemble images. I edited grub.cfg and kickstart.cfg by hand. Since the disk partitioning was identical across all servers, I only needed to change the network settings and hostname. The image size, including the kernel and initrd, was around 120 MB.
This simplified the process: just mount the image via IPMI View or iDRAC, reboot, and select CD-ROM as the boot device. However, if I made a typo in the config files, I had to rebuild and remount the image all over again.
The Evolution: Switching to iPXE
While the self-contained image was a good start, I wasn't happy with two things:
The 120 MB size (uploading via slow virtual media takes time).
The need to pass the MAC address in the kernel parameters (otherwise, if the server had multiple active links, the kernel struggled to configure the network correctly).
So, I switched to the iPXE network bootloader. Now, the kernel and initrd are loaded over the network, and the script iterates through network interfaces until it finds a working link. The image size dropped to just 2 MB.
Feature: Automatic Partitioning
The next step was automating disk partitioning to support common schemes.
In modern distributions (RHEL 9, AlmaLinux 9, Fedora 43), the installer crashes if you try to place the /boot partition inside a software RAID 10. My generator handles this automatically. If you choose RAID 10, the script creates /boot on a separate RAID 1 (mirroring the first two disks) and puts the root / and data on RAID 10 (across all 4 disks). This happens transparently to the user.
Feature: Smart Disk Selection
Servers often have mixed storage: maybe 2 small SSDs for the OS and 4 large HDDs for data. Or a mix of NVMe and SATA.
I wrote a "smart sort" logic into the generator:
It checks the disk type (rotational vs. non-rotational).
It sorts disks by size (smallest to largest).
The OS is always installed on the smallest disks of the selected type.
Example: If you select "SSD" and "RAID 1", but your server has two 240GB SSDs and two 1TB SSDs, the system will install on the 240GB ones.
Note: If you use a hardware RAID controller where disks are presented as a logical volume, you should select "HDD" as the type. This also applies if you are testing the ISO in a Virtual Machine.
How it works
Go to the website and open the creation form.
Enter network settings and your password hash (check the tooltips for security).
Choose your disk scheme (Standard, LVM, RAID 1/10) and disk type.
Download the ISO.
The ISO contains the iPXE bootloader and the generated kickstart file. Upon boot, it configures the network, downloads the Linux kernel from official mirrors, launches Anaconda, and installs the system without a single click.
Key Specs:
Works with both Legacy BIOS and UEFI.
Security: Passwords are not stored or transmitted in plain text (only SHA-512 hashes are accepted).
Supported OS: AlmaLinux, RockyLinux, CentOS Stream, and Fedora.
Conclusion
This is a free project I built for myself to avoid writing configs by hand every time. I’d be happy if it saves someone else time and nerves.
Top comments (0)