Trying the playground repository with Oracle Linux
Posted by Martin Bach on July 15, 2013
I’m always a great fan of trying new things and Oracle has made it a little easier a little while ago. In my early Linux days (SuSE Linux 6.0 was my first distribution, it was still kernel 2.0.36 but “2.2 ready”) compiling the kernel was more manageable than it is today. I even remember “make zImage” instead of the now default “make bzImage” and “make menuconfig” before that :) There was less complexity with hardware, and the initrd was more of a “nice to have” than a requirement with those PATA drives in my system.
Now it’s getting increasingly complex thanks to the rapid expansion of the Linux kernel and its features. Also, the vanilla kernel from kernel.org is rather large compared to 2.0.36 requiring a lot of horsepower and patience to build it. And if you are making large version jumps your binutils won’t be appropriate, and you might need a different glibc etc. In short, you have to replace your system’s core with something else, a somewhat frightening experience. Hence this process is not for the uninitiated and although I’d love to build a LFS (Linux from Scratch) system I simply don’t have the time to do so.
But if you are interested in seeing what’s happening in upstream development you can still do so in Oracle Linux. My system is 6.4 and I wanted to see what the latest kernel looks and feels like. You can get a compiled kernel plus its firmware and modules from Oracle’s public YUM repository.
WARNING Don’t follow these steps on anything but a lab system! Don’t go on and install a new kernel on a dev/test/uat/integration/prod/DR/whatever else box! This is for playing!
OK that should hopefully deter anyone from doing something silly. My lab VM for testing new things is-as I said before-Oracle Linux 6.4 in a VirtualBox environment. To enable the playground repository you need to edit /etc/yum.repos.d/public-yum-ol6.repo and enable the playground repository. Next I did a “yum search kernel” and voila, there is one! The version is 3.9.9-3.9.y.20130709.ol6.x86-64. From there on it’s child’s play:
[root@labvm1 ~]# yum install kernel
After a little bit of updating the system is ready. Careful though, the new kernel is the default kernel to boot off, check /etc/grub.conf for the new DEFAULT and change it back to the UEK 2 kernel just in case. A reboot is needed and sure enough, I have the option to use the new kernel:
Nice. After the system booted it announces the presence of 3.9.9 through a call to uname -r. To me it was great to see the system boot again, without a kernel oops or similar. This was rather often the case when I compiled my own kernels :)
CAUTION: this worked well in my VM. If you have 3rd party kernel modules (RAID controller, storage in general, virtio, etc!) then you may have to compile them from source if available as they certainly won’t appear in /lib/modules/$(uname -r). Any guest additions need to be reinstalled/recreated. I found the AHCI and pata_generic modules to be loaded successfully as well as the ethernet NICs to work in Virtualbox. When I have a little more time I’d like to repeat the test on KVM with libvirt for networking and storage-I wonder if they work out of the box.
Happy testing! I hope to release a few more posts when I figured out all the cool stuff that’s in the upstream kernel.