Firas, thank you.

That’s appears to be exactly what I need.

I’ll be doing some test tomorrow and report back.

V.

> On 22 Feb 2018, at 22:40, Firas Alshafei <firas.alsha...@us.abb.com> wrote:
> 
> V,
> 
> 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 
> genisoimage.
> 
> My use case is fairly vanilla kickstart you might have to modify to suit your 
> workflow.
> - 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 
> /DVD/Packages-Extra
> - 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 😊
> 
> #!/bin/bash
> #===================================================================================
> # 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")")
> isoPath=${scriptPath}
> releaseName="my-awesome-dvd.iso"
> 
> # Move repo group info
> mv ${scriptPath}/media/repodata/*-comps-Server.x86_64.xml 
> ${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                 \
> ${scriptPath}/media/
> 
>    
>                                                                               
>                          
> 
> Firas AlShafei
> Senior Lead Engineer
> Enterprise Software
> ABB
> 
> -----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.
> 
> 
> Hello,
> 
> 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.
> 
> Thanks,
> V.
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@redhat.com
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fkickstart-list&data=02%7C01%7Cfiras.alshafei%40us.abb.com%7C61f459f9ce2a4501b84d08d57a3dede1%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C636549328763319165&sdata=ryv0YW%2FzOdUplRFSLABdNkRZN%2BZKBJwKVw5CaSDJfRk%3D&reserved=0
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list


_______________________________________________
Kickstart-list mailing list
Kickstart-list@redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list

Reply via email to