From: Xavier Montagutelli (xavier.montagutelli_at_unilim.fr)
Date: Tue 13 Sep 2005 - 23:09:41 BST
On Tuesday 13 September 2005 22:32, [eMAXX] Sys-Admin wrote:
> Hi folks,
>
> Ok, I'm totally lost. I don't seem to get a vserver install to work...
> well at least not the latest version..
I am also a newbie, and I have done it with Debian recently, so let's see
what's different.
> I'm trying to install vserver from this source:
> http://linux-vserver.derjohn.de/ on Debian Sarge. I written down the
> steps I took for this vserver installation:
[..]
> ------------------------------------------------------
> [1] Wget:
>
> http://linux-vserver.derjohn.de/kernel-image-2.6.12-p3_10.00.vserver20_i386
>.deb http://linux-vserver.derjohn.de/util-vserver_0.30.208-1_i386.deb
I have used the sources from Linus 2.6.12.4 :
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.4.tar.bz2
wget http://www.13thfloor.at/vserver/s_rel26/v2.0/patch-2.6.12.4-vs2.0.diff
make menuconfig
more /boot/config-2.6.12.4-vs2.0-scivm-xm2
#
# Block devices
#
# CONFIG_BLK_DEV_VROOT is not set
#
# Kernel hacking
#
CONFIG_VSERVER=y
CONFIG_VSERVER_SECURITY=y
CONFIG_VSERVER_LEGACYNET=y
#
# Linux VServer
#
CONFIG_VSERVER_LEGACY=y
# CONFIG_VSERVER_LEGACY_VERSION is not set
# CONFIG_VSERVER_NGNET is not set
CONFIG_VSERVER_PROC_SECURE=y
CONFIG_VSERVER_HARDCPU=y
# CONFIG_VSERVER_HARDCPU_IDLE is not set
# CONFIG_INOXID_NONE is not set
# CONFIG_INOXID_UID16 is not set
# CONFIG_INOXID_GID16 is not set
CONFIG_INOXID_UGID24=y
# CONFIG_INOXID_INTERN is not set
# CONFIG_INOXID_RUNTIME is not set
# CONFIG_XID_TAG_NFSD is not set
# CONFIG_VSERVER_DEBUG is not set
make-kpkg
>
> [2] Install new kernel:
> ~# dpkg -i kernel-image-2.6.12-p3_10.00.vserver20_i386.deb
>
> [2a] Update /boot/grub/menu.lst to change the label so it contains "vs"
> ~# nano /boot/grub/menu.lst
>
> [3] Reboot...
>
> ---
>
> [4] Install Util-Vserver:
> ~# dpkg -i util-vserver_0.30.208-1_i386.deb
I used the sources :
wget
http://www.13thfloor.at/vserver/s_rel26/v2.0/util-vserver-0.30.208.tar.bz2
apt-get install vlan iproute e2fslibs-dev
apt-get install dietlibc-dev beecrypt2-dev
./configure --sysconfdir=/etc --localstatedir=/var
make && make install && make install-distribution
mkdir -p /var/lock/subsys
update-rc.d vprocunhide start 74 0 2 .
update-rc.d rebootmgr start 98 2 . stop 02 0 6 .
update-rc.d vservers-default start 98 2 . stop 02 0 6 .
> [5] download and run the testscript:
> ~# wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh
[..]
>
> [6] So, vserver 2.0 and vserver-util should be running now:
> ~# vserver-info
[..]
> Paths:
> prefix: /usr
> sysconf-Directory: ${prefix}/etc
> cfg-Directory: ${prefix}/etc/vservers
> initrd-Directory: $(sysconfdir)/init.d
> pkgstate-Directory: ${prefix}/var/run/vservers
these paths seems strange : under Debian, the sysconf-Directory should be /etc
instead of /usr/etc, cfg-Direfctory should be /etc/vservers instead
of /usr/etc/vservers, etc.
> [7] Create Vserver basedir since the default location isn't there:
> ~# mkdir /vservers
"make install-distribution" makes it for you if you compile the userland
tools. Perhaps you forgot to "setattr --barrier /vservers" during this step ?
> ~# mkdir /vservers/vstest01
not necessary. The next step (vserver .. build) should do it for you.
>
> [8] Create new Context/Virtual Server:
> ~# vserver vstest01 build -m debootstrap --hostname vstest01
> --netdev eth0:vs01 --interface 192.168.27.33 --context 42 -- -d sarge -m
> ftp://ftp.nl.debian.org/debian/
>
> [9] /proc/sys/kernel/vshelper contains: /sbin/vshelper, must be updated:
> ~# echo "/usr/lib/util-vserver/vshelper" >/proc/sys/kernel/vshelper
"make install-distribution" makes the link under /sbin
In your case, you could also put it in the /etc/sysctl.conf file (to make it
persistent across reboots) :
kernel.vshelper = /usr/lib/util-vserver/vshelper
>
> [10] Then Vserver should run?
> ~# vserver vstest01 start
> /proc/uptime can not be accessed. Usually, this is caused by
> procfs-security. Please read the FAQ for more details
> http://www.linux-vserver.org/index.php?page=Linux-Vserver+FAQ
That's normal (from what I have understood) : the default is that everything
is protected, you have to unlock things under /proc
> I search the irc-log and then tried this:
> ~# /usr/lib/util-vserver/vprocunhide
Normally, this script is called by /etc/init.d/vprocunhide during the boot
process of the host system (if your Debian package configures it correctly).
The files to "unhide" are listed
in /usr/lib/util-vserver/defaults/vprocunhide-files (or
in /etc/vservers/.defaults/apps/vprocunhide/files if that file exists)
> /proc/net/: Bad address
[.. every file to unhide with an error ..]
> I have no clue what this means.... anyone?
I don't have any idea about that. Do you use devfs ? On my machine, there's no
devfs.
You could also try some basic commands :
cat /proc/uptime
showattr -d /proc/net
setattr --~hide /proc/net/arp
(the script makes for example "setattr --~hide -R /proc/net/", -R is
"recursive")
Perhaps you should also try to compile your own kernel and tools, because you
don't know what's in the packages you downloaded ?
Also, there's a thread on this list with a similar problem. Here is the last
post :
http://list.linux-vserver.org/archive/vserver/msg09324.html
HTH,
-- Xavier Montagutelli Service Commun Informatique Universite de Limoges Tel : +33 555457720 Cle GPG : http://pgp.mit.edu 1024D/175CE198 _______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver