The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
RHEL5 Kernel HOWTO
Introduction
This HOWTO will show you how to get a RHEL5-based OpenVZ kernel running on a Funtoo Linux system.
Step 1: Downgrade No results, No results
Downgrade udev to a version compatible with kernels previous than 2.6.27:
root # echo ">=sys-fs/udev-147" >> /etc/portage/package.mask root # emerge -u udev
This will also require a downgrade of lvm2, if you are using it. Version 2.02.68 is a good one to use:
root # echo ">=sys-fs/lvm2-2.02.69" >> /etc/portage/package.mask root # emerge -u lvm2
Downgrade make to a version compatible with older kernel version:
root # echo ">=sys-devel/make-3.82" > /etc/portage/package.mask root # emerge -u make
Step 2: Install binary kernel
The process for installing an RHEL5-based kernel with OpenVZ support has been drastically simplified. Simply perform the following steps:
root # echo "sys-kernel/openvz-rhel5-stable binary" >> /etc/portage/package.use
This will result in the kernel sources and a binary kernel and initrd being merged. Without binary
in USE, only the sources will be merged. Then:
root # emerge openvz-rhel5-stable
This will build and install a binary kernel image and initial RAM disk, and take care of installing all necessary dependencies like gcc-4.1.2. Once the binary kernel image and initrd is installed, configure /etc/boot.conf
to find and boot the new kernel.
Note: you may need to temporarily modify your CFLAGS
settings to ensure they are compatible with gcc-4.1 systems. In particular, -march=native
is not recognized by the older gcc.
Step 3: Enable vz initscript
When your system boots with OpenVZ support enabled, it will require /etc/init.d/vz
to run:
root # rc-update add vz default
Step 4: Edit boot.conf
Update /etc/boot.conf
to point to your new kernel, ie:
{{{body}}}
Note that you must use the
params += real_root=auto
option. This will automatically configure your boot loader to specify your root file system as the
real_root
to the initrd.
Step 5: boot-update
Now, simply run boot-update
as root:
root # boot-update
boot-update should show the new kernel as being found and display it as the default selection for the next boot. You can now reboot your system and start using OpenVZ.