I need to create an installation ISO with Rocky Linux, but with an additional repository of my own and favorite packages. At first glance, it is enough to use the mkksiso tool.
mkksiso --ks <my kickstart file> --add <my repository> <original Rocky Linux ISO> <my new installation ISO>
But in this case, outdated repositories from the original ISO will be used. Or I will be forced to use online repositories to have latest updates.
I need to perform an automatic installation on the equipment in an isolated environment. Of course, I could create my own repository with the latest packages on the local network, but I would like to have everything I need on one ISO. In addition, I would like to perform another customization of the installation ISO.
I have studied the Lorax documentation and got the desired boot.iso. However, as @nazunalika correctly noted here boot.iso it does not contain repositories. boot.iso it does not look like a complete image from which it is possible to install, because it does not contain the .treeinfo file. As I understood from the anaconda source code, the installer searches for it on ISO and uses the data from it.
Question: How to make right the installation ISO from boot.iso?
Obviously, we need to append the .treeinfo file, add it to the ISO and add the required repositories.
What tool should I use to do this? Maybe mkksiso or something else?
If you are using the DVD iso we already provide, then the repositories on that ISO are from the release of that version, so yes, they will be out of date. You will be required to run a dnf update to get fully up to date post install.
This requires you to have the repositories locally and to use xorriso to combine everything together.
xorriso can be provided a “dialog” or otherwise a script that tells it what to do.
/usr/bin/xorriso -dialog on < /mnt/compose/9/latest-Rocky-9/work/entries/xorriso-x86_64-dvd.txt
Example xorriso dialog from above (trimmed to shorten the post), this lists every single file that will be added to the ISO:
If you are using one that already exists (such as the one from the DVD), you can simply copy it and modify as you see fit by hand. As a word of caution, one slight misconfiguration will break the installer, so it may take experimentation.
If you are making a brand new one to be placed on a new boot.iso, the best way is using the productmd python module. You can find examples of it being used in empanadas shared and empanadas iso utils. You would take the generated file and add it into the iso using xorriso, just like in the example above.