In fact, giving gforth as init, enebles me to use a very efficient interpreter and, if I do factorize correctly the code, I can end-up with some significant gains.
Right now, by booting in gforth, without still executing any actual code, enables me to explore in the initial phase of initrd, just after the kernel has initialized itself.
I don't have anything available and, thus, have to bring all the necessary elements up but it is a good point make tests so I can design the init code to work efficiently.
My 1st round will re-implement the general lines on Puppy's 3.01 initrd, using gforth which is a much more effective programming environment than just /bin/sh.... :-)
And build all up to the switch_root point, in which I do the chroot on the directory where the unionfs was built and mounted.
I still have to decide what I am to include in the initrd as I do want to make it small (consumes precious RAM, and it is not reclamable, after it has served it's purpouse...) but after the switch_root, another gforth process will be spawned and then will start the general system initialization.
One of the first points is to get the normal initialization pressistent data from the elektra registry database.
And then, several options do open.
Probably, one of the first atempts, will be to create a Puppy-like boot (with or without the graphical interface).
But that is just one of the possible paths. And, mainly, as a personal system.
One of the things I do miss most on Puppy is not having a proper Sys-V INIT system, with run-levels and booting always to a login prompt.
So, even for simple systems, that is the way to go, especialy for systems to run unatteded.
And after the login, comes one of my "strangest" ideas...
The user area will be contained in a file with an ext2/ext3 filesystem (or any other, appropriated), which will be mounted at login.
At logout, the filesystem will be unmounted and will remain as just a file.
This will make user data backup SO MUCH EASIER!
I don't know yet if this is feasable or not but, so far, I can't se any reason why it should not be.
Well these are just some rough sketches of the general idea I've been developing and starting to put onto life... :-)
I'll keep posting here as work progress, though!