shutdown busybox and start another PID1 process
James Bowlin
bitjam at gmail.com
Tue Aug 12 04:44:13 UTC 2014
On Mon, Aug 11, 2014 at 07:35 PM, Harald Becker said:
> Did I get it right?
This is very close to what I'm doing now. The two changes are:
1) I boot into Debian so I switch_root into their /sbin/init
and I use "telinit u" to get back pid 1.
2) I copy busybox et al. into the new root before switching
so I don't need to unpack. I suppose unpacking is slightly
safer but I have things I need to communicate to the booted
systems anyway. This is partly a holdover from Knoppix
design I started with that used symlinks instead of a
switch_root. Then I moved to bind mounts which were much
better but eventually a few programs were unhappy with them
so I ended up with the switch_root and I copied the BB stuff
over so programs on the booted system that I communicated to
didn't need to be changed.
I also like the consistency of having my busybox stuff almost
always under /live even though I have to copy things around
to make it so.
BTW: I wrote a space invaders game in busybox-shell, although I
cheated a little and wrote a tiny C program called getch that
gives me non-blocking input. Maybe there is already a way to
do that built in. If not, a getch applet might be very handy.
It is a small thing but it is all that is needed to write
truly interactive scripts with just busybox. IMO it would
open the door to some really neat things.
Peace, James
More information about the busybox
mailing list