Open main menu

OpenVZ Virtuozzo Containers Wiki β

Editing Compiling the OpenVZ kernel (the Debian way)

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
== Lenny and above ==
+
=== Build your own kernel-image (debian way) ===
  
Debian Lenny already includes an openvz kernel (linux-image-${version}-openvz-${arch}), so the manual compilation is not necessary in many cases.
+
==== Installing sources ====
  
== Installing sources ==
+
To install the kernel-source and the OpenVZ kernel patch, run:
 
 
On Etch, to install the kernel-source and the OpenVZ kernel patch, run:
 
 
  # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev
 
  # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev
  
For Lenny running kernels before 2.6.29 run the following:
+
==== Unpacking ====
# apt-get install kernel-package linux-source-2.6.18 linux-patch-openvz libncurses5-dev
 
Since kernel 2.6.29 the patch is now included in Debian kernel source.  Run only the following and ignore references to the patch further down this page:
 
# apt-get install kernel-package linux-source-2.6 libncurses5-dev
 
 
 
== Unpacking ==
 
  
 
Unpack the kernel source:
 
Unpack the kernel source:
Line 22: Line 15:
 
</pre>
 
</pre>
  
== Kernel config ==
+
==== Kernel config ====
  
 
You need a kernel config.
 
You need a kernel config.
Line 28: Line 21:
 
  # cp /boot/config-2.6.18-5-686 .config
 
  # cp /boot/config-2.6.18-5-686 .config
  
'''Or''' get a 2.6.18 kernel configuration from   
+
'''Or''' get a 2.6.18 kernel configuration from  http://download.openvz.org/kernel/branches/2.6.18/current/configs/ (depending on your architecture; the below example is for i686):
http://download.openvz.org/kernel/branches/2.6.18/current/configs/ (depending on your architecture; the below example is for i686):
 
 
  # wget http://download.openvz.org/kernel/branches/2.6.18/current/configs/kernel-2.6.18-i686.config.ovz -O .config
 
  # wget http://download.openvz.org/kernel/branches/2.6.18/current/configs/kernel-2.6.18-i686.config.ovz -O .config
  
== Patching and configuring ==
+
==== Patching and configuring ====
  
 
Now you can apply the openvz kernel patch and modify your kernel-config:
 
Now you can apply the openvz kernel patch and modify your kernel-config:
Line 39: Line 31:
  
 
You need the following OpenVZ kernel config settings:
 
You need the following OpenVZ kernel config settings:
 +
<pre>
 
(taken from OpenVZ Kernel 2.6.18-028test010.1 on 686)
 
(taken from OpenVZ Kernel 2.6.18-028test010.1 on 686)
  
<pre>
 
 
Filesystem
 
Filesystem
 
\_ [*] Second extended fs support (CONFIG_EXT2_FS)
 
\_ [*] Second extended fs support (CONFIG_EXT2_FS)
Line 80: Line 72:
 
See also : "make-kpkg --targets"
 
See also : "make-kpkg --targets"
  
== Compiling ==
+
==== Compiling ====
  
 
Compile your kernel (as user root, or you need the --rootcmd!)
 
Compile your kernel (as user root, or you need the --rootcmd!)
Line 87: Line 79:
 
  # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch
 
  # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch
  
== Installing ==
+
==== Installing ====
 
Install the kernel and update initramfs:
 
Install the kernel and update initramfs:
  
Line 97: Line 89:
 
{{Note|update-grub can be configured by /etc/kernel-img.conf}}
 
{{Note|update-grub can be configured by /etc/kernel-img.conf}}
  
== Bootloader ==
+
==== Bootloader ====
  
 
Update the bootloader (if not done before)
 
Update the bootloader (if not done before)
Line 107: Line 99:
 
{{Note|since the Debian Etch release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub}}
 
{{Note|since the Debian Etch release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub}}
  
LILO:
+
=== Installing the Tools and Configuring ===
 
 
# lilo
 
 
 
== Installing the Tools and Configuring ==
 
 
 
Continue with [[Installation on Debian#Installing the user-level tools]]
 
  
[[Category: Debian]]
+
Continue from here for Etch (current stable) : [[Installation_on_Debian_%28etch%29#Install_the_toolset]]
[[Category: Installation]]
 
[[Category: Kernel]]
 

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: