FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-28-2008, 12:36 AM
"Thomas H. George"
 
Default Problem with chrooted Etch

When I open a terminal from an X-Window it does not accept entries and
after a minute displays a message, "There was an error creating a child
process for this terminal." In some cases there was a message like
failed to create child process x-terminal-emulator. There is in fact a
soft link from x-terminal-emulator in /usr/bin to
/etc/alternatives/x-terminal-emulator which is in turn a soft link to
/usr/bin/gnome-terminal.wrapper. PATH includes bin and sbin in /, /usr
and /usr/local.


I installed this chrooted version of Etch as described in Debian
Reference - Debian tips, sections 8.6.35.1-4. From the console
(Ctl-Alt-F8) I can enter commands and edit files with no problems. From
X-Window (CTL-ATL-F9) I can launch programs - example: Gimp2.2 - and
access the internet - Gnome Web Browser 2.14.3 - but I can't do any
system administration or open a working terminal window.


A word of further explanation. Initially I installed both gdm and gnome
as described in the Debian-tips. The messages regarding
x-terminal-emulator occurred when Gnome was installed. I subsequently
used dpkg to purge Gnome and installed icewm in hopes of resolving the
problem but this did not help. I had thought that if only I could open
a terminal window I could run gdmsetup - it could not be run from Gnome.
This did not work, again with a message to the effect could not launch
child process - no such program. In fact, gdmsetup is in /usr/sbin.
When I say I cannot open a working terminal window I mean I cannot open
a working terminal window from Gnome or from Failsafe Gnome or from
Failsafe Terminal or from icewm.


I have checked /var/log/Xorg.0.log and /var/log/gdm/:0.log but these
contain mainly entries about the problem with wacom but this is a
different problem. (I like to use a Wacom tablet with its mouse. In my
primary installation (Lenny) it works perfectly and /dev/input contains
a softlink from wacom to event4. I copied my version of xorg.conf to
the the chrooted Etch but there is only event0 to event3 in /dev/input
and MAKEDEV does not know how to create event4. As a result the wacom
pen works perfectly but the mouse does not/)



Perhaps there is an ownership or permission issue that is the root of
the terminal problem? If so, I haven't been able to pin it down.


Tom



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-16-2008, 03:36 PM
Roger Leigh
 
Default Problem with chrooted Etch

"Thomas H. George" <lists@tomgeorge.info> writes:

> When I open a terminal from an X-Window it does not accept entries and
> after a minute displays a message, "There was an error creating a
> child process for this terminal." In some cases there was a message
> like failed to create child process x-terminal-emulator. There is in
> fact a soft link from x-terminal-emulator in /usr/bin to
> /etc/alternatives/x-terminal-emulator which is in turn a soft link to
> /usr/bin/gnome-terminal.wrapper. PATH includes bin and sbin in /,
> /usr and /usr/local.

> I installed this chrooted version of Etch as described in Debian
> Reference - Debian tips, sections 8.6.35.1-4. From the console
> (Ctl-Alt-F8) I can enter commands and edit files with no problems.
> From X-Window (CTL-ATL-F9) I can launch programs - example: Gimp2.2 -
> and access the internet - Gnome Web Browser 2.14.3 - but I can't do
> any system administration or open a working terminal window.

> Perhaps there is an ownership or permission issue that is the root of
> the terminal problem? If so, I haven't been able to pin it down.

You need to have /dev/pts mounted inside the chroot in order to set up
the pseudo-terminal master/slave pair needed by the terminal emulator
to run a virtual terminal device.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
 
Old 08-17-2008, 03:35 PM
andy baxter
 
Default Problem with chrooted Etch

Roger Leigh wrote:

"Thomas H. George" <lists@tomgeorge.info> writes:



When I open a terminal from an X-Window it does not accept entries and
after a minute displays a message, "There was an error creating a
child process for this terminal." In some cases there was a message
like failed to create child process x-terminal-emulator. There is in
fact a soft link from x-terminal-emulator in /usr/bin to
/etc/alternatives/x-terminal-emulator which is in turn a soft link to
/usr/bin/gnome-terminal.wrapper. PATH includes bin and sbin in /,
/usr and /usr/local.





I installed this chrooted version of Etch as described in Debian
Reference - Debian tips, sections 8.6.35.1-4. From the console
(Ctl-Alt-F8) I can enter commands and edit files with no problems.
From X-Window (CTL-ATL-F9) I can launch programs - example: Gimp2.2 -
and access the internet - Gnome Web Browser 2.14.3 - but I can't do
any system administration or open a working terminal window.





Perhaps there is an ownership or permission issue that is the root of
the terminal problem? If so, I haven't been able to pin it down.



You need to have /dev/pts mounted inside the chroot in order to set up
the pseudo-terminal master/slave pair needed by the terminal emulator
to run a virtual terminal device.



I have recently been experimenting with a similar setup (running etch
but with a chrooted testing - lenny - installation on a separate
partition). I have the same problem as the OP even though I have mounted
(--bind) /dev from the 'real' installation. I don't understand why this
isn't good enough - shouldn't this bring in /dev/pts as well? Or is
there some reason why you have to mount that explicitly as well?

Also, I have written a short script to automatically prepare and begin a
chrooted session, which I have pasted below both in case anyone else
finds it useful, and for constructive criticism from anyone with more
skill than I have with this stuff who wants to comment. To use the
script, first edit the line 'JAIL_ROOT=/jail' to point to your chrooted
installation, then save it in /usr/local/bin on the non-chrooted system.
Then start a root terminal session as usual, and call the script. It
mounts /tmp/.X11-unix from the host system into the chrooted one,
allowing you to start X applications from the command line and have them
appear on your normal X display (probably best to do 'su username' from
the chrooted prompt first if you want to do this.)

andy


#!/bin/bash
#
# testing-shell - start a root shell chrooted to the testing release.
# must be run as root

JAIL_ROOT=/jail # modify this to point to your chrooted directory.
PROGRAM=$0

if [ `id -u` -ne 0 ] ; then
echo "Must be run as root"
exit
fi

if [ `ps ax | grep $PROGRAM | grep -v grep | wc -l` -gt 2 ] ; then
# n.b. -gt 2 above is because the process forks so you get 2 lines
in the output.
echo "${PROGRAM##*/} seems to be running already - not preparing the
chrooted system."
else
echo "Preparing the chrooted system..."
mount /dev $JAIL_ROOT/dev -o bind
mount proc -t proc $JAIL_ROOT/proc
mount /tmp/.X11-unix $JAIL_ROOT/tmp/.X11-unix -o bind
cp /tmp/.X0-lock $JAIL_ROOT/tmp
fi
cp /etc/hosts $JAIL_ROOT/etc/hosts
echo "--- entering chrooted system --->"
echo

chroot $JAIL_ROOT /bin/bash

if [ `ps ax | grep $PROGRAM | grep -v grep | wc -l` -gt 2 ] ; then
echo "${PROGRAM##*/} still running - not taking down chrooted system."
else
# last one out clean up...
echo "Taking down the chrooted system..."
umount $JAIL_ROOT/dev
umount $JAIL_ROOT/proc
umount $JAIL_ROOT/tmp/.X11-unix
rm $JAIL_ROOT/tmp/.X0-lock
fi
echo "<--- returned to root system ---"
echo



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-17-2008, 05:22 PM
andy baxter
 
Default Problem with chrooted Etch

Roger Leigh wrote:

"Thomas H. George" <lists@tomgeorge.info> writes:



I installed this chrooted version of Etch as described in Debian
Reference - Debian tips, sections 8.6.35.1-4. From the console
(Ctl-Alt-F8) I can enter commands and edit files with no problems.
From X-Window (CTL-ATL-F9) I can launch programs - example: Gimp2.2 -
and access the internet - Gnome Web Browser 2.14.3 - but I can't do
any system administration or open a working terminal window.





Perhaps there is an ownership or permission issue that is the root of
the terminal problem? If so, I haven't been able to pin it down.



You need to have /dev/pts mounted inside the chroot in order to set up
the pseudo-terminal master/slave pair needed by the terminal emulator
to run a virtual terminal device.



