Difference between revisions of "Install kernel from RPM on Ubuntu 10.04"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(Installation)
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
== Installation ==
 
== Installation ==
1. Get the latest kernel and utils from [[Download/kernel/rhel6]] and [[Download/utils]]. You need  
+
1. Get the latest kernel from [[Download/kernel/rhel6]]. You need  
 
* vzkernel
 
* vzkernel
 
* vzkernel-devel
 
* vzkernel-devel
 +
<code>vzkernel-devel</code> is optional.
 +
 +
For newer kernels with [[ploop]]-support you will not be able to use the vzctl package that comes with Ubuntu 10.04. So download the following rpm-packages from openvz.org as well
 +
* ploop
 +
* ploop-lib
 +
* vzctl-core
 
* vzctl
 
* vzctl
* vzctl-lib
 
 
* vzquota
 
* vzquota
<code>vzkernel-devel</code> is optional.
+
 
  
 
2. Install fakeroot and alien.
 
2. Install fakeroot and alien.
 
  apt-get install fakeroot alien
 
  apt-get install fakeroot alien
  
3. Convert all the RPMs to debs using alien.
+
3. Convert all the RPMs to debs using alien and install the converted kernel
  fakeroot alien --to-deb --scripts --keep-version vz*.rpm
+
  fakeroot alien --to-deb --scripts --keep-version *.rpm
 +
dpkg -i vzkernel*deb
 +
 
 +
4a. Install vz utils ('''only if you did not download vzctl and vzquota from openvz.org''')
 +
apt-get install vzctl vzquota
 +
 
 +
'''OR'''
  
4. Install debs.
+
4b. Download and install [http://packages.ubuntu.com/precise/libcgroup1 libcgroup1] from the Ubuntu 12.04 repository for your architecture if you plan of using current versions of vzctl
  dpkg -i vz*.deb
+
wget http://mirror.pnl.gov/ubuntu//pool/universe/libc/libcgroup/libcgroup1_0.37.1-1ubuntu10_i386.deb
 +
  wget http://mirror.pnl.gov/ubuntu//pool/universe/libc/libcgroup/libcgroup1_0.37.1-1ubuntu10_amd64.deb
  
5. Modify <code>/boot/grub/menu.lst</code> like this. This heavily depends on your enviornment. Please modify. See also “configuring the bootloader” of [[Quick installation]].
+
dpkg -i libcgroup1*deb
 +
dpkg -i ploop*deb vzquota*deb vzctl*deb
 +
 
 +
6. Modify <code>/boot/grub/menu.lst</code> like this. This heavily depends on your enviornment. Please modify. See also “configuring the bootloader” of [[Quick installation]].
 
  default        0
 
  default        0
 
  timeout        3
 
  timeout        3
Line 33: Line 48:
 
  initrd          /boot/initrd.img-2.6.32-38-server
 
  initrd          /boot/initrd.img-2.6.32-38-server
  
6. Edit <code>/etc/sysctl.conf</code>. See “sysctl” of [[Quick installation]].
+
6b. If using grub2, please modify <code>/etc/default/grub</code> and change GRUB_DEFAULT to whatever your new grub entry is named (check your menuentrys in /boot/grub/grub.cfg)
 +
"GRUB_DEFAULT="Ubuntu, mit Linux 2.6.32-042stab061.2"
  
7. Make OpenVZ boots automatically.
+
7. Edit <code>/etc/sysctl.conf</code>. See “sysctl” of [[Quick installation]].
 +
 
 +
8. Make OpenVZ boots automatically.
 
  update-rc.d vz defaults
 
  update-rc.d vz defaults
 
  update-rc.d vzeventd defaults
 
  update-rc.d vzeventd defaults
  
8. Reboot.
+
9. If you plan to use LVM2, make sure the module dm-mod is loaded at startup:
 +
echo "dm-mod" >> /etc/modules
 +
 
 +
10. Reboot.
 
  reboot
 
  reboot
  
9. Follow the [[Quick installation]] from “installing OS template caches”.  
+
11. Follow the [[Quick installation]] from “installing OS template caches”.
 +
 
 +
11b. rsyslog probably won't work (it depends on a debian-specific kernel-hack). See
 +
[http://forum.linode.com/viewtopic.php?p=32053] on how to get it working again.
  
10. See also [[Common Networking HOWTOs]].
+
12. See also [[Common Networking HOWTOs]].
  
 
[[Category: HOWTO]]
 
[[Category: HOWTO]]

Latest revision as of 12:27, 25 February 2013

You can use the latest RHEL6-based kernel builds on your Ubuntu 10.04 machine. Here's how.

Installation[edit]

1. Get the latest kernel from Download/kernel/rhel6. You need

  • vzkernel
  • vzkernel-devel

vzkernel-devel is optional.

For newer kernels with ploop-support you will not be able to use the vzctl package that comes with Ubuntu 10.04. So download the following rpm-packages from openvz.org as well

  • ploop
  • ploop-lib
  • vzctl-core
  • vzctl
  • vzquota


2. Install fakeroot and alien.

apt-get install fakeroot alien

3. Convert all the RPMs to debs using alien and install the converted kernel

fakeroot alien --to-deb --scripts --keep-version *.rpm
dpkg -i vzkernel*deb

4a. Install vz utils (only if you did not download vzctl and vzquota from openvz.org)

apt-get install vzctl vzquota

OR

4b. Download and install libcgroup1 from the Ubuntu 12.04 repository for your architecture if you plan of using current versions of vzctl

wget http://mirror.pnl.gov/ubuntu//pool/universe/libc/libcgroup/libcgroup1_0.37.1-1ubuntu10_i386.deb 
wget http://mirror.pnl.gov/ubuntu//pool/universe/libc/libcgroup/libcgroup1_0.37.1-1ubuntu10_amd64.deb
dpkg -i libcgroup1*deb
dpkg -i ploop*deb vzquota*deb vzctl*deb

6. Modify /boot/grub/menu.lst like this. This heavily depends on your enviornment. Please modify. See also “configuring the bootloader” of Quick installation.

default         0
timeout         3

title           Ubuntu 10.04.3 LTS with OpenVZ, kernel 2.6.32-042stab044.17
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-042stab044.17 root=/dev/sda1 ro console=tty0
initrd          /boot/initrd.img-2.6.32-042stab044.17

title           Ubuntu 10.04.3 LTS, kernel 2.6.32-38-server
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-38-server root=/dev/sda1 ro console=tty0
initrd          /boot/initrd.img-2.6.32-38-server

6b. If using grub2, please modify /etc/default/grub and change GRUB_DEFAULT to whatever your new grub entry is named (check your menuentrys in /boot/grub/grub.cfg)

"GRUB_DEFAULT="Ubuntu, mit Linux 2.6.32-042stab061.2"

7. Edit /etc/sysctl.conf. See “sysctl” of Quick installation.

8. Make OpenVZ boots automatically.

update-rc.d vz defaults
update-rc.d vzeventd defaults

9. If you plan to use LVM2, make sure the module dm-mod is loaded at startup:

echo "dm-mod" >> /etc/modules

10. Reboot.

reboot

11. Follow the Quick installation from “installing OS template caches”.

11b. rsyslog probably won't work (it depends on a debian-specific kernel-hack). See [1] on how to get it working again.

12. See also Common Networking HOWTOs.