0

I am working on setting up a PXE based automated installation in our environment. As part of that, I want to install few additional packages via the kickstart file during the build. These packages aren't part of the standard ISO that CentOS provides (i.e.) it isn't available in the 'Packages' directory. So, I copied the required RPMs manually to the 'Packages' directory and ran 'createrepo --update .' but it didn't help. I looked around for any potential alternatives but couldn't find any.

I understand that I can install these packages via yum but I want them to be installed during the build and I don't want to mention these explicitly in the post install section as it defeats the purpose of having the %packages scriptlet in the kickstart file.

Any pointers on how to make the Packages directory in the CentOS ISO aware of the RPMs that I copied into it?

-Ram

1

You can create an additional repository directory in ISO structure (like for example High-Availability in RHEL7 ISO), and then put a pointer to it in kickstart file using "repo" option (see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax).

Additional packages can then be mentioned in %packages section.

  • Thanks for the response. Let me try that and will let you know how it goes – Ram Kumar Nov 19 '17 at 9:56
  • It works but still unable to get couple of packages installed. I am checking it further. On the other side, I was just curious, if there is a way to add these RPMs in Packages directory (given in the install media) and let them get installed from that source. I tried adding the RPMs to the 'Packages' directory but still it doesn't work. Any thoughts on that? Thanks once again for your response. – Ram Kumar Nov 23 '17 at 12:10
  • With rhel6, I did add them in Packages directory and it did work. Now with rhel7, I found cleaner to use 'repo' option and a separate repository. Don't you see anything relevant in /var/log/anaconda/ logs? – tonioc Nov 23 '17 at 12:19
  • I cannot find anything relevant to this issue in /var/log/anaconda/*.log. Yes, it makes sense to use the 'repo' option but I was wondering how to make the Packages directory one work... FWIW, my PXE build is not working properly and I am stuck on fixing that for now, once that's fixed. I will come back to this issue. – Ram Kumar Nov 23 '17 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.