I'm having a frustrating time with customizing my initial CentOS 5.5 installation. I want to have a specific set of the packages installed (e.g. I want Java and httpd but not OpenOffice or NewsServer) but each time I carefully go through all the customization screens on installation it seems to somewhat randomly select and deselect other options. I'm trying to write up a repeatable step-by-step doc but something isn't right.

I've tried picking just "Desktop - Gnome" or "Server GUI" or even none of them. Then I choose the "Customize now" option and go through each of the packages that I want. What's odd is what comes out after the reboot is different each time. Does it matter which default package group I choose if I'm going to customize the lists?

Another oddity happens if I try to customize after the fact. For instance, if I try to just remove OpenOffice, it removes Gnome as a side-effect. I didn't uncheck the Gnome box but it appears that since OpenOffice is dependent upon Gnome, it gets removed as well. This implies that I need to do a minimal install and build it up as needed.

Am I missing some core metaphor that the installer is using? I'm using the exact same DVD image each time so I'm confused why I'm having such different results. Also I'm using the graphical installation mode. Ideally I'd be able to create a kickstart config from a good install.

Any pointers would help. I tried this Q on unix.stackexchange.com but I don't think there is as much traffic there.

  • So does anyone actually use the Package Manager or is it just considered broken? No one has seemed surprised about the inconsistent behavior. – McKAMEY Feb 9 '11 at 1:00

The random selection of other packages is likely due to dependency resolution. Without knowing exactly what is being selected it is hard to say.

I too have a frustration with yum erase <package> / yum groupremove <group> wanting to remove packages that I think should remain installed. I don't know how to help you there, but hope someone else chimes in.

"Also I'm using the graphical installation mode. Ideally I'd be able to create a kickstart config from a good install."

I would try running system-config-kickstart and see if you can get a good file to start from here. If not, just install the OS with groups Base, X Window System, and Gnome Desktop and then see what you need to install using yum. From there, edit your Kickstart file and then test it until you are satisfied.

| improve this answer | |
  • Thanks, Aaron. It seems that the rule-of-thumb must be to never remove, only add packages. And Customize later since during install doesn't seem to work consistently. My target install is somewhere between Server-GUI and Desktop-Gnome. Do you know if you have to pick one of the default install groups? – McKAMEY Feb 9 '11 at 1:15
  • I had the most success with this process: 1. Uncheck all of the default package groups (e.g., "Desktop - GNOME"), 2. Choose "Customize now", 3. Add all packages you want to install but never remove anything that is already checked. – McKAMEY Feb 9 '11 at 2:50
  • No, you don't need to install any of the default groups. Installing less than Base can be tricky though because you will run into a LOT of missing packages. There is a hidden group you can use via Kickstart called "Core." This group is the bare minimum you need to boot to a Bash shell. – Aaron Copley Feb 9 '11 at 23:11
  • One more thing, if you want to see what packages are included with a particular group, use yum groupinfo <groupname>. Since what you want to end up with is somewhere between headless and a Gnome Desktop you mind be able to find just what you need out of X Window System and Gnome Desktop groups. – Aaron Copley Feb 9 '11 at 23:16

There is a slightly less documented option for kickstart that will install the minimum required packages (--nobase). After the option you can specify the packages you want and anaconda will find the dependencies.

more tricks and tips are available at: http://wiki.centos.org/TipsAndTricks/KickStart

| improve this answer | |
  • Yep, but don't forget to also specify @core since he's using 5.x. Sorry, I just commented about it above before seeing this answer. +1 for mentioning it. – Aaron Copley Feb 9 '11 at 23:19

I really like that you're trying to make this repeatable!

My rule is this:

Kickstart partitions the OS drive (if there are multiple) and installs enough to run the configuration management system of your choosing. Nothing more. Your config mgmt system takes care of adding the required packages. Start with system-config-kickstart and remove all packages except for your config mgmt system. This way it will install everything necessary for it to run, but nothing more (it may require some trial and error to get it perfect.)

This way your 'repeatable step-by-step doc' is actually programmatic.

| improve this answer | |
  • Thanks. Now that I've got a setup that I'm mostly happy with, I'll look into using it to configure kickstart. – McKAMEY Feb 9 '11 at 17:03

If you are looking for a repeatable install, use kickstart.

To define your kickstart, do a manual install on your reference system, installing only the minimum (I believe Base is the minimum). Then use yum to install only the components, and resulting dependencies, that you actually need.

Finally, take a listing of the RPMs installed in your system as so:

# rpm -qa --queryformat '%{NAME}.%{ARCH}\n'

Take that list, and specify those packages to be installed in the %packages section of your kickstart.

I specify the ARCH for the RPM list because if you are installing a x86_64 system, it is quite possible that you'll end up with both 64- and 32-bit packages of the same thing, and for some things, 32-bit only.

| improve this answer | |
  • Thanks. Now that I've got a setup that I'm mostly happy with, I'll look into using it to configure kickstart. – McKAMEY Feb 9 '11 at 17:04
  • 1
    @core is the minimum. Try it out some time! It doesn't get any more lightweight for a CentOS/Red Hat build. – Aaron Copley Feb 9 '11 at 23:17

The installer uses the repo metadata included on the disk and in the online repos in order to build the screens and determine dependencies. Examination of the metadata (perhaps with repoquery) will give you the information you seek.

| improve this answer | |

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.