My previous post about CentOS 5.3 ended up somewhat incomplete, and I wanted to finish up by showing how I did a little bit of troubleshooting to fix it. I now can install CentOS 5.3 64bit automagically just by selecting the entry from the PXEboot menu; Love it!
There were two problems with the kickstart file. If you read the previous posts you know that I copied the kickstart configuration file from a previous kickstart system I had for CentOS 4.4. I wasn't really surprised that it was kinda broken, as much as I was surprised that it just worked after a couple hiccups.
- The timezone command would not work, and consequently I got prompted to pick a locale before proceeding.
- The system also complained about 4 packages that weren't available.
The first problem was easy to fix, the original kickstart file called the timezone settings like this:
timezone --utc Etc/UTC
For some reason this didn't work well, we need these systems to be set to UTC, so adding a secific zone would make this problem go away but it wouldn't really accomplish what I want. For example, this would work:
According to someone:
It's impossible to set Etc/UTC time in kickstart as well and this this bug was
just introduced into Redhat 5.3 as well. Redhat 5.2 doesn't have this problem.
See this bug for more info.
Comments #13 & #14 explain exactly what happened here. The bug describes that this will be fixed in 5.4, but there is a workaround for now here's the workaround; it consists in setting a valid timezone first, then using the %post section to change it to something else with a tiny script.
So after my %post tag, I added the following ((Note that the grep call could be more elegant --as it is in the official doc, but I know this will work and I don't need a lot of flexibility)):
if grep -q '5.3' /etc/redhat-release then mv /etc/sysconfig/clock /etc/sysconfig/clock.ORIG sed 's@^ZONE.*@ZONE="Etc/UTC"@' \ /etc/sysconfig/clock.ORIG > /etc/sysconfig/clock /usr/sbin/tzdata-update fi
Great, timezone thing fixed! Now onto the other applications.
The four packages that failed were:
Apparently these have either been deprecated or renamed or sucked into some other package. To troubleshoot this I had to find out why we needed those in the first place.
Kernel-utils provides a number of utilities that we need for sure, namely: lmsensors, dmidecode and smartctl, probably others as well. The best way to find out if I needed to replace this package was to see if these tools were available on the 5.3 system I kickstarted after ignoring the warning about the missing package.
The easy ones first, dmidecode seems to be in the system already, I won't worry about it for now, smartctl in the other hand isn't. Smartmontools has smartctl in there so I'll add this package to the kickstart.
Next up lmsensors. I'm not sure why this failed, when I ran yum search it worked and trying to install it reported that it was already installed:
[root@localhost ~]# yum search lm_sensors Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: linux.mirrors.es.net * updates: linux.mirrors.es.net * addons: centos.g5selfstorage.com * extras: mirror.stanford.edu ================================================================================== Matched: lm_sensors ================================================================================== net-snmp-devel.i386 : The development environment for the NET-SNMP project. net-snmp-devel.x86_64 : The development environment for the NET-SNMP project. lm_sensors.i386 : Hardware monitoring tools. lm_sensors.x86_64 : Hardware monitoring tools. lm_sensors-devel.i386 : Development files for programs which will use lm_sensors. lm_sensors-devel.x86_64 : Development files for programs which will use lm_sensors. [root@localhost ~]# yum install lm_sensors Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: linux.mirrors.es.net * updates: linux.mirrors.es.net * addons: centos.g5selfstorage.com * extras: mirror.stanford.edu Setting up Install Process Parsing package install arguments Package lm_sensors-2.10.7-4.el5.x86_64 already installed and latest version Package lm_sensors-2.10.7-4.el5.i386 already installed and latest version Nothing to do
Maybe I had to specifically call for the 64bit version? Nope, that made no difference. Since the system has the package installed, I'm simply going to take it out of the kickstart file; perhaps its just part of the base installation.
VFlib2 is next up, I can't find a whole lot of information about this package for Centos5, it appears to be some sort of support library and I find threads and discussions about it up to Centos4.7. I think its safe to remove this.
Lastly, I have the two xorg related packages. After tracing this back, I found that these had to be added to our 4.4 installation to support installing cups. Similar to lmsensors, cups did install and seems to be working okay. Perhaps Anaconda is better at managing this dependency now? or the packages aren't required; either way I'm taking them out of the kickstart file for now.
Before trying again, I also added a few other packages that we've been missing in new kickstarted systems: rsync, telnet, tcpdump and findutils.
After making these changes, the kickstart installation completes all the way through without a problem.