upstart as init in a chroot

Kir Kolyshkin kir at
Mon Mar 26 21:35:08 BST 2007

Brian J. Murrell wrote:
> On Sun, 2007-25-03 at 22:23 +0400, Kir Kolyshkin wrote:
>> Brian J. Murrell wrote:
>>> I would like to run upstart's init as "init" (not re-exec'd to telinit)
>>> in a chroot.  Here's the premise... I have a chroot of feisty that I
>>> built with debootstrap.  What I'd like to do now is:
>>> # chroot /mnt/feisty /sbin/init
>>> So that the chroot environment starts and runs like a regular linux
>>> system.
>> IMHO the best way to do what you want is to use something like OpenVZ.
> No, I'm not looking for a virtualization technology.

Well, it fact it's more like partitioning. You can think of OpenVZ as an 
advanced and secure chroot -- it is a very advanced chroot(), after all, 
since all the virtual environments (VEs) run under the very same, single 
kernel instance, and there is practically no performance degradation.

By the way, it solves the problem of PID #1 -- inside a VE the PID of 
init is 1. It also solves a few dosen other problems which chroot() can 

> I want simply run
> some daemons (a growing number as I migrate configuration from the
> "host" system to the chrooted system) in a chroot, and rather than have
> to start them all, one by one from a script in the host, it seemed to
> just be more straightforward to start upstart in the chroot and let it
> do it's thing.
What is the purpose of running some daemons under chroot()? What do you 
want to achieve?

More information about the upstart-devel mailing list