NodeOS/NodeOS — pull request #64 by piranna (2014-09-16 01:56:44+00:00)
Title: Simple layers

I've changed the layers design, making it more simple but also warranting that all of them are bootable:

- *initramfs* just a Node.js REPL
- *rootfs* a Node.js REPL but with a root partition mounted, since initramfs should be read-only
- *usersfs* the same as rootfs, but mounting a home partition and launching a shell with downgraded priviledges, since root user should only be used for start-up

This layers structure allow to anyone to pick the base system they wants, being just a Node.js shell or a single user environment or an isolated multi-user environment. They are the same for Docker & QEmu. I'm not using AUFS for initramfs and rootfs since it's not available on the kernel, we should think about add the module to the initramfs and play a little bit more with it (it's not easy to manage...), but I think for now we have a good basis where to work to finish the alpha so we can be able to generate the new Docker images from here.

I've also sync'd the filesystem layouts of both Docker and QEmu builds and also improved the behaviour of both, being the only difference that in Docker you can't owner /dev/console so you can not launch a getty instance. This cause to ```forever``` to spin indefinitelly so I'm checking the environment and launching a plain shell instead. The good thing of using getty with forever launched by a priviledged root user (let's try it's only used for startup purposses) is that shells are isolated from booting mechanism and also allow to use a ```login``` executable (that needs to be writeen), so we can easily have multi-user support :-)