6,534
edits
Changes
get rid of <pre> tags -- use indentation instead
'''Note''': some of the paths below include $TOPDIR, which is distribution-dependent and can be further redefined by user. To find out the proper location on your system, issue this command:
=== Download ===
=== Installation ===
Install the downloaded SRC RPM with the following command:
After successfull installation, you can usually find kernel sources in <code>$TOPDIR/SOURCES/</code>
Put your patch into SOURCES directory with the following command:
Then open spec file <code>$TOPDIR/SPECS/kernel-ovz.spec</code> in the editor and add the following lines:
and
in appropriate places where similar text lines are.
This will help you to distinguish binaries then from already existing kernels
(or from the official OpenVZ kernels). To do so, edit the <code>$TOPDIR/SPECS/kernel-ovz.spec</code> file and replace the following line:
with something like
=== Modifying configs ===
If you want to modify the kernel config, you need to do the following before you continue with the next step "Building RPMs".
There you will find the configuration files in the subdirectory <code>config/*.config</code>. Copy the one you want to modifiy to <code>$TOPDIR/BUILD/kernel-2.6.18/linux-2.6.18/.config</code>. Then you can do a make menuconfig or something similar to adjust the kernel configuration. Afterwards copy
<code>$TOPDIR/BUILD/kernel-2.6.18/linux-2.6.18/.config</code> to the <code>$TOPDIR/SOURCES</code> directory, but use the corresponding file name in the target directory.
=== Building RPMs ===
To rebuild the kernel, type the following commands:
After successfull kernel compilation binary RPMs can be found at <code>$TOPDIR/RPMS/i686</code>.
=== Building ===
First, extract the kernel sources from archive:
Apply OpenVZ patches to the kernel:
Now we need to place the config and build the kernel:
=== Installation ===
After successfull a successful build of the kernel it can be installed on the machine with the following commands run under '''root''' user:<pre> # make install # make modules_install</pre>
Also you need to edit your GRUB or LILO config to make your kernel available for boot.