About this list Date view Thread view Subject view Author view Attachment view

From: Lars Braeuer (lbraeuer_at_mpex.net)
Date: Fri 13 Sep 2002 - 09:36:49 BST


below there's a description of the problem I've had and how I solved it.
SuSE is unable to run the init scripts in the specified runlevel, when starting a vserver.
the solution is to use a modified startscript from another system. I replace the
/etc/rc.d/rc in my SuSE vserver with a debian startscript I got from a friend.

one thing I had to modify within the debian rc script is the path to the runlevel dirs.
I attached the small init script to this mail, so copy it over the /etc/rc.d/rc file IN
YOUR VSERVER, it's already modified. If you'd like to do it yourself, just replace the
string /etc/rc$runlevel.d with /etc/rc.d/rc$runlevel.d

since vserver seems to be developed using a redhat server, I guess you can also use the
/etc/rc.d/rc script from a redhat installation.

maybe this script or a RH rc script could be included in the future releases, so that SuSE
users have no problems. or there should be at least a way to download such a script from
the download page.

details about the problem:

> don't know if this is a general (known) bug, or if it just happens on our machine.
> The server is running SuSE 8.0 with the 2.4.19ctx-13 kernel patch and vserver 0.19.
>
> When starting a vserver with the "vserver <vserver-name> start" command, there's no init script executed in the specified runlevel, e.g. /etc/rc.d/rc3.d.
>
> To check if the /etc/rc.d/rc script fails at the first check, which is...
> test "$PREVLEVEL" = "$RUNLEVEL" && exit 0
> ...I added the following two lines to the top of the script:
> echo "PRELEVEL " $PRELEVEL
> echo "RUNLEVEL " $RUNLEVEL
> Both variables PRELEVEL and RUNLEVEL are empty. Executing /sbin/runlevel in the vserver also returns "unknown".
>
> But a ps -ax within the vserver (vserver <vserver-name> enter), contains:
> PID TTY STAT TIME COMMAND
> 1 ? S 0:04 init [3]
>
> The file /var/run/utmp, which is accessed by /sbin/runlevel within the vserver is empty. In the main system it is filled with some data.
>
> It doesn't help to comment out the check I mentioned above.
> Doing this brings up the following when starting the vserver:
> stty: standard input: Inappropriate ioctl for device
>
> cat /dev/console within the vserver shows:
> stty: standard input: Inappropriate ioctl for device
> stty: standard input: Inappropriate ioctl for device
> blogd: can not open (null): No such file or directory
> Master Resource Control: previous runlevel: , switching to runlevel:
> Master Resource Control: runlevel has been reached
> stty: standard input: Inappropriate ioctl for device
>
> Hope this is a general issue that can be fixed.
>
> Lars



About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 06 Nov 2002 - 07:03:42 GMT by hypermail 2.1.3