chroot services intercept with host system

Asked by Serhiy Zahoriya

Whenever I try to (re)start a service in chroot it affects the host system.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: coreutils 8.13-3ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-31.50-generic-pae 3.2.28
Uname: Linux 3.2.0-31-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu13
Architecture: i386
Date: Tue Oct 2 14:23:15 2012
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu coreutils Edit question
Assignee:
No assignee Edit question
Solved by:
Serhiy Zahoriya
Solved:
Last query:
Last reply:

This question was originally filed as bug #1060142.

Revision history for this message
Serhiy Zahoriya (xintx-ua) said :
#1
Revision history for this message
Ralph Corderoy (ralph-inputplus) said :
#2

I don't find there's enough information here to help and I'm guessing others will find the same. How are you (re)starting, what happens? Some more concrete data is needed.

Revision history for this message
Serhiy Zahoriya (xintx-ua) said :
#3

I had /proc /dev /dev/pts and /sys bind-mounted in the chroot.
Without them jobs don't start:

# service resolvconf start
start: Job failed to start

And with them services replace the host system ones. Is it possible to use services in a chroot?

Revision history for this message
Serhiy Zahoriya (xintx-ua) said :
#4

Maybe it was /sys ... Trying without it.

Revision history for this message
Ralph Corderoy (ralph-inputplus) said :
#5

Don't think this is a coreutils package question? Try asking the package responsible for your system command, e.g.
dpkg -S `which service`

Revision history for this message
Serhiy Zahoriya (xintx-ua) said :
#6

It worked without /sys.