<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://linux-vserver.at/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://linux-vserver.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Raceme</id>
		<title>Linux-VServer - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://linux-vserver.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Raceme"/>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/Special:Contributions/Raceme"/>
		<updated>2026-04-09T13:44:13Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://linux-vserver.at/Installation_on_Ubuntu</id>
		<title>Installation on Ubuntu</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/Installation_on_Ubuntu"/>
				<updated>2010-09-15T14:46:36Z</updated>
		
		<summary type="html">&lt;p&gt;Raceme: Added a note and link to ubuntu vserver specific problem with upstart&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Disclaimer ==&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
The binary kernel images provided here are neither official ubuntu nor official Linux-VServer kernel images. &lt;br /&gt;
&lt;br /&gt;
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'''.&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
== Lucid ==&lt;br /&gt;
Kernel Version: 2.6.32&lt;br /&gt;
&lt;br /&gt;
Vserver patch: 2.3.0.36.29.4&lt;br /&gt;
&lt;br /&gt;
Status: experimental&lt;br /&gt;
&lt;br /&gt;
=== Known Limitations ===&lt;br /&gt;
* linux-image&lt;br /&gt;
** CONFIG_AUFS has been disabled&lt;br /&gt;
&lt;br /&gt;
== Karmic ==&lt;br /&gt;
Kernel Version: 2.6.31&lt;br /&gt;
&lt;br /&gt;
Vserver patch: 2.3.0.36.19&lt;br /&gt;
&lt;br /&gt;
Status: experimental&lt;br /&gt;
&lt;br /&gt;
=== Known Limitations ===&lt;br /&gt;
* linux-image&lt;br /&gt;
** CONFIG_AUFS has been disabled&lt;br /&gt;
&lt;br /&gt;
== Jaunty ==&lt;br /&gt;
Kernel Version: 2.6.28&lt;br /&gt;
&lt;br /&gt;
Vserver patch: 2.3.0.36.9&lt;br /&gt;
&lt;br /&gt;
Status: experimental&lt;br /&gt;
&lt;br /&gt;
=== Known Limitations ===&lt;br /&gt;
* linux-image&lt;br /&gt;
** CONFIG_AUFS has been disabled&lt;br /&gt;
* linux-headers&lt;br /&gt;
** Up to version 2.6.28-11.42~ppa1 the linux-headers package was broken which broke external modules built manually or via dkms (nvidia, virtualbox). If you are experiencing problems with one of those modules please update to the latest package version and rebuild the modules. For modules built via dkms this can be done with:&lt;br /&gt;
 dkms remove -m &amp;lt;modulename&amp;gt; -v &amp;lt;moduleversion&amp;gt; -k 2.6.28-11-vserver&lt;br /&gt;
 dkms build -m &amp;lt;modulename&amp;gt; -v &amp;lt;moduleversion&amp;gt; -k 2.6.28-11-vserver&lt;br /&gt;
 dkms install -m &amp;lt;modulename&amp;gt; -v &amp;lt;moduleversion&amp;gt; -k 2.6.28-11-vserver&lt;br /&gt;
&lt;br /&gt;
== Intrepid ==&lt;br /&gt;
Kernel Version: 2.6.27&lt;br /&gt;
&lt;br /&gt;
Vserver patch: 2.3.0.36.4&lt;br /&gt;
&lt;br /&gt;
Status: experimental&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
=== Known Limitations ===&lt;br /&gt;
* linux-image&lt;br /&gt;
** CONFIG_AUFS has been disabled&lt;br /&gt;
&lt;br /&gt;
== Hardy ==&lt;br /&gt;
Kernel Version: 2.6.24&lt;br /&gt;
&lt;br /&gt;
Vserver patch: 2.0.0.5.0.7&lt;br /&gt;
&lt;br /&gt;
Status: experimental&lt;br /&gt;
&lt;br /&gt;
=== Known Limitations ===&lt;br /&gt;
* linux-image&lt;br /&gt;
** CONFIG_OCFS2_FS has been disabled&lt;br /&gt;
&lt;br /&gt;
* linux-ubuntu-modules&lt;br /&gt;
** CONFIG_AUFS, CONFIG_GFS_FS, CONFIG_SQUASHFS, CONFIG_DMRAID45 have been disabled&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
You can add the following key to your apt keyring:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BB9BFB5B&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lucid ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to your sources.list:&lt;br /&gt;
&lt;br /&gt;
 deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu lucid main&lt;br /&gt;
 deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu lucid main&lt;br /&gt;
&lt;br /&gt;
=== Karmic ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to your sources.list:&lt;br /&gt;
&lt;br /&gt;
 deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main&lt;br /&gt;
 deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu karmic main&lt;br /&gt;
&lt;br /&gt;
=== Jaunty ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to your sources.list:&lt;br /&gt;
&lt;br /&gt;
 deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main&lt;br /&gt;
 deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu jaunty main&lt;br /&gt;
&lt;br /&gt;
=== Intrepid ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to your sources.list:&lt;br /&gt;
&lt;br /&gt;
 deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main&lt;br /&gt;
 deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu intrepid main&lt;br /&gt;
&lt;br /&gt;
=== Hardy ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to your sources.list:&lt;br /&gt;
&lt;br /&gt;
 deb http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main&lt;br /&gt;
 deb-src http://ppa.launchpad.net/christoph-lukas/ppa/ubuntu hardy main&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude install linux-image-vserver linux-headers-vserver util-vserver&lt;br /&gt;
&lt;br /&gt;
== Running Ubuntu vservers ==&lt;br /&gt;
&lt;br /&gt;
If you are running Ubuntu vservers you may be interrested by the following page dealing with [[Upstart_issues|Upstart issues]] specially with karmic and superior versions.&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
&lt;br /&gt;
* https://launchpad.net/~christoph-lukas/+archive/ppa&lt;br /&gt;
* https://help.ubuntu.com/community/VServer&lt;br /&gt;
* http://www2.uni-klu.ac.at/support/VServer&lt;br /&gt;
* http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/ &lt;br /&gt;
* http://www.howtoforge.com/linux_vserver_debian&lt;br /&gt;
* http://linux.gyakg.u-szeged.hu/~pasztor/ubuntu-vs/&lt;/div&gt;</summary>
		<author><name>Raceme</name></author>	</entry>

	<entry>
		<id>http://linux-vserver.at/Upstart_issues</id>
		<title>Upstart issues</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/Upstart_issues"/>
				<updated>2010-09-15T14:43:40Z</updated>
		
		<summary type="html">&lt;p&gt;Raceme: /* Running Ubuntu Lucid */ added link to external wiki for upstart/ubuntu lucid vserver&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Running Ubuntu Lucid ==&lt;br /&gt;
&lt;br /&gt;
There's a inipost-file ( http://static.thedudes.org/initpost ) that can be used when creating hosts, so there's no need for manual tweaking. &lt;br /&gt;
Put it in &amp;lt;pre&amp;gt;/usr/lib/util-vserver/distributions/lucid&amp;lt;/pre&amp;gt; Install the vserver with --initstyle plain. You still need to look over services when installing since we're tweaking Upstarts normal emits.&lt;br /&gt;
&lt;br /&gt;
You can also have a look at http://wiki.raceme.org/dokuwiki/tof:computer:vserver:upstart_ubuntu_lucid for a manual procedure.&lt;br /&gt;
&lt;br /&gt;
== Running an upstart based guest ==&lt;br /&gt;
&lt;br /&gt;
currently upstart based guests need some manual tweaking to make them work inside a vserver guest.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the host ===&lt;br /&gt;
First of all you need to set the init style of your vserver to plain&lt;br /&gt;
 # echo plain &amp;gt; /etc/vservers/&amp;lt;vservername&amp;gt;/apps/init/style&lt;br /&gt;
&lt;br /&gt;
Or use '--initstyle plain' when creating the host.&lt;br /&gt;
&lt;br /&gt;
I'd also strongly recommend to mount &amp;lt;code&amp;gt;/var/run&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/var/lock&amp;lt;/code&amp;gt; of the guest as tmpfs. So add the following lines to&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/vservers/&amp;lt;vservername&amp;gt;/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
 none    /var/run        tmpfs   size=16m,nosuid,mode=0755       0 0&lt;br /&gt;
 none    /var/lock       tmpfs   size=16m,noexec,nosuid,nodev    0 0&lt;br /&gt;
&lt;br /&gt;
=== Remove low level services inside the guest ===&lt;br /&gt;
Then you need to get rid of anything in &amp;lt;code&amp;gt;/etc/init/&amp;lt;/code&amp;gt; that tries to fiddle with your Server's Hardware or other low-level Stuff that's already handled by your host's kernel/system. Having one such scriptlet still enabled might cause the whole upstart system to fail (like not beeing able to open &amp;lt;code&amp;gt;/dev/console&amp;lt;/code&amp;gt; or failing to start the udev system).&lt;br /&gt;
Just remove these scriptlets, move them out of the way or rename them to something not ending in &amp;lt;code&amp;gt;.conf&amp;lt;/code&amp;gt;. Be aware that upstart also parses subfolders of &amp;lt;code&amp;gt;/etc/init/&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.conf&amp;lt;/code&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
This is what I deleted on a basic Ubuntu 9.10 guest:&lt;br /&gt;
 dmesg.conf&lt;br /&gt;
 hostname.conf&lt;br /&gt;
 hwclock-save.conf&lt;br /&gt;
 hwclock.conf&lt;br /&gt;
 mountall-net.conf&lt;br /&gt;
 mountall-reboot.conf&lt;br /&gt;
 mountall-shell.conf&lt;br /&gt;
 mountall.conf&lt;br /&gt;
 network-interface.conf&lt;br /&gt;
 networking.conf&lt;br /&gt;
 procps.conf&lt;br /&gt;
 rsyslog-kmsg.conf&lt;br /&gt;
 tty1.conf&lt;br /&gt;
 tty2.conf&lt;br /&gt;
 tty3.conf&lt;br /&gt;
 tty4.conf&lt;br /&gt;
 tty5.conf&lt;br /&gt;
 tty6.conf&lt;br /&gt;
 upstart-udev-bridge.conf&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 10.04 you also want to remove:&lt;br /&gt;
 console-setup.conf &lt;br /&gt;
&lt;br /&gt;
=== Services you want to look over ===&lt;br /&gt;
There are files in the /etc/init dir that you want to check the startup line of.&lt;br /&gt;
It could be waiting for something that will never happend since it is in a VServer and thus never start.&lt;br /&gt;
&lt;br /&gt;
for example mysql.conf needs a 'net-device-up'-emit also.&lt;br /&gt;
by running&lt;br /&gt;
 vserver &amp;lt;name&amp;gt; exec initctl emit net-device-up&lt;br /&gt;
&lt;br /&gt;
it will come up like a charm.&lt;br /&gt;
Either put this in vserver.conf or remove in from mysql.conf.&lt;br /&gt;
&lt;br /&gt;
Jobs that doesn't start from scratch:&lt;br /&gt;
 mysql-server-5.1 (mysql.conf)&lt;br /&gt;
&lt;br /&gt;
=== Fake low level events inside the guest ===&lt;br /&gt;
Finally you need to fake emit the events that some of these scripts would do during regular boot. Probably the cleanest approach is to add a scriptlet &amp;lt;code&amp;gt;vserver.conf&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/etc/init/&amp;lt;/code&amp;gt; with this content:&lt;br /&gt;
 start on startup&lt;br /&gt;
 script&lt;br /&gt;
        touch /var/run/utmp&lt;br /&gt;
        chown root:utmp /var/run/utmp&lt;br /&gt;
        chmod 664 /var/run/utmp&lt;br /&gt;
        initctl emit virtual-filesystems&lt;br /&gt;
        initctl emit local-filesystems&lt;br /&gt;
        initctl emit remote-filesystems&lt;br /&gt;
        initctl emit filesystem&lt;br /&gt;
 end script&lt;br /&gt;
&lt;br /&gt;
The utmp stuff is needed if you mount &amp;lt;code&amp;gt;/var/run&amp;lt;/code&amp;gt; as tmpfs and you don't create utmp anywhere else.&lt;br /&gt;
&lt;br /&gt;
=== Remove console outputs ===&lt;br /&gt;
&lt;br /&gt;
If your VServer hangs on the command&lt;br /&gt;
 vserver &amp;lt;name&amp;gt; stop&lt;br /&gt;
&lt;br /&gt;
and puts out&lt;br /&gt;
 A timeout occured while waiting for the vserver to finish and it will&lt;br /&gt;
 be killed by sending a SIGKILL signal. The following process list&lt;br /&gt;
 might be useful for finding out the reason of this behavior:&lt;br /&gt;
 &lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 &amp;lt;pid&amp;gt; &amp;lt;context&amp;gt; &amp;lt;name&amp;gt;           ?        Ss     0:00 /sbin/init&lt;br /&gt;
 &amp;lt;pid&amp;gt; &amp;lt;context&amp;gt; &amp;lt;name&amp;gt;           ?        Ss     0:00 /sbin/init&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
you should run&lt;br /&gt;
 sed -i 's/^\(console output\)$/#\1/1' /etc/vservers/$name/vdir/etc/init/*&lt;br /&gt;
&lt;br /&gt;
which will disable all lines with 'console output', and Upstart won't try output to it. Which is a good thing since it doesn't exist.&lt;br /&gt;
&lt;br /&gt;
=== Adapt /etc/init/rc-sysinit.conf inside the guest ===&lt;br /&gt;
&lt;br /&gt;
This depends on net-device-up IFACE=lo, remove this from the start line so that it reads:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;start on filesystem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This scriptlet tries to parse &amp;lt;code&amp;gt;/proc/cmdline&amp;lt;/code&amp;gt; which will not work and probably isn't needed inside a vserver.&amp;lt;br/&amp;gt;&lt;br /&gt;
Simply comment out or delete the whole &amp;lt;code&amp;gt;for ARG in $(cat /proc/cmdline) do...done&amp;lt;/code&amp;gt; loop.&lt;br /&gt;
&lt;br /&gt;
=== Notes for debugging ===&lt;br /&gt;
&lt;br /&gt;
First you need to run Upstart with the --debug flag,&lt;br /&gt;
one way of doing it is inserting&lt;br /&gt;
 &amp;quot;--debug&amp;quot;&lt;br /&gt;
 in INITCMD_START under the xplain-clause inside /usr/lib/util-vserver/vserver.functions (row 316 here)&lt;br /&gt;
 so it reads INITCMD_START=( /sbin/init &amp;quot;--debug&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Second you should enable console output in the rc-files inside /etc/init, if you had commented them out before you could do&lt;br /&gt;
 sed -i 's/#^\(console output\)$/\1/1' /etc/vservers/$name/vdir/etc/init/*&lt;br /&gt;
&lt;br /&gt;
Third you need a device to act as console, I used tty0.&lt;br /&gt;
 cp -a /dev/tty0 /etc/vservers/$name/vdir/dev/console&lt;br /&gt;
&lt;br /&gt;
If you do things at a console of the machine it will now print out detailed information. More on how to debug a Upstart job you'll find on http://upstart.ubuntu.com/wiki/Debugging.&lt;br /&gt;
Notice that if one fails they all fail.&lt;br /&gt;
&lt;br /&gt;
=== Notes for older kernels ===&lt;br /&gt;
If you encounter upstart errors like this:&lt;br /&gt;
&lt;br /&gt;
 $ vserver foo start&lt;br /&gt;
 init: missing runlevel&lt;br /&gt;
 Try `init --help' for more information.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 $ vserver foo start&lt;br /&gt;
 telinit: Failed to connect to socket /com/ubuntu/upstart: Connection refused&lt;br /&gt;
&lt;br /&gt;
then you're probably running the current stable version &amp;lt;code&amp;gt;2.6.22.19-vs2.2.0.7&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Upstart's &amp;lt;code&amp;gt;/sbin/init&amp;lt;/code&amp;gt; implementation requires to be PID 1. It is linked against NPTL (in contrast to sysvinit), which has a bug in it's caching &amp;lt;code&amp;gt;getpid(2)&amp;lt;/code&amp;gt; wrapper. With this kernel version &amp;lt;code&amp;gt;getpid(2)&amp;lt;/code&amp;gt; returns the cached PID to init, resulting in init replacing itself with telinit. You can fix this by upgrading to a &amp;lt;code&amp;gt;2.6.26+&amp;lt;/code&amp;gt; kernel and a newer vserver patch, or by patching upstart:&lt;br /&gt;
&lt;br /&gt;
 diff --git a/init/main.c b/init/main.c&lt;br /&gt;
 index bfcd528..c6c9304 100644&lt;br /&gt;
 --- a/init/main.c&lt;br /&gt;
 +++ b/init/main.c&lt;br /&gt;
 @@ -37,6 +37,7 @@&lt;br /&gt;
  #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
  #include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
  #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 +#include &amp;lt;syscall.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  #include &amp;lt;linux/kd.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 @@ -131,7 +132,7 @@ main (int   argc,&lt;br /&gt;
  	}&lt;br /&gt;
  &lt;br /&gt;
  	/* Check we're process #1 */&lt;br /&gt;
 -	if (getpid () &amp;gt; 1) {&lt;br /&gt;
 +	if (syscall(SYS_getpid) &amp;gt; 1) {&lt;br /&gt;
  		execv (TELINIT, argv);&lt;br /&gt;
  		/* Ignore failure, probably just that telinit doesn't exist */&lt;br /&gt;
&lt;br /&gt;
For more information see the man pages of &amp;lt;code&amp;gt;getpid(2)&amp;lt;/code&amp;gt; (NOTES) and &amp;lt;code&amp;gt;clone(2)&amp;lt;/code&amp;gt; (BUGS).&lt;br /&gt;
&lt;br /&gt;
=== Init procedure doesn't complete ===&lt;br /&gt;
==== SSH ====&lt;br /&gt;
If you've completed all above steps and some init scripts doesn't get invoked at all (most notably old SYSV init scripts) you might have encountered same error that I did.&lt;br /&gt;
In Lucid guest I had to comment out following line in /etc/init/ssh.conf:&lt;br /&gt;
  # replaces SSHD_OOM_ADJUST in /etc/default/ssh&lt;br /&gt;
  oom never&lt;br /&gt;
to&lt;br /&gt;
  # replaces SSHD_OOM_ADJUST in /etc/default/ssh&lt;br /&gt;
  #oom never&lt;br /&gt;
&lt;br /&gt;
After commenting out this line initialization completed successfully.&lt;br /&gt;
&lt;br /&gt;
==== D-BUS ====&lt;br /&gt;
When creating guest as chroot some packages you might expect are missing. One of these is D-BUS. Strangely enough the /etc/init/dbus.conf gets installed which prevents Upstart to finish its starting sequence.&lt;br /&gt;
&lt;br /&gt;
Solution: install dbus package&lt;br /&gt;
&lt;br /&gt;
    sudo aptitude install dbus&lt;/div&gt;</summary>
		<author><name>Raceme</name></author>	</entry>

	</feed>