Patching the Kernel

I need to patch the kernel in order to install ipset.

ipset instructions ask that I have the kernel source tree, configured and at least the modules compiled.

Would this mean I need to switch my Linode to use a pv-grub kernel?

If that's incorrect – what is the correct set of actions?

Should I download the newest kernel source and compile it?

I'm fairly comfortable with running a basic webserver, but this would be my first foray into modifying the kernel. I'm having trouble wrapping my head around the process (no pun intended).

2 Replies

@taron:

Would this mean I need to switch my Linode to use a pv-grub kernel?
Yes.

@taron:

Should I download the newest kernel source and compile it?
It needs to be configured to support pv_ops.

From the xensource wiki:

Using Xen/paravirt_ops

Building with domU support 4. Get a current kernel. The latest kernel.org kernel is generally a good choice.

  1. Configure as normal; you can start with your current .config file

  2. If building 32 bit kernel make sure you have CONFIGX86PAE enabled (which is set by selecting CONFIG_HIGHMEM64G)

    • non-PAE mode doesn't work in 2.6.25, and has been dropped altogether from 2.6.26 and newer kernel versions.
  3. Enable these core options: 4. CONFIGPARAVIRTGUEST

    1. CONFIG_XEN
  4. And Xen pv device support 4. CONFIGHVCDRIVER and CONFIGHVCXEN

    1. CONFIGXENBLKDEV_FRONTEND

    2. CONFIGXENNETDEV_FRONTEND

  5. And build as usual

@taron:

I need to patch the kernel in order to install ipset.

ipset instructions ask that I have the kernel source tree, configured and at least the modules compiled.

Would this mean I need to switch my Linode to use a pv-grub kernel?

If that's incorrect – what is the correct set of actions?
Actually all those instructions are asking you to do is to compile some modules for the existing kernel, which I believe you can do without switching to pv_grub.

Download the kernel source for whichever linode kernel you are running from http://www.linode.com/src/ and I think you can follow the instructions from there.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct