Difference between revisions of "Installation on Ubuntu"

From Linux-VServer

Jump to: navigation, search
(Undo revision 3502 by 194.8.74.235 (Talk))
(Binary Packages for Intrepid and Hardy)
Line 1: Line 1:
== Check Ubuntu's Wiki ==
+
== Disclaimer ==
 +
If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: [[Installation_on_Linux_2.6]]
  
There are howtos on Ubuntu's site that describe how to download pre-built, Ubuntu-specific kernels.
+
The binary kernel images provided here are neither official ubuntu nor official vserver kernel images.  
  
  http://help.ubuntu.com/community/VServer
+
If you have any problems with those kernels please send a mail to the Vserver [http://list.linux-vserver.org/ mailinglist] and please '''do not file any bugs on the ubuntu bugtracker'''.
  
More detailed instructions on the u32 kernel can be found on http://wiki.u32.net/Ubuntu-VServer
+
If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the Vserver [http://list.linux-vserver.org/ mailinglist].
  
== Vserver Kernel on Ubuntu Dapper with grsecurity ==
+
== Intrepid ==
 +
Intrepid ships with kernel version 2.6.27. As of now (4.3.2009) there are only experimental patches available for this kernel version.
  
=== Prerequisites ===
+
I have adapted version 2.3.0.36.4 of the vserver patch to the Intrepid kernel sources. These images should be considered '''experimental''' but seems to work.
  
* 32 Bit Ubuntu Dapper.
+
The util-vserver package from intrepid seems to be broken (see: [https://bugs.launchpad.net/ubuntu/+source/util-vserver/+bug/338390 Ubuntu Bug]), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another [https://bugs.launchpad.net/ubuntu/+source/dietlibc/+bug/254790 Ubuntu Bug].
* installed packages:
+
  
apt-get install build-essential gcc make g++ libncurses5-dev
+
=== Packages ===
 +
The following packages are available for i386 and amd64:
  
=== Howto Devel 2.6.17.14-vs2.0.2.1-grsec2.1.9 ===
+
* linux-headers-2.6.27-11-vserver
 +
* linux-headers-vserver
 +
* linux-image-2.6.27-11-vserver
 +
* linux-image-vserver
 +
* linux-restricted-modules-2.6.27-11-vserver
 +
* linux-vserver
 +
* util-vserver
  
==== Get the Kernel ====
+
=== Known Limitations ===
* Kernel files + patch from http://linux-vserver.org/
+
* linux-image
** get linux-2.6.17.14.tar.bz2 und patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff
+
** CONFIG_AUFS has been disabled
*** http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.14.tar.bz2
+
*** http://people.linux-vserver.org/~harry/patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff
+
cd /usr/src/ && mkdir kernel && cd kernel
+
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.14.tar.bz2
+
wget http://people.linux-vserver.org/~harry/patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff
+
tar xfjv linux-2.6.17.14.tar.bz2
+
cd linux-2.6.17.14
+
  
==== Patch the Kernel ====
+
=== Repository ===
cat ../patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff | patch -p1
+
You can add the following key to your apt keyring:
cp /boot/vmlinuz-2.6.15-26-server
+
make oldconfig
+
make menuconfig
+
  
==== Make the Kernel ====
+
  <nowiki>wget -O - http://ubuntu-vserver.pingworks.net/ubuntu-vserver.pubkey | sudo apt-key add -</nowiki>
  make # this will take a long time
+
make install
+
make modules_install
+
mkinitramfs -o /boot/initrd.img-2.6.17.14-grsec2.1.9-vs2.0.2.1 2.6.17.14-grsec2.1.9-vs2.0.2.1
+
vi /boot/grub/menu.lst
+
The Boot entry should look like this
+
title          Ubuntu, 2.6.17.14-vs2.0.2.1-grsec2.1.9
+
root            (hd0,0)
+
kernel          /boot/vmlinuz-2.6.17.14-grsec2.1.9-vs2.0.2.1 root=/dev/sda1 ro quiet splash
+
initrd          /boot/initrd.img-2.6.17.14-grsec2.1.9-vs2.0.2.1
+
savedefault
+
boot
+
  
==== Test the Kernel ====
+
Add the following line to your sources.list:
  
* boot Kernel
+
i386:  
* ''uname -r'' should show
+
2.6.17.14-grsec2.1.9-vs2.0.2.1
+
* run Testscripts
+
* http://oldwiki.linux-vserver.org/TestScripts
+
  
== Alternate Method ==
+
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/intrepid/binary-i386 ./</nowiki>
  
This is based on [http://oldwiki.linux-vserver.org/UbuntuVserverHowTo UbuntuVserverHowTo] on the old wiki, updated with new links that work as of December 2006.
+
amd64:  
  
This is NOT COMPLETE -- remove this message when you get it to work!
+
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/intrepid/binary-amd64 ./</nowiki>
  
==== Get the Kernel ====
+
=== Installation ===
apt-get install linux-source-2.6.17 kernel-package linux-kernel-devel
+
cd /usr/src
+
tar xjvf linux-source-2.6.17.tar.bz2
+
  
==== Patch the Kernel ====
+
aptitude update
  cd linux-source-2.6.17/
+
  aptitude install linux-image-vserver linux-headers-vserver util-vserver
wget http://vserver.13thfloor.at/Experimental/OLD-2.0/patch-2.6.17.13-vs2.0.2.1.diff
+
patch -p1 < *diff
+
vi Makefile
+
fix the EXTRAVERSION to be -vs2.0.2
+
cp /boot/config-2.6.17-10-generic .config
+
  
# take all the defaults
+
== Hardy ==
yes '' |  make oldconfig
+
Hardy ships with kernel version 2.6.24 which is not officially supported by Linux-Vserver due to the major changes made in this kernel version.
  
====  Make the Kernel ====
+
Nevertheless I have adapted version 2.0.0.5.0.7 of the vserver patch to the Hardy kernel sources. We have run those patched kernels for about a year now without any problems on our desktop systems.
time make    # this will take quite a while
+
make-kpkg --initrd binary
+
  
== Problems ==
+
=== Packages ===
 +
The following packages are available for i386 and amd64:
  
When you recieve a 'Segmentation fault' error running vserver-utils try useing latest [http://www.fefe.de/dietlibc/ dietlibc]
+
* linux-headers-2.6.24-23-vserver
+
* linux-headers-lum-2.6.24-23-vserver
wget http://www.fefe.de/dietlibc/<insert version here>
+
* linux-headers-vserver
tar jxvf dietlibc*
+
* linux-image-2.6.24-23-vserver
cd dietlibc
+
* linux-image-vserver
more README
+
* linux-restricted-modules-2.6.24-23-vserver
 +
* linux-restricted-modules-vserver
 +
* linux-ubuntu-modules-2.6.24-23-vserver
 +
* linux-vserver
  
Or alternatively, use debian packages. The binaries are staticly linked as far as I known so it doesn't matter.
+
=== Known Limitations ===
Feity and up gcc version won't let you compile correctly dietlibc yet.
+
* linux-image
 +
** CONFIG_OCFS2_FS has been disabled
  
 +
* linux-ubuntu-modules
 +
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled
  
== Ubuntu Gutsy Information ==
+
=== Repository ===
This is a note on creating Ubuntu Gutsy as a guest on an Ubuntu Gutsy host. To create the Ubuntu Gutsy host, follow the combination of the [[Installation on Linux 2.6]] wiki page and the [[Installation on Ubuntu]] wiki page.
+
You can add the following key to your apt keyring:
  
To create the guest system, do these commands:
+
<nowiki>wget -O - http://ubuntu-vserver.pingworks.net/ubuntu-vserver.pubkey | sudo apt-key add -</nowiki>
# apt-get install debootstrap
+
# vserver vserver1 build -m debootstrap --hostname=vserver1.mydomain.com --interface eth0:192.168.1.10/24 -- -d gutsy -m http://ftp.ubuntu.com/ubuntu
+
# vserver vserver1 start
+
# vserver vserver1 enter
+
  
To get networking work on the guest, try the tips from www.unixshell.com/wiki/index.php/creating_and_using_vserver_virtual_servers.
+
Add the following line to your sources.list:
  
== Ubuntu Hardy Information ==
+
i386:  
If kernel is patched, compiled and installed from source as described in [[Installation on Linux 2.6]], and also in Dapper section above, this alternative method can be used to create an initrd image after modules are successfully installed (assuming the kernel source is 2.6.22.19 and vserver patch is 2.2.0.7):
+
update-initramfs -k 2.6.22.19-vs2.2.0.7 -c
+
  
Look up man 8 update-initramfs for details.
+
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/hardy/binary-i386 ./</nowiki>
 +
 
 +
amd64:
 +
 
 +
<nowiki>deb http://ubuntu-vserver.pingworks.net/dists/hardy/binary-amd64 ./</nowiki>
 +
 
 +
=== Installation ===
 +
 
 +
aptitude update
 +
aptitude install linux-image-vserver linux-headers-vserver util-vserver
  
 
== Useful Links ==
 
== Useful Links ==
  
* http://www2.uni-klu.ac.at/support/VServer
 
 
* https://help.ubuntu.com/community/VServer
 
* https://help.ubuntu.com/community/VServer
 +
* http://www2.uni-klu.ac.at/support/VServer
 
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/  
 
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/  
 
* http://www.howtoforge.com/linux_vserver_debian
 
* http://www.howtoforge.com/linux_vserver_debian
 
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/
 
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/

Revision as of 10:48, 6 March 2009

Contents

Disclaimer

If you are running a system in production you should probably consider building your own kernel based on the vanilla kernel source as described here: Installation_on_Linux_2.6

The binary kernel images provided here are neither official ubuntu nor official vserver kernel images.

If you have any problems with those kernels please send a mail to the Vserver mailinglist and please do not file any bugs on the ubuntu bugtracker.

If you are interested in a different kernel config or have prepared a patch for newer kernels, do not hesitate to contact the Vserver mailinglist.

Intrepid

Intrepid ships with kernel version 2.6.27. As of now (4.3.2009) there are only experimental patches available for this kernel version.

I have adapted version 2.3.0.36.4 of the vserver patch to the Intrepid kernel sources. These images should be considered experimental but seems to work.

The util-vserver package from intrepid seems to be broken (see: Ubuntu Bug), therefore I have rebuild the jaunty version for intrepid. This version ships with unstripped binaries due to another Ubuntu Bug.

Packages

The following packages are available for i386 and amd64:

  • linux-headers-2.6.27-11-vserver
  • linux-headers-vserver
  • linux-image-2.6.27-11-vserver
  • linux-image-vserver
  • linux-restricted-modules-2.6.27-11-vserver
  • linux-vserver
  • util-vserver

Known Limitations

  • linux-image
    • CONFIG_AUFS has been disabled

Repository

You can add the following key to your apt keyring:

wget -O - http://ubuntu-vserver.pingworks.net/ubuntu-vserver.pubkey | sudo apt-key add -

Add the following line to your sources.list:

i386:

deb http://ubuntu-vserver.pingworks.net/dists/intrepid/binary-i386 ./

amd64:

deb http://ubuntu-vserver.pingworks.net/dists/intrepid/binary-amd64 ./

Installation

aptitude update
aptitude install linux-image-vserver linux-headers-vserver util-vserver

Hardy

Hardy ships with kernel version 2.6.24 which is not officially supported by Linux-Vserver due to the major changes made in this kernel version.

Nevertheless I have adapted version 2.0.0.5.0.7 of the vserver patch to the Hardy kernel sources. We have run those patched kernels for about a year now without any problems on our desktop systems.

Packages

The following packages are available for i386 and amd64:

  • linux-headers-2.6.24-23-vserver
  • linux-headers-lum-2.6.24-23-vserver
  • linux-headers-vserver
  • linux-image-2.6.24-23-vserver
  • linux-image-vserver
  • linux-restricted-modules-2.6.24-23-vserver
  • linux-restricted-modules-vserver
  • linux-ubuntu-modules-2.6.24-23-vserver
  • linux-vserver

Known Limitations

  • linux-image
    • CONFIG_OCFS2_FS has been disabled
  • linux-ubuntu-modules
    • CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled

Repository

You can add the following key to your apt keyring:

wget -O - http://ubuntu-vserver.pingworks.net/ubuntu-vserver.pubkey | sudo apt-key add -

Add the following line to your sources.list:

i386:

deb http://ubuntu-vserver.pingworks.net/dists/hardy/binary-i386 ./

amd64:

deb http://ubuntu-vserver.pingworks.net/dists/hardy/binary-amd64 ./

Installation

aptitude update
aptitude install linux-image-vserver linux-headers-vserver util-vserver

Useful Links

Personal tools