If you're adding rpms then you'll need to update the repo to actually include 
them. I'm not familiar with Lorax so I can't really help there, but if your end 
goal is  a standard RHEL dvd with extra packages that you want to define in 
your kickstart configuration then it should just require createrepo and 

My use case is fairly vanilla kickstart you might have to modify to suit your 
- isolinux and efi use the inst.ks and inst.stage2 to point to kickstart file 
and installation source respectively.
- kickstart file and pre/post/conf scripts in DVD/kickstart directory structure
- Packages in the default DVD/Packages and additional packages in 
- I delete all uneeded packages to reduce DVD size, just feed the rpm -qa 
output on an installed system to yumdownloader

Here's a script stub - I do something similar in-house to get our DVDs created 
for air-gapped environments (it's a pain).
Hope this helps 😊

# Title        : create-iso
# Description  : Generate kickstart dvd
# Author       : Firas AlShafei
# Last Revised : 11/04/2015

# Assume following path structure
# working-directory
# |
# ---> creat-iso.sh
# |
# ---> media (DVD media + kickstart + additional packages)

# Path variables
scriptPath=$(dirname "$(readlink -f "$0")")

# Move repo group info
mv ${scriptPath}/media/repodata/*-comps-Server.x86_64.xml 

# Create repo
cd ${scriptPath}/media
createrepo --quiet --pretty --update --groupfile 
repodata/comps-Server.x86_64.xml .

# Make ISO file
echo "== Generate DVD Image"
echo "= ${isoPath}/${releaseName}.iso"
genisoimage -r -T -J -V ${releaseName} \
 -quiet                                \
 -o ${isoPath}/${releaseName}.iso      \
 -no-emul-boot                         \
 -boot-load-size 4                     \
 -boot-info-table                      \
 -b isolinux/isolinux.bin              \
 -c isolinux/boot.cat                  \
 -eltorito-alt-boot                    \
 -no-emul-boot                         \
 -b images/efiboot.img                 \


Firas AlShafei
Senior Lead Engineer
Enterprise Software

-----Original Message-----
From: kickstart-list-boun...@redhat.com 
[mailto:kickstart-list-boun...@redhat.com] On Behalf Of Vinícius Ferrão
Sent: Thursday, February 22, 2018 3:47 PM
To: kickstart-list@redhat.com
Subject: Custom ISO with Kickstart and Local Repos

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


I’m trying to create a custom ISO with a Kickstart file to achieve a complete 
offline installation.

I was able to create the Kickstart file as usual, since I use it for PXE 
installs for at least 10 years, but the major problem now is building the ISO 
with the necessary files.

I’ve came across a tool named Lorax, but I was not able to create a custom ISO 
from DVD’s. It only works when point to mirrors, and this is a time consuming 
task. Another problem is that Lorax does not seems to care about the 
/usr/share/lorax/product folder to create a custom Anaconda with the embedded 
kickstart file on /usr/share/anaconda/interactive-defaults.ks.

The small ISO generated by Lorax lacks local repositories and I was unable to 
find the appropriate documentation on how to build this scenario. So it 
generates a boot only install that must be done over the Internet.

At this moment I’m running Lorax on a CentOS install, I’ve got RHEL licenses 
too, but to keep it simple I just went with CentOS. I think this is irrelevant 
information but it’s just for the sake of completion.

With genisoimage I was able to add the custom product.img file, that I’ve 
generated by hand with cpio, on the ISO but I was not able to solve the local 
repos problem. There are packages that I would like to add to the install 
media, like Ansible, but they are available only on the Extras repository and 
I’m unsure on how to do this. Just wondering if createrepo and yumdownloader 
are necessary...

Any help is greatly appreciated.


Kickstart-list mailing list

Kickstart-list mailing list

Reply via email to