The purpose of this post is to Install a specific package that can’t be installed while using Kickstart during the %Packages stage, instead, it can be installed on the %Post Installation Stage.
There are 2 cases here:
A) Trying to install a package during Kickstart installation (which package is in the media ), fails with a message like the below:
You have specified the package 'XXXX' should be installed. This package does not exist. Would you like to continue or abort your installation?
B) If a package is needed but not present in the installation media, it could be provided from another source ( like an FTP or HTTPD server), the package can be added in the %Post Installation Stage to get installed with the Kickstart file.
This workaround here is to install the package during the %Post Installation Stage. Create lines as shown below at the end of the ks.cfg file:
A) If the package is already in the installation media it should be added in the %Post Installation Stage.
# First way: %post --log=/root/my-post-log # To get a log of the installation mount /dev/cdrom /mnt # mont the disk/imagen on the %Post Installation Stage. rpm -Uvh /mnt/Packages/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm %end
B) Providing the package from a external site( add it on %Post Installation Stage.).
# Second way copy the package from a http server that you installed or from another place. %post --log=/root/my-post-log # To get a log of the installation cd /var/tmp |/usr/bin/wget http://10.157.XX.XX/OL6.3_x86_64/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm rpm -ivh /libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm %end
After reboot the installation can be checked with the log file created during the %Post Installation Stage, it to confirm the package installation.
Example
# cat /root/my-post-log mount: block device /dev/sr0 is write-protected, mounting read-only warning: /mnt/Packages/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ################################################## libtool-ltdl-devel ################################################## --2016-07-28 16:23:35-- http://10.157.XX.XX/OL6.3_x86_64/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm Connecting to 10.157.XX.XX:80... connected. HTTP request sent, awaiting response... 200 OK Length: 165708 (162K) [application/x-rpm] Saving to: 'libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm' 0K .......... .......... .......... .......... .......... 30% 30.0M 0s 50K .......... .......... .......... .......... .......... 61% 19.5M 0s 100K .......... .......... .......... .......... .......... 92% 32.2M 0s 150K .......... . 100% 28.4M=0.006s 2016-07-28 16:23:35 (26.1 MB/s) - 'libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm' saved [165708/165708] warning: libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ################################################## package libtool-ltdl-devel-2.2.6-15.5.el6.x86_64 is already installed
Also is possible to confirm the installation with RPM command:
# rpm -qa | grep libtool libtool-ltdl-2.2.6-15.5.el6.x86_64 libtool-ltdl-devel-2.2.6-15.5.el6.x86_64