The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Yum keeps upgrading kernel

Discussion in 'General Discussion' started by web12, Oct 23, 2006.

  1. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    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.
     
  3. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  4. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    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.
     
  6. web12

    web12 Well-Known Member

    Joined:
    Nov 20, 2002
    Messages:
    240
    Likes Received:
    0
    Trophy Points:
    16
    Brilliant Chripy

    Thanks for that.

    regards
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    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.
     
  8. nslink

    nslink Member

    Joined:
    Oct 25, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  9. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  10. nslink

    nslink Member

    Joined:
    Oct 25, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  11. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    What is your distribution?
     
  12. nslink

    nslink Member

    Joined:
    Oct 25, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    CentOS4.4 is what i am running
     
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    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.
     
  14. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Kenneth,

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

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator

    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.
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Many thanks ;)
     
  17. Jones

    Jones Well-Known Member

    Joined:
    Jul 10, 2004
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
  18. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    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
     
Loading...

Share This Page