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.


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
  • 2
    Are we really expected to know what your chroot environment looks like? – Ignacio Vazquez-Abrams May 14 '12 at 6:07
  • I second the request for more information. How exactly do you enter the chroot? What sequence of commands do you use? – rozcietrzewiacz May 14 '12 at 6:37
  • updated , please check – daisy May 14 '12 at 6:39
  • 2
    So in which cases were you NOT able to reboot? What was different? – Nils May 14 '12 at 21:18

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.