http://linux-vserver.org/api.php?action=feedcontributions&user=Rks+87&feedformat=atomLinux-VServer - User contributions [en]2024-03-28T16:19:59ZUser contributionsMediaWiki 1.20.2http://linux-vserver.org/Installation_on_UbuntuInstallation on Ubuntu2008-07-30T07:51:30Z<p>Rks 87: </p>
<hr />
<div>== Check Ubuntu's Wiki ==<br />
<br />
There are howtos on Ubuntu's site that describe how to download pre-built, Ubuntu-specific kernels.<br />
<br />
http://help.ubuntu.com/community/VServer<br />
<br />
More detailed instructions on the u32 kernel can be found on http://wiki.u32.net/Ubuntu-VServer<br />
<br />
== Vserver Kernel on Ubuntu Dapper with grsecurity ==<br />
<br />
=== Prerequisites ===<br />
<br />
* 32 Bit Ubuntu Dapper.<br />
* installed packages:<br />
<br />
apt-get install build-essential gcc make g++ libncurses5-dev<br />
<br />
=== Howto Devel 2.6.17.14-vs2.0.2.1-grsec2.1.9 ===<br />
<br />
==== Get the Kernel ====<br />
* Kernel files + patch from http://linux-vserver.org/<br />
** get linux-2.6.17.14.tar.bz2 und patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff<br />
*** http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.14.tar.bz2<br />
*** http://people.linux-vserver.org/~harry/patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff<br />
cd /usr/src/ && mkdir kernel && cd kernel<br />
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.14.tar.bz2<br />
wget http://people.linux-vserver.org/~harry/patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff<br />
tar xfjv linux-2.6.17.14.tar.bz2<br />
cd linux-2.6.17.14<br />
<br />
==== Patch the Kernel ====<br />
cat ../patch-2.6.17.14-vs2.0.2.1-grsec2.1.9.diff | patch -p1<br />
cp /boot/vmlinuz-2.6.15-26-server<br />
make oldconfig<br />
make menuconfig<br />
<br />
==== Make the Kernel ====<br />
make # this will take a long time<br />
make install<br />
make modules_install<br />
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<br />
vi /boot/grub/menu.lst<br />
The Boot entry should look like this<br />
title Ubuntu, 2.6.17.14-vs2.0.2.1-grsec2.1.9<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-2.6.17.14-grsec2.1.9-vs2.0.2.1 root=/dev/sda1 ro quiet splash<br />
initrd /boot/initrd.img-2.6.17.14-grsec2.1.9-vs2.0.2.1<br />
savedefault<br />
boot<br />
<br />
==== Test the Kernel ====<br />
<br />
* boot Kernel<br />
* ''uname -r'' should show<br />
2.6.17.14-grsec2.1.9-vs2.0.2.1<br />
* run Testscripts<br />
* http://oldwiki.linux-vserver.org/TestScripts<br />
<br />
== Alternate Method ==<br />
<br />
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.<br />
<br />
This is NOT COMPLETE -- remove this message when you get it to work!<br />
<br />
==== Get the Kernel ====<br />
apt-get install linux-source-2.6.17 kernel-package linux-kernel-devel<br />
cd /usr/src<br />
tar xjvf linux-source-2.6.17.tar.bz2<br />
<br />
==== Patch the Kernel ====<br />
cd linux-source-2.6.17/<br />
wget http://vserver.13thfloor.at/Experimental/OLD-2.0/patch-2.6.17.13-vs2.0.2.1.diff<br />
patch -p1 < *diff<br />
vi Makefile<br />
fix the EXTRAVERSION to be -vs2.0.2<br />
cp /boot/config-2.6.17-10-generic .config<br />
<br />
# take all the defaults<br />
yes '' | make oldconfig<br />
<br />
==== Make the Kernel ====<br />
time make # this will take quite a while<br />
make-kpkg --initrd binary<br />
<br />
== Problems ==<br />
<br />
When you recieve a 'Segmentation fault' error running vserver-utils try useing latest [http://www.fefe.de/dietlibc/ dietlibc]<br />
<br />
wget http://www.fefe.de/dietlibc/<insert version here><br />
tar jxvf dietlibc*<br />
cd dietlibc<br />
more README<br />
<br />
Or alternatively, use debian packages. The binaries are staticly linked as far as I known so it doesn't matter.<br />
Feity and up gcc version won't let you compile correctly dietlibc yet.<br />
<br />
<br />
== Ubuntu Gutsy Information ==<br />
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.<br />
<br />
To create the guest system, do these commands:<br />
# apt-get install debootstrap<br />
# vserver vserver1 build -m debootstrap --hostname=vserver1.mydomain.com --interface eth0:192.168.1.10/24 -- -d gutsy -m http://ftp.ubuntu.com/ubuntu<br />
# vserver vserver1 start<br />
# vserver vserver1 enter<br />
<br />
To get networking work on the guest, try the tips from www.unixshell.com/wiki/index.php/creating_and_using_vserver_virtual_servers.<br />
<br />
== Ubuntu Hardy Information ==<br />
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):<br />
update-initramfs -k 2.6.22.19-vs2.2.0.7 -c<br />
<br />
Look up man 8 update-initramfs for details.<br />
<br />
== Useful Links ==<br />
<br />
* http://www2.uni-klu.ac.at/support/VServer<br />
* https://help.ubuntu.com/community/VServer<br />
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ <br />
* http://www.howtoforge.com/linux_vserver_debian<br />
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/</div>Rks 87