web12

Well-Known Member
Nov 20, 2002
240
0
166
Hi

Can someone explain to me why yum keeps updating the kernel on my machines?

I always put kernel* in the exclude line of the yum.conf as I prefer to compile from source rather than using yums rpm, but every morning i find that the kernel* has been removed from the exclude line and the upcp has attempted to update the kernel.

I find entries in both grub.conf and lilo.conf and now im not sure what kernel will load when i reboot the server (?)

Can anyone shed any light on this?

Thanks
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
30
473
Go on, have a guess
cPanel has been making changes to the scripts that update the OS vendor update applications (/scripts/checkyum and /scripts/checkup2date for example) and it looks like on some releases they've mucked up the list to not exclude kernel updates. Make sure you're running the latest of your tree of cPanel and if the problem still continus I'd suggest logging the issue with cPanel.
 

web12

Well-Known Member
Nov 20, 2002
240
0
166
Hi Chirpy

Yep, im using the latest Release version.
Is there anyway of checking which kernel will be loaded on boot?

The lilo.conf is stating the correct kernel, but grub.conf isnt (2.4 kernel instead of 2.6)

Cheers
 

web12

Well-Known Member
Nov 20, 2002
240
0
166
Just to update, I just ran checkyum from the command line and it added the correct kernel entries to the exclude line, so it appears that this may have been fixed now.

Thanks
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
30
473
Go on, have a guess
Good stuff. You should sort out which bootloader is used by the server. A simple way of doing that is to take the device that /boot is one and do:

dd if=/dev/hda bs=512 count=1 2>&1 | grep GRUB
dd if=/dev/hda bs=512 count=1 2>&1 | grep LILO


Where /dev/hda is replaced with your boot device (may be /dev/sda for example). You'll then know whether to ignore LILO or GRUB configuration files as only one will be relevant to your server.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
In recent builds of cpanel (stable, release, current) the handling of the exclude line within yum.conf changed. In part this is because of the disparate versions of yum used on the distributions we support. When cPanel updates itself, it adds various kernel specific entries to the exclude line in yum.conf. After performing the update, these entries are removed.

This has caused problems for some people that also run a nightly yum update, or that perform it manually, because the kernel is no longer exluded. I don't know if it reached any of the recent releases, but I know work was under way to allow the kernel exclusions to remain it that is what the system adminsitrator wants.

With grub, the default directive in /boot/grub/menu.lst denotes which entry is the default kernel. The list is 0 based. So if the default directive is "default 3" look for the 4th kernel directive entry.
 

nslink

Member
Oct 25, 2002
8
0
151
Going back to the kernel keeps updating. I just installed cpanel and the kernel keeps updating.

I ran /scripts/checkyum and the following was added to the /etc/yum.conf

exclude=apache* courier* exim* httpd* kernel kernel-smb kernel-hugemem mod_ssl* mysql* perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail*


I added a * to the end of kernel, kernel-smb, kernel-hugemem and then ran /scripts/upcp then the /etc/yum.conf file changed to exclude=apache* courier* exim* httpd* mod_ssl* mysql* perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail* and it STILL installed the new kernel. Is there anyway to disable the kernel updating from the scripts itself or disable yum running during upcp?
 

lloyd_tennison

Well-Known Member
Mar 12, 2004
698
1
168
Exactly what is the name of the file is is updating? Is it in the format of the files shown? Sounds real strange, but maybe some specific info of exactly what is is updating from and to might help.
 

nslink

Member
Oct 25, 2002
8
0
151
I am running /scripts/upcp to update the system and it's removing kernel from the /etc/yum.conf exclude area. When I run /scripts/checkyum it adds the kernel, but it doesn't work because there is no wildcard.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
I am running /scripts/upcp to update the system and it's removing kernel from the /etc/yum.conf exclude area. When I run /scripts/checkyum it adds the kernel, but it doesn't work because there is no wildcard.
What is your distribution?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
cPanel builds since 10-12-2006 have a fix for this. It is documented in bug 4697 Please use the fix and report whether it works for you.

I've not been able to duplicate what is reported in this thread, despite testing on CentOS 3, 4, FC 1-5 and RedHat 7.3 The kernel is always excluded during a /scripts/upcp run, whether started manually or via cron. /scripts/checkyum actually requires a command line parameter to work properly.

Package names added to the exclude directive in yum.conf don't necessarily need the wild card stipulated in order to work, as long as the package name is fully qualified. That is why you will see "kernel kernel-smb kernel-hugemem." This blocks the actual kernel packages from being installed during /scripts/upcp but does not block the kernel-utils package.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
Kenneth,

Does that include a fix for the typo which lists kernel-smb which ought be kernel-smp?

Didn't you read about the new kernel-samba mode? :D NO, I just grepped /scripts/checkyum on a fresh install of R57 and it still excludes kernel-smb. I'll report it to the proper person right now. Thanks for that.

[few minutes later]
Ok, baring incident, that fix should be int he next builds.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
Sorry to bump this old old thread but I rather stay in 1 thread instead of opening another one.

This still not fixed.

Bug submitted so CPanel can check it: http://bugzilla.cpanel.net/show_bug.cgi?id=7553



Jones
For those that wander into this thread, this issue was resolved long ago. To preserve the kernel entry in the the exclude line of yum.conf, perform the following:

touch /var/cpanel/checkyum-keepkernel