How to inject a utility in to the base RHEL 6 image?

Soldato
Joined
18 May 2010
Posts
22,857
Location
London
I am trying to provision a bare metal system which has a raid attached to it. (I believe* it's a hardware raid)

During the kickstart we have a script that runs. It's a bash script. At the moment we have hit an issue where it is complaining it cant find a file ion the local disc.

A comment in the script says: # Requires a version of install.img patched to include hpacucli.

We have the hpacucli.rpm file.

I'm looking for information how to inject this in to a base RHEL 6 image.

I can find info on how to add rpms to the based RHEL image but not sure if it's the same thing or not.

I was looking at this I have to paste the content as the guide is from Red Hat and you wont be able to login to it:


Using original ISO rhel6.10-dvd.iso
Mount the ISO

mount -t iso9660 -o loop ./ rhel6.10-dvd.iso /storage/temp/ISO/

# mkdir "/var/tmp/rhel6.9"
# cd "/storage/temp/ISO/"
# cp -rPf * "/var/tmp/rhel6.9"
# cd "/var/tmp/rhel6.9"
# mkisofs -r -T -J -V "rhel6.9" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-o /home/images/rhel-server-6.9-jr-x86_64-dvd.iso

I assume somewhere in there before rebuilding the image I can drop the .rpm file in to a directory?

The other thing is this application needs to be installed as if part of the base image not something installed as a part of the kickstart. The installer wont get that far as it needs this application to build the array before it even gets to doing what's in the kickstart.

There is also this but I am not sure if it is what I want as the utility will only be available to install not already installed which is what I want.

Thanks
 
Last edited:
I've added RPMs onto a RHEL ISO before now (to get around bugs in the RHEL 7.3 release's firewalld packages springs to mind) by creating a separate directory in the ISO structure and then mounting and installing from %post in the kickstart but that is not what you want here. The sequence of commands you give is only dropping the extra packages in the root of the DVD ISO and is not incorporating them into the actual installation image img file. I would also note that the mkisofs command given will probably not create an ISO which is bootable under both legacy and UEFI modes.

What it sounds like you need to do is somehow install the package during %pre so it is available during the initial part of the install so can be used by the installer. I.e. when you are running in memory using the extracted install.img on a ramdisk. Now you should be able to access the content of the ISO whilst in that environment so be able to get into the file if its on the DVD but that doesn't necessarily mean you would be able to install it. It sounds like you would need to reauthor the install.img file or you may even need to extract the RPM and copy in the files manually if you don't have the necessary commands available at that point in %pre (I haven't looked and currently I'm installing a new Satellite server in my lab environment so don't have the necessary things available to look now).

Personally I'd author an ISO with the RPM on and then shell out during an install and see what commands and methods are available during those initial parts of the install.

edit:
In fact you sequence of commands seems to only mount an ISO, copy its content to another directory, and then author an ISO from that directory with no changes ... it doesn't add anything?
 
Last edited:
Back
Top Bottom