|
After the kernel boots, it execs /boot (see boot(8)), which in
turn execs plan9rc. plan9rc(8) reads file if given (usually it
is not) to set up environment variables. It checks the $service
environment variable cpu or terminal, to set defaults, then proceeds
as an rc(1) script to bring the system up. It first uses
paqfs(4) to mount /boot/bootpaq behind both /bin and /boot to
access additional programs.
plan9rc makes use of two additional scripts by default, ramskel
and initskel. ramskel starts a ramfs(4) and loads in the skel.tar
stored in the bootpaq, and optionally loads an additional user–specified
.tgz from ramfs(4) also. A default tools.tgz is provided by the
author and recommended as a good default set of
additional programs to have available.
Initskel is comparable to a cpurc(8) script which sets up services
for the ramrooted environment. It also has interactive and non–interactive
modes which follow the same environment variable. It's default
actions are to bind standard devices, begin internet service if
it was not already, and start hubfs(4) and rxexec(8) and
cpu(1) and exportfs(4) listeners with listen1(8). The cpu and
exportfs listener are started on non–standard ports to avoid conflicting
with the main system's cpurc(8). The initskel also has non–default
options for starting its own ndb(8) cs/dns and keyfs(4) and authsrv(6)
if desired.
|