This discussion is archived
5 Replies Latest reply: Dec 19, 2012 12:37 PM by Avi Miller RSS

question about kernel specification in OL 5.x

EdStevens Guru
Currently Being Moderated
Creating sandbox machines under VirtualBox on my Win 7 Pro x86-64 desktop.

I've built and deleted scores of VM's running OL 5.7 and had no problems. At the point of configuring VBox Guest Additions, their instructions said to install (yum) a package called 'kernel-devel'. When I first started with VBox (migrating from VMworkstation) that didn't work and after a struggle with the VBox forum came up with package 'kernel-uek-devel-$(uname-r)'. Obviously the full package name gets completed when the shell expands $(uname -r).

Well, that made some sense, especially when I compared that to what I saw with 'uname -a':
[root@vblnxsrv02 ~]# uname -a
Linux vblnxsrv02.vbdomain 2.6.32-200.13.1.el5uek #1 SMP Wed Jul 27 21:02:33 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@vblnxsrv02 ~]#
But now I have a need to create a VM with OL 5.6. On that machine I see
[root@vblnxsrv01 cdrom]# uname -a
Linux vblnxsrv01.vbdomain 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@vblnxsrv01 cdrom]#
Note the lack of reference to 'uek'. So ... I figured that the package to install would be 'kernel-devel-$(uname-r)'. But that resulted in
No package kernel-devel-2.6.32-100.26.2.el5 available.
Nothing to do
After several trials and some more help from the VBox forum, I finally tried adding the uek spec to the package name.
[root@vblnxsrv01 cdrom]# yum -y install kernel-uek-devel-$(uname -r)
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel-uek-devel.x86_64 0:2.6.32-100.26.2.el5 set to be updated
--> Finished Dependency Resolution
After which the GA installation worked as expected.

