I’m trying to setup up a small scale compute cluster at my school.
I have a login node up, that has DHCP, NFS, ect running. I have also been able to get the compute nodes to load the Rocky Linux installation ISO from the PXE server.
However I would like to create an image of Rocky which each compute node load (with the correct network/gpu drivers installed).
I’ve tried googling but there doesn’t seem to be one clear way to do this.
Creating a custom ISO is no small task. You may want to consider doing an unattended install via kickstart file instead. The easiest way to do that in my experience is to build one node, then grab the kickstart file from the /root and throw it on a web server. Then just use that file to install via kickstart file the rest of the nodes.
You are going to have to create your own initramfs with the installation/structure/configuration that you desire. Part of this will require you to perform an “installation” in some other directory and configure it the way you want.
Beyond that, without a great deal of customizing, you may not achieve your actual goal. With that said, some use NFS instead as the root. See here for an example.
What I do is to use the regular images to do the “minimal install”, and then I have Ansible playbook that installs and configures the missing bits. The machines are after all on network, so the ISO does not have to provide everything. Besides, the playbook acts also as maintenance tool.