Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: pv-grub for CentOS
PostPosted: Fri Jan 01, 2010 4:40 pm 
Offline
Newbie

Joined: Sat Dec 05, 2009 3:05 pm
Posts: 3
Location: Russia
Hi!

I want to use centos' kernel on my linode.

This howto http://library.linode.com/advanced/pv-grub-howto says me to run "update-grub".

I cannot find "update-grub" comaand on my CentOS 5.3.
How can I create required menu.lst?

Thanks,
Vladimir


Top
   
 Post subject:
PostPosted: Fri Jan 01, 2010 6:36 pm 
Offline
Junior Member
User avatar

Joined: Sat Sep 06, 2008 5:43 pm
Posts: 21
Location: Los Angeles, CA
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.

You will need to find a kernel based upon 2.6.27 or later.

Details can be found at the following URL.

http://wiki.xensource.com/xenwiki/XenParavirtOps

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.

_________________
Chet Burgess


Top
   
 Post subject:
PostPosted: Fri Jan 01, 2010 7:12 pm 
Offline
Newbie

Joined: Sat Dec 05, 2009 3:05 pm
Posts: 3
Location: Russia
cburgess wrote:
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


Top
   
 Post subject:
PostPosted: Fri Jan 01, 2010 8:07 pm 
Offline
Junior Member
User avatar

Joined: Sat Sep 06, 2008 5:43 pm
Posts: 21
Location: Los Angeles, CA
Linode's kernels are based on the mainline kernel and as far as I can tell are pretty close to pure vanilla. They may just be pure vanilla, but I seem to recall a post some where talking about the fact that they use the vanilla kernel and add a few patches to address a few issues Linode has run into.

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 CONFIG_PARAVIRT_GUEST.

As proof, from the latest Linode provided kernel.
Code:
# 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.
Code:
# 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 CONFIG_PARAVIRT_GUEST enabled).

Code:
# 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

_________________
Chet Burgess


Top
   
 Post subject:
PostPosted: Sat Jan 02, 2010 1:42 pm 
Offline

Joined: Sat Jan 02, 2010 1:30 pm
Posts: 1
I'm not sure how each kernel is compiled, but I'm succesfully running centos XEN kernel. You just need to manually create a grub.conf in /boot/grub. Here is mine (it uses the latest kernel RPM from Centos).

Code:
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:

Code:
0:2345:respawn:/sbin/agetty 38400 xvc0


Top
   
 Post subject:
PostPosted: Sat Jan 02, 2010 4:24 pm 
Offline
Junior Member
User avatar

Joined: Sat Sep 06, 2008 5:43 pm
Posts: 21
Location: Los Angeles, CA
Well I am surprised to hear that.

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.

_________________
Chet Burgess


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group