So, with all that background, I'm wondering why 5.6 does not report 'uek' and 5.7 does, and they both need the 'uek' package for VBox guest additions. Dealing with kernel issues is a couple of layers of abstraction below where I normally work and so am not versed in the minutia there. On neither the 5.7 nor the 5.6 did I do anything beyond simply install from the downloaded .iso file.
  • 1. Re: question about kernel specification in OL 5.x
    Dude! Guru
    Currently Being Moderated
    The UEK kernel was introduced in OEL 5.5 and an optional package. With the release of 5.6, the product was renamed to OL and the UEK kernel became the default kernel.

    You can use the `uname-r` package argument to make sure to install a kernel package for your currently running kernel. However, availability of packages depends on your YUM repository configuration. What repositories do you have enabled?

    To see what packages are available for a given repository you can simply browse the directory listing in your web browser. To find out what it is, simply look inside the yum repository file to locate where the packages are stored. For instance, open http://public-yum.oracle.com/public-yum-el5.repo and you find, e.g. http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base.

    GA as far as I know means "general availability", which corresponds to release 5.0. I guess your 5.6 installation did not find kernel-uek-devel because you did not have the appropriate YUM configuraiton enabled. You can enable the [el5_latest] repository for all 5.x release and you will get the latest upgrades and patches, or enable [ol5_u6_base] only to restrict your packages to the default 5.6 distribution, without patches.

    You can download the latest public yum repository files from http://public-yum.oracle.com.
  • 2. Re: question about kernel specification in OL 5.x
    EdStevens Guru
    Currently Being Moderated
    Dude wrote:
    The UEK kernel was introduced in OEL 5.5 and an optional package. With the release of 5.6, the product was renamed to OL and the UEK kernel became the default kernel.
    I vaguely remember some discussion of that at the time. But it seems interesting that 5.6 doesn't include the 'uek' designation when reporting uname, but 5.7 does include it. That's what was throwing me off.


    Just as an additional observation, I just restored my vm back to the snapshot I took immediately after the initial OS load. As it boots up it reports
    Booting Oracle Linux Server (2.6.32-100.26.2.el5uek) ....
    But if you don't catch that at startup, uname says nothing of uek.

    >
    You can use the `uname-r` package argument to make sure to install a kernel package for your currently running kernel. However, availability of packages depends on your YUM repository configuration. What repositories do you have enabled?
    I tried it both ways. Either el5_latest or ol5_u6_base ... one or the other, never both at the same time.

    I've usually left the yum.repo (public-yum-el5.repo, in this case) at the default of 'latest', but in this case I'm trying to build a vm that mimics as closely as possible one of my physical production machines, and so thought it might be best to disable 'latest' and enable the release-specific block. Any thoughts, pros and cons?

    To see what packages are available for a given repository you can simply browse the directory listing in your web browser. To find out what it is, simply look inside the yum repository file to locate where the packages are stored. For instance, open http://public-yum.oracle.com/public-yum-el5.repo and you find, e.g. http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base.
    Ahha! And searching both shows all the 'kernel' packages are names as 'kernel-uek-*'. Thus, when I said to myself "This 5.6 install is not reporting itself as 'uek', so I need to drop that designation from the package name spec", I headed down the wrong path.
    GA as far as I know means "general availability", which corresponds to release 5.0. I guess your 5.6 installation did not find kernel-uek-devel because you did not have the appropriate YUM configuraiton enabled. You can enable the [el5_latest] repository for all 5.x release and you will get the latest upgrades and patches, or enable [ol5_u6_base] only to restrict your packages to the default 5.6 distribution, without patches.
    I'm sorry. When I mentioned "GA", I was referring to VBox "Guest Additions".
    You can download the latest public yum repository files from http://public-yum.oracle.com.
    To create my own yum server? Why would I not just continue to avail myself of the public server?


    I have one other observation, but need to re-run my entire install procedure to catch/document it. In any event, this has already helped quite a bit.
  • 3. Re: question about kernel specification in OL 5.x
    Avi Miller Guru
    Currently Being Moderated
    EdStevens wrote:
    So, with all that background, I'm wondering why 5.6 does not report 'uek' and 5.7 does, and they both need the 'uek' package for VBox guest additions.
    Because we got it wrong in the first release of the UEK (2.6.32-100 series) and fixed it for the second (2.6.32-200). It wasn't intentional. Note that the latest VBox Guest Additions actually identify when they're running on a UEK and suggest you install kernel-uek-devel. BTW, you don't need to add the `uname -r` -- yum will automatically install the correct kernel-uek-devel for whichever kernel is currently booted if you run yum install kernel-uek-devel by itself.
  • 4. Re: question about kernel specification in OL 5.x
    EdStevens Guru
    Currently Being Moderated
    Avi Miller wrote:
    EdStevens wrote:
    So, with all that background, I'm wondering why 5.6 does not report 'uek' and 5.7 does, and they both need the 'uek' package for VBox guest additions.
    Because we got it wrong in the first release of the UEK (2.6.32-100 series) and fixed it for the second (2.6.32-200). It wasn't intentional.
    Sometimes the explanation is much less technical than one would expect! :-)

    Note that the latest VBox Guest Additions actually identify when they're running on a UEK and suggest you install kernel-uek-devel. BTW, you don't need to add the `uname -r` -- yum will automatically install the correct kernel-uek-devel for whichever kernel is currently booted if you run yum install kernel-uek-devel by itself.
    Coincidentally I was ready for that very step on my latest run through this when I read your post. So I tried it. Notice the exact package it chose:
    [root@vblnxsrv01 yum.repos.d]# yum -y install kernel-uek-devel
    Loaded plugins: rhnplugin, security
    This system is not registered with ULN.
    ULN support will be disabled.
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package kernel-uek-devel.x86_64 0:2.6.32-300.39.1.el5uek set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    But VBox Guest Additions (GA) again complained and suggested kernel-devel-2.6.32-100.26.2.el5
    [root@vblnxsrv01 cdrom]# ./VBoxLinuxAdditions.run
    Verifying archive integrity... All good.
    Uncompressing VirtualBox 4.2.4 Guest Additions for Linux..........
    VirtualBox Guest Additions installer
    Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
    Building the VirtualBox Guest Additions kernel modules
    The headers for the current running kernel were not found. If the following
    module compilation fails then this could be the reason.
    The missing package can be probably installed with
    yum install kernel-devel-2.6.32-100.26.2.el5
    
    Building the main Guest Additions module                   [FAILED]
    Of course, we know at this point that there is no such package. Which was the other thing throwing me .. the package that VBox recommended does not exist.

    But following immediately, that:
    [root@vblnxsrv01 cdrom]# yum -y install kernel-uek-devel-$(uname -r)
    Loaded plugins: rhnplugin, security
    This system is not registered with ULN.
    ULN support will be disabled.
    Setting up Install Process
    Package matching kernel-uek-devel-2.6.32-100.26.2.el5.x86_64 already installed. Checking for update.
    Nothing to do
    After some more testing I found that if I just specified "install kernel-uek-devel" (with no further qualification) I had to have the yum repo file set to disable 'latest' and enable the version specific repository, else what got installed was not what VBox was happy with. If I left the yum repo file enabled for 'latest', then I would need to specify the exact package.

    This has all been very enlightening.

    Thanks to all.
  • 5. Re: question about kernel specification in OL 5.x
    Avi Miller Guru
    Currently Being Moderated
    EdStevens wrote:
    Coincidentally I was ready for that very step on my latest run through this when I read your post. So I tried it. Notice the exact package it chose:
    Ok, my bad. It was very early here when I replied and I blame lack of coffee. :) Not specifying a version pulls the latest kernel-uek-devel from the channel, not the one for the currently running kernel. Your original case of kernel-uek-devel-`uname -r` is better, if you want to keep the _latest channel enabled.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points