I have recently been experimenting with a similar setup (running etch
but with a chrooted testing - lenny - installation on a separate
partition). I have the same problem as the OP even though I have mounted
(--bind) /dev from the 'real' installation. I don't understand why this
isn't good enough - shouldn't this bring in /dev/pts as well? Or is
there some reason why you have to mount that explicitly as well?

Also, I have written a short script to automatically prepare and begin a
chrooted session, which I have pasted below both in case anyone else
finds it useful, and for constructive criticism from anyone with more
skill than I have with this stuff who wants to comment. To use the
script, first edit the line 'JAIL_ROOT=/jail' to point to your chrooted
installation, then save it in /usr/local/bin on the non-chrooted system.
Then start a root terminal session as usual, and call the script. It
mounts /tmp/.X11-unix from the host system into the chrooted one,
allowing you to start X applications from the command line and have them
appear on your normal X display (probably best to do 'su username' from
the chrooted prompt first if you want to do this.)

andy


#!/bin/bash
#
# testing-shell - start a root shell chrooted to the testing release.
# must be run as root

JAIL_ROOT=/jail # modify this to point to your chrooted directory.
PROGRAM=$0

if [ `id -u` -ne 0 ] ; then
echo "Must be run as root"
exit
fi

if [ `ps ax | grep $PROGRAM | grep -v grep | wc -l` -gt 2 ] ; then
# n.b. -gt 2 above is because the process forks so you get 2 lines
in the output.
echo "${PROGRAM##*/} seems to be running already - not preparing the
chrooted system."
else
echo "Preparing the chrooted system..."
mount /dev $JAIL_ROOT/dev -o bind
mount proc -t proc $JAIL_ROOT/proc
mount /tmp/.X11-unix $JAIL_ROOT/tmp/.X11-unix -o bind
cp /tmp/.X0-lock $JAIL_ROOT/tmp
fi
cp /etc/hosts $JAIL_ROOT/etc/hosts
echo "--- entering chrooted system --->"
echo

chroot $JAIL_ROOT /bin/bash

if [ `ps ax | grep $PROGRAM | grep -v grep | wc -l` -gt 2 ] ; then
echo "${PROGRAM##*/} still running - not taking down chrooted system."
else
# last one out clean up...
echo "Taking down the chrooted system..."
umount $JAIL_ROOT/dev
umount $JAIL_ROOT/proc
umount $JAIL_ROOT/tmp/.X11-unix
rm $JAIL_ROOT/tmp/.X0-lock
fi
echo "<--- returned to root system ---"
echo




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-18-2008, 12:38 PM
andy baxter
 
Default Problem with chrooted Etch

andy baxter wrote:



#!/bin/bash
#
# testing-shell - start a root shell chrooted to the testing release.
# must be run as root

JAIL_ROOT=/jail # modify this to point to your chrooted directory.
PROGRAM=$0

if [ `id -u` -ne 0 ] ; then
echo "Must be run as root"
exit
fi

if [ `ps ax | grep $PROGRAM | grep -v grep | wc -l` -gt 2 ] ; then
# n.b. -gt 2 above is because the process forks so you get 2 lines
in the output.
echo "${PROGRAM##*/} seems to be running already - not preparing the
chrooted system."
else
echo "Preparing the chrooted system..."
mount /dev $JAIL_ROOT/dev -o bind

correction - should be -'... -o rbind'

mount proc -t proc $JAIL_ROOT/proc
mount /tmp/.X11-unix $JAIL_ROOT/tmp/.X11-unix -o bind
cp /tmp/.X0-lock $JAIL_ROOT/tmp
fi
cp /etc/hosts $JAIL_ROOT/etc/hosts
echo "--- entering chrooted system --->"
echo

chroot $JAIL_ROOT /bin/bash

if [ `ps ax | grep $PROGRAM | grep -v grep | wc -l` -gt 2 ] ; then
echo "${PROGRAM##*/} still running - not taking down chrooted system."
else
# last one out clean up...
echo "Taking down the chrooted system..."
umount $JAIL_ROOT/dev
umount $JAIL_ROOT/proc
umount $JAIL_ROOT/tmp/.X11-unix
rm $JAIL_ROOT/tmp/.X0-lock
fi
echo "<--- returned to root system ---"
echo







--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 06:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org