'How to create AlmaLinux ISO with rpm files included in the ISO, so that installer does not need internet connection to download the packages?

I am trying to create an ISO from AlmaLinux, which will have the gui installer and this ISO would have all the rpm files, packages and dependencies needed when I select a specific installation environment in the installation screen.

The end result should be an ISO, that when I insert it on a new machine that does not have internet connection, I would be able to boot from the ISO, start the gui installation, select the environment, e.g. "Workstation" or "KDE" and then the installer would install the corresponding packages from the ISO into that machine, not from the internet.

I have found a guide that uses a Kickstart file, I updated it and it works for a gui installation but the packages are downloaded from the internet (from some AlmaLinux package manager server), the required packages are not included in the ISO itself.

I used this guide: https://onezeroone.dev/customizing-the-almalinux-installer-media/ and I did some changes in this Kickstart file: https://onezeroone.dev/example-almalinux-kickstart/

I also tried repo=cdrom or repo --name=dvd --baseurl=file://Packages but it does not work, which is expected

On CentOS 7 I used Pungi for this, which checks for all packages and dependencies needed and it includes them in the final ISO, but on AlmaLinux this does not work. Could you please provide some help?

Thank you!



Solution 1:[1]

I am attempting something similar, and while I haven't reached that stage of the process yet, I believe what you're missing is updating the comps.xml file.

https://serverfault.com/questions/892372/i-am-trying-to-create-custom-centos-7-iso-but-in-my-iso-software-selection-list?rq=1

In the AlmaLinux iso, the comps.xml file will have a longer name ending in comps-AppStream.x86_64.xml and is in the /AppStream/repodata folder so the instructions from the link will need to be adjusted to fit the AlmaLinux folder structure.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Prdufresne