pv-grub for CentOS
I want to use centos' kernel on my linode.
This howto
I cannot find "update-grub" comaand on my CentOS 5.3.
How can I create required menu.lst?
Thanks,
Vladimir
6 Replies
You will need to find a kernel based upon 2.6.27 or later.
Details can be found at the following URL.
Personally I have been using the Linode provided kernels without much issue. The Linode folks seem to follow the Xen and kernel work pretty closely and release new kernels as they are released and are patching Xen issues as they come up.
So the question you should ask yourself is "Why do you want to run your own kernel?" You are going to have to put a lot of work into making your own kernel for CentOS 5.x work, why bother. Caker and team seem to be doing all the hard work for us CentOS 5.x users already.
Now to answer your specific question, you will need to look at the grubby command on CentOS 5.x to configure grub and generate your menu.lst file.
@cburgess:
You can't use the standard CentOS kernel with Linode. Linode uses newer versions of the Xen Hypervisor which require the domU kernels to support pv-ops. None of the CentOS 5.x kernels support pv-ops because they are all based upon the 2.6.18 kernel.
Mmm… Linode's kernel also based on 2.6.18 isn't it?
Centos repos contains kernel-xen-2.6.18-164.9.1.el5
I have found just 3 known letters from this package name (xen).
Could you please confirm that kernel-xen from centos is not suitable for linode.
Thank you,
Vladimir
CentOS 5.x kernels are all based on 2.6.18. RedHat's policy (CentOS is just RedHat rebranded) is to pick a kernel and use that as the base for all kernels in a given major release. Hence all 5.x kernels will be 2.6.18 based. All the numbers after 2.6.18 are release numbers. Over the lifetime of a distro RedHat patches all sorts of bugs in the kernel and back-ports all types of things. By the end of the release life cycles for a distro there could be 200-300+ releases of the kernel.
Since RedHat does all this to try and keep the feature set of the kernel in a distro consistent it is unlikely that they will support pv-ops in the 5.x kernels. As I recall the "old custom patches to make Xen work" that exist in the 2.6.18 and earlier kernels is incompatible with newer kernels and incompatible with pv-ops. As such introducing pv-ops at this point would probably break backwards compatibility, and would require a serious amount or work on RedHat's part.
You can check for yourself by looking for the required options in the kernels config. There are a number of options documented on the link I posted earlier, but the one that is unique for the pv-ops kernels is CONFIGPARAVIRTGUEST.
As proof, from the latest Linode provided kernel.
# uname -a
Linux xxx.xxx.xxx 2.6.32-linode23 #1 SMP Sat Dec 5 16:04:55 UTC 2009 i686 i686 i386 GNU/Linux
# zgrep -i CONFIG_PARAVIRT_GUEST /proc/config.gz
CONFIG_PARAVIRT_GUEST=y
and from the latest released CentOS 5.x kernels.
# ls -la /boot/config-2.6.18-164.9.1.el5*
-rw-r--r-- 1 root root 68697 Dec 15 20:33 /boot/config-2.6.18-164.9.1.el5
-rw-r--r-- 1 root root 68650 Dec 15 21:10 /boot/config-2.6.18-164.9.1.el5PAE
-rw-r--r-- 1 root root 68319 Dec 15 21:48 /boot/config-2.6.18-164.9.1.el5xen
# grep -i CONFIG_PARAVIRT_GUEST /boot/config-2.6.18-164.9.1.el5*
#
There is your confirmation. There is no pv-ops support at all in the CentOS 5.x kernels. In fact the whole notion of a "Xen" kernel no longer exist in the vanilla kernels as its now just a part of having enabled pv-ops. It is now possible to have a single kernel with pv-ops enabled that can run under Xen or on bare metal hardware. Fedora is now doing this (at least with version 12, not sure about earlier).
From the latest FC12 kernel we see that the standard PAE kernel also provides the kernel-xen (because it has CONFIGPARAVIRTGUEST enabled).
# rpm -q --provides -p ./kernel-PAE-2.6.31.9-174.fc12.i686.rpm
warning: ./kernel-PAE-2.6.31.9-174.fc12.i686.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 57bbccba
kernel = 2.6.31.9-174.fc12
kernel-drm = 4.3.0
kernel-drm-nouveau = 15
kernel-i686 = 2.6.31.9-174.fc12.PAE
kernel-modeset = 1
kernel-uname-r = 2.6.31.9-174.fc12.i686.PAE
kernel-xen = 2.6.31.9-174.fc12
linux-gate.so.1
linux-gate.so.1(LINUX_2.5)
kernel-PAE = 2.6.31.9-174.fc12
kernel-PAE(x86-32) = 2.6.31.9-174.fc12
default=1
timeout=5
#splashimage=(hd0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.9.1.el5xen)
root (hd0)
kernel /boot/vmlinuz-2.6.18-164.9.1.el5xen ro root=/dev/xvda selinux=1
initrd /boot/initrd-2.6.18-164.9.1.el5xen.img
If you don't use SELInux, put selinux=0
You have to make a symbolic link names menu.lst to grub.conf in that directory.
In the linode profile properties disable "xenify distro". Also, in order for linode console to show login prompt, you have to add the following to the inittab:
0:2345:respawn:/sbin/agetty 38400 xvc0
I guess RedHat actually back ported the pv-ops stuff to their kernel. I don't have a Linode to test this out at this time, but I guess it works.
@cburgess:
So the question you should ask yourself is "Why do you want to run your own kernel?" You are going to have to put a lot of work into making your own kernel for CentOS 5.x work, why bother. Caker and team seem to be doing all the hard work for us CentOS 5.x users already.
The simple answer in our use-case scenario - i.e., Web hosting - is the use of Kernel modules. Specifically: the NetFilter Connection Tracking Kernel module nfconntrackftp