I'm new to Linux and I'm working on setting up a home lab with about 30 small PCs. I want to streamline the process of getting a basic Linux build installed for services like web servers, databases, and email servers. Ideally, I'd love to have these PCs boot from a USB drive, format their own storage, install Linux, and automatically acquire a DHCP address so that I can SSH into them later without needing to connect a monitor or keyboard. Is there a simple auto-install ISO out there, or do I need to create my own?
5 Answers
On the Ubuntu side, check out cloud-init. It allows you to set options and scripts during installation, including from your boot medium. Here's a helpful link for it: [cloud-init documentation](https://canonical-subiquity.readthedocs-hosted.com/en/latest/tutorial/providing-autoinstall.html#providing-autoinstall). Debian has something similar, but I'm not as familiar with it.
When you're diving into a project like this, the fun is in figuring out how to tackle it all! But really, you don't need to create a custom ISO. Debian has built-in methods for this—look into pre-seeding, PXE booting, FAI, and similar options. You can even kick off the install via a console and finish it up over SSH if you like, although that may not be fully automated.
You could also think about making a bootable USB that starts SSHD automatically. After that, you can use an Ansible playbook to manage the install. This can give you more flexibility and control!
We do this at work using Debian pre-seed. It runs from USB, formats the disk, installs automatically, and then I use SSH for further configuration. If you want to avoid all that PXE boot nonsense, pre-seeding is the way to go!
If all your systems can PXE boot, consider setting up MAAS (Metal as a Service) on one machine. It’ll send cloud images to the others and can handle the deployment for you. You can find it at maas.io. Just be aware that this will likely require you to enter BIOS settings to enable PXE boot, which could be a hassle for so many machines.
Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux