Re: Custom ISO with Kickstart and Local Repos

2018-02-23 Thread Andrew Simpson
onal 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=02%7C01%7Cfiras.alshafei%40us.abb.com%
> 7C61f459f9ce2a4501b84d08d57a3dede1%7C372ee9e09ce04033a64ac07073a9
> 1ecd%7C0%7C0%7C636549328763319165=ryv0YW%2FzOdUplRFSLABdNkRZN%
> 2BZKBJwKVw5CaSDJfRk%3D=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
>
___
Kickstart-list mailing list
Kickstart-list@redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list

Re: Custom ISO with Kickstart and Local Repos

2018-02-22 Thread Vinícius Ferrão
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

Re: Custom ISO with Kickstart and Local Repos

2018-02-22 Thread Vinícius Ferrão
Hi,

> On 22 Feb 2018, at 19:11, Arun SAG  wrote:
> 
> Hello,
> 
> On Thu, Feb 22, 2018 at 1:46 PM, Vinícius Ferrão
>  wrote:
>> 
>> 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.
> 
> Have you tried using pungi? Pungi takes in a kickstart file as input
> and generates an install media. I would give you an example but my old
> pungi composes are based on < pungi-4.

Well… pungi-3.12 is available for CentOS. So I guess I’m on < 4 too.

> Pungi creates install media, livemedia-creator creates live media,
> what type of media are you trying to create?

I would like to create and ISO of CentOS with the "Server with GUI” environment 
group and Ansible, which is available on Extras repository.

There’s additional branding on the installer and removal of options in Anaconda 
too, for example: I don’t want the package selection screen. This is handled 
with product.img sending a premade /etc/sysconfig/anaconda file with a similar 
content like:

[root@centos7 sysconfig]# cat anaconda 
[SourceSpoke]
visited = 1

[SoftwareSelectionSpoke]
visited = 1

[UserSpoke]
visited = 1

> https://fedoraproject.org/wiki/Remix
> https://www.happyassassin.net/2016/02/15/pungi-4-the-new-generation-of-the-fedora-compose-tools-and-what-it-means-for-qa/
>  
> 

I’m looking at it.

Thanks,
V.

> 
> 
> 
> -- 
> Arun S A G
> http://zer0c00l.in/
> 
> ___
> 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

Re: Custom ISO with Kickstart and Local Repos

2018-02-22 Thread Arun SAG
Hello,

On Thu, Feb 22, 2018 at 1:46 PM, Vinícius Ferrão
 wrote:
>
> 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.

Have you tried using pungi? Pungi takes in a kickstart file as input
and generates an install media. I would give you an example but my old
pungi composes are based on < pungi-4.

Pungi creates install media, livemedia-creator creates live media,
what type of media are you trying to create?

https://fedoraproject.org/wiki/Remix
https://www.happyassassin.net/2016/02/15/pungi-4-the-new-generation-of-the-fedora-compose-tools-and-what-it-means-for-qa/



-- 
Arun S A G
http://zer0c00l.in/

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

Custom ISO with Kickstart and Local Repos

2018-02-22 Thread Vinícius Ferrão
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://www.redhat.com/mailman/listinfo/kickstart-list