A little while back Russ suggested that someone might
want to look into making 9vx boot using a native
fossil/venti file system partition for root.  For
anyone who's interested, as of this morning, that
is working.  It's a little kludgy in places, but
mostly it's not too bad.  When I've cleaned it up
a bit I'll make some patches available.

If you care about the gory details:
- Putting fossil and venti in the 9vx image was the
easy part.
- Making sdloop identify the available disks on
startup wasn't too bad.  I couldn't think of a
better way to search than to look for the common
naming schemes: sd[a-j0-9], hd[a-j], wd[0-9],
cciss/c[0-8]d[0-8].  The only gotcha was that
this happened too early for namec() to work, so
I deferred namec() until the first attempt to use
the device.
- boot/boot did bad things if the localroot
wasn't set, so when using boot/boot it's now .
- The kernel normally gets the partitioning for
the root drive from 9load, but we don't have
9load here.  So I stole part.c from /sys/src/boot
and "adjusted" it and devsd.c to play nice
together.
- The messiest bit, though, is venti and networking.
boot/boot figures it needs to set up the loopback
interface for venti.  But /net/ipifc doesn't exit
and boot/boot considers this fatal.  I suppose
the Right Way(tm) to is to implement /net/ipifc
and have it translate operations to the underlying
network stack, but that seems an awful lot of
work, for rather few applications.  The not so
right way would be to fake it, providing the
interface, but just pretend all the messages
succeed.  But I copped out.  I made one change
to boot/boot.  Now if it fails to open /net/ipifc/clone,
it's not fatal.

Thanks,
BLS


Reply via email to