Site logo
Stories around the Genode Operating System RSS feed
Emery Hemingway avatar

Serving the local depot over 9P


Some people have asked about deploying their "local" packages from a Linux build machine to a Sculpt host, and I use 9P. I have put together a package of my 9P server specifically for serving depot/local using the internal Sculpt network which I will briefly explain. Using the 9P protocol is in some ways more convenient than a VirtualBox shared folder because it can be started and stopped as in independent subsystem rather than a VBox-builtin, the client is usually built into the Linux kernel, and of course, it works with modern operating systems such as 9front.

The server is available from my depot under Utilities/depot_9P and requires access to the root of the file-system hosting the depot (ahci-0.1.fs for example) and access to the nic_router. The server is jailed to /depot/local during initialization so it shouldn't be able to access any other directories. We can hope that eventually we get a graphical "change-root" component, but for now the server expects the root server as a convenience. The IP address of the server is hardcoded to 10.0.1.99 so it should be easy to remeber.

To mount the server from the Linux command line of a VirtualBox guest:

 mount -t 9p 10.0.1.99 /mnt

To add the server to /etc/fstab in a way that the user can mount and unmount at will:

 10.0.1.99       /n/genode       9p      noauto,user     0 0

Mounting the server from an external machine is more complicated because the 9P port must be forwarded through the nic_router.

My true reasons for writing a 9P server will be revealed in later posts...

Addendum

========

The source code of the server is here: https://github.com/ehmry/ninep

The package recipe is here: https://github.com/ehmry/genode-ehmry/tree/master/runtimes/depot_9P