VMware Cloud Community
karo9pare
Contributor
Contributor

How to add new .rpm install from the iso image

Hi,

I know how to modify the iso image to put a new kickstart file in it.

I would like to know the procedure on how to add a new .rpm install from the iso image installation?

Thank you.

Any help, idea will be appreciate.

0 Kudos
3 Replies
karo9pare
Contributor
Contributor

In other word, is there a method to add a script file on the official build and that this script file will be copied on /tmp?

Thanks.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

You would need to modify the %packages part of your kickstart file and add in the package by name. For example, if you wanted samba you could add:

samba-common

Note the version number, architecture and rpm extension are not mentioned.

Best regards,

Edward

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
c_henry
Enthusiast
Enthusiast

There's a number of ways to do it. The simplest is to add some scripting in the %post section of your ks.cfg file which will mount a share to pull down the file and execute it, something like this:

\# Mount the kickstart server /kickstart directory

mkdir $\{KSPATH}

service portmap start

echo -e "\nMounting $\{KSSERVER}:/kickstart to $\{KSPATH}\n"

mount -o ro -t nfs $\{KSSERVER}:/kickstart $\{KSPATH}

\# Check we can find our install script, if so execute it

if \[ -f $\{KSPATH}/redhat-releases/$\{OS_VERSION}/rbs/esx.sh ]; then

echo "Running esx.sh..."

$\{KSPATH}/redhat-releases/$\{OS_VERSION}/rbs/esx.sh

else

echo "Configuration file: $\{KSPATH}/redhat-releases/$\{OS_VERSION}/rbs/esx.sh not found. Exiting."

exit 1

fi

The other way is to place the script within an RPM and include that RPM in the ISO image. If your installing from a server, as above, using NFS or HTTP etc, then you don't need to re-create the ISO image but you would need to regenerate the build and edit the comps file so that your RPM gets installed at build time.

0 Kudos