Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-20-2016, 06:54 PM   #1
LQ Newbie
Registered: Nov 2016
Posts: 2

Rep: Reputation: Disabled
Removing packages from a CentOS/RHEL ISO


A little background first - at work, we are migrating from Solaris to Red Hat. Because of where I work, I am unable to install Red Hat using the network. So, what I'm trying to do is create a bootable Red Hat ISO that contains only the packages I want on it, kind of a 'minimal install'.

The Red Hat DVD contains many packages on it, and the whole DVD is around 4 GBs. I want to remove the packages I will not need, reducing the size of the DVD. However, when I remove packages from it, I get errors when installing. I am using a kickstart file to install, and the installation gives me errors like "Error populating transaction, retrying 1/10".

I have done a lot of research on this problem, and have found out that I need to recreate the repo on the disc. Everything that I have tried has failed. I am using the createrepo command:

createrepo -g comps.xml -o /path/to/save/the/repo /path/to/packages
This command creates a 'repodata' directory in my ISO directory. I get the comps.xml file from the repodata directory on the Red Hat/CentOS disc, and just rename it 'comps.xml'.

If you can't download Red Hat, CentOS can be used in the same way, and it comes with similar files.

I think what I'm trying to do is create a 'custom spin' with only the packages I want (I saw that on a Fedora site).

Does anyone have any experience doing this, and can you offer me some help? I can post my kickstart file, or whatever you need to see.
Old 11-21-2016, 11:58 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
The procedure described in the Red Hat Deployment Guide (Section 8.4.6), seems to be much easier that what you have done.
1, create a folder and populate it with the packages you want from the repo.
2. cd to that folder and run createrepo --datebase (your folder path here) to create the database for the .iso.
3. go through the remaining sections of that guide for instructions on adding optional material
4. make your .iso
2 members found this post helpful.
Old 11-21-2016, 09:51 PM   #3
LQ Newbie
Registered: Nov 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks, that worked. I still don't know why I can't use the -g parameter to specify a comps.xml file though. I'm copying the comps.xml file directly from the disc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Removing Packages from RHEL 6 DVD kbscores Linux - Newbie 3 04-11-2013 04:20 PM
I want to add additional Third party packages to my CentOS 6.3 ISO image. gaytes Red Hat 1 08-22-2012 07:00 PM
CentOS Hardening - Removing Packages MartinPrestovic Linux - Newbie 11 05-11-2011 08:15 PM
Rpmbuild spec file for virtual rpm - removing obsolete packages - CentOS/RHEL 5.3 DrLove73 Linux - Software 3 10-10-2009 10:22 AM
Where do I get the xorg packages for RHEL/CentOS? abefroman Red Hat 6 05-09-2005 06:57 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration