5

Sometimes when I chroot into some folder , I could use reboot to reset my box, but sometimes I can't.

So I want to know why I could do that sometimes and why.

UPDATE

The chroot environment is another Linux system installed on a different partition and I prepare the chroot as follows:

mount --bind /dev chroot/dev
mount --bind /sys chroot/sys
mount -t proc proc chroot/proc
4
  • 2
    Are we really expected to know what your chroot environment looks like? May 14, 2012 at 6:07
  • I second the request for more information. How exactly do you enter the chroot? What sequence of commands do you use? May 14, 2012 at 6:37
  • updated , please check
    – daisy
    May 14, 2012 at 6:39
  • 2
    So in which cases were you NOT able to reboot? What was different?
    – Nils
    May 14, 2012 at 21:18

1 Answer 1

8

It's /dev/initctl, which is (often? always?) used to interact with init (pid 1), e.g. Upstart.

From your updated chroot entrance sequence, you bound /dev/, so there is a /dev/initctl in your chroot. Triggering a reboot can this way reboot your system.

This probably won't be this way much longer, as many distributions (e.g. Debian) introduce /run/, where initctl then resides.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .