Outline, as for sinit (please don't try this before you get that one working):A simple init. This is what you get from telling me that I can't use an init written in bash.
The init itself is dumb as bricks.
1. Get the spark script from here: https://github.com/fbt/spark/blob/master/bin/spark-init
2. Put it in sbin, and modify the first few lines to use your sinitrc script:
Code: Select all
cfg_init_cmd='/sbin/sinitrc init'
cfg_reboot_cmd='/sbin/sinitrc reboot'
cfg_poweroff_cmd='/sbin/sinitrc poweroff'
4. Modify the GRUB kernel boot line to include "init=/sbin/spark" or symlink /sbin/spark to /sbin/init.
5. Reboot, sacrifice a goat and pray.
I have this working, but not well. tty1 does not work (but tty2 does) -- I think it has something to do with the respawn script and possibly permissions, but I just haven't figured it out yet. In any event it is an interesting experiment in just how minimal an init can be. If you try this, please post your results.