chroot services intercept with host system

Asked by Serhiy Zahoriya on 2012-10-02

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

English Edit question
Ubuntu coreutils Edit question
No assignee Edit question
Solved by:
Serhiy Zahoriya
Last query:
Last reply:

This question was originally filed as bug #1060142.

Serhiy Zahoriya (xintx-ua) said : #1

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.

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?

Serhiy Zahoriya (xintx-ua) said : #4

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

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

Serhiy Zahoriya (xintx-ua) said : #6

It worked without /sys.