Custom kernel for linux-vserver on Fedora 8

Information on getting linux-vserver working on Fedora 8 (F8) seems a bit lacking. While the packages are available (util-vserver), a custom kernel with the appropriate vserver patches must be built or a cryptic "Function not implemented" error will show up when trying to build the vserver guest.

To build the custom kernel, obtain the kernel and corresponding patch from the links provided at the linux-vserver web site. Then bunzip2 and untar the kernel to some appropriate location (I use /usr/src/kernels), e.g.:

  1. cd /usr/src/kernels
  2. bunzip2 linux-2.6.22.14.tar.bz2
  3. tar xvf linux-2.6.22.14.tar
  4. cd xvf linux-2.6.22.14
  5. patch -p1 ../patch-2.6.22.10-vs2.2.0.5.diff

The patch will give you an initial error, but that can be ignored since it corresponds to a mismatch in the kernel version (...14 vs the expected ...10). Edit the Makefile to change the EXTRAVERSION so it has your own string, I used ".14-vs" to remember it was for vserver.

Next create a symbolic link to the source since some packages look for the current kernel source in /usr/src/linux:

  1. ln -s /usr/src/kernels/linux-2.6.22.14-vs /usr/src/linux
  2. cd /usr/src/linux

Copy the .config file from the F8 supplied kernel and make a new config using the old config. This will help kernel compatibility with other F8 packages and configuration, e.g.:

  1. cp /usr/src/kernels/2.6.23.1-42.fc8-x86_64/.config /usr/src/linux
  2. make oldconfig

During the make oldconfig you will be asked for the new vserver options. Once make oldconfig completes you can use make menuconfig if you want additional changes to your kernel. Once completed, then make and install the kernel and modules using the following commands:

  1. make
  2. make modules_install install

Once those finish yor new kernel is ready to use. Note that by default the new kernel will not be used, you need to select it from the boot menu. If you want to make it start automatically then edit your /etc/grub.conf file and set the default to 0 (e.g. change default=1 line to default=0).

 

 

 

 

Comments

Thanks for the post

I just wanted to give my sincere thanks for this article. It saved me a great deal of time, trouble and aggravation.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.