Local File System Modifications to 9vx
This tarball contains changes to 9vx that make it able
to use a local, native Plan 9 partition as the root file
system. The changes amount to the following:
- Devsd/sdloop now searches for any local drives it
can serve and extracts the partition information from
them.
- The 9vx image now contains fossil and venti
as expected by the Plan 9 boot program when using a
local file system.
- 9vx now has an option to read an initialization file
in the format of plan9.ini. The entries in it are just
added to the environment before the boot program
is run. Device-specific parsing is missing, but the
menu processing is still there.
Installation instructions:
- Unpack this tarball in the root of the vx32 tree. That
will put the new files in the right places.
- Apply the changes in the diffs file. These were created
with hg diff against the mercurial repository as of July 24,
2008. In principle, you should be able to use patch to do
this.
- Copy /bin/fossil/fossil and /bin/venti/venti
from a Plan 9 tree to src/9vx/fossil.9 and
src/9vx/venti.9, respectively.
- Edit /sys/src/9/boot/local.c and change line 171:
< fatal("open /net/ipifc/clone for loopback");
---
> return;
- Build a pcf kernel and copy bootpcf.out to src/9vx/bootcode.9.
- Rebuild 9vx and you should be good.
I've put
bootcode.9,
fossil.9, and
venti.9 files
here for convenience.
Ini file:
The optional .ini file is specified with the -p option to 9vx.
Starting 9vx with the command:
9vx -b -p 9vx.ini
will boot it like a native kernel and will process the 9vx.ini
file prior to running boot/boot. As an example, the 9vx.ini
file:
[menu]
menuitem=native, Local fossil/venti fs
menuitem=home, Home terminal
menuitem=prompt, Prompt
[native]
nobootprompt=local!#S/sd00/
venti=#S/sd00/arenas
user=glenda
[home]
nobootprompt=tcp
fs=172.30.1.2
auth=172.30.1.2
user=glenda
[prompt]
will give you a menu of three options. The first is suitable
for running with a local Plan 9 partition as the root. The
second boots like a terminal using a file/auth server.
The third gives you the same prompt you'd get with no
.ini file processing.
Caveat: The timeout option for a default menu option is
not currently supported.