akaros/Documentation/using_go9p_netroot
<<
>>
Prefs
   1We can serve the root file system for NxM directly from Linux or OS X,
   2allowing access to the full Linux namespace during run-time.
   3For this, we use go9p. 
   4
   5You need to have Go installed, e.g.
   6
   7pacman -S go
   8
   9apt-get install golang
  10
  11You should now have things set up in /usr/lib/go.
  12To install new things, as a non-priveleged user,
  13you need a local place to build packages.
  14
  15Set a GOPATH, e.g.
  16 $ export GOPATH=~/go:/usr/lib/go
  17 $ go get github.com/rminnich/go9p/ufs # fetches dependencies
  18
  19This *should* work
  20
  21 $ go install github.com/rminnich/go9p/ufs
  22
  23ufs ends up in:
  24
  25/home/rminnich/go/bin/ufs
  26
  27You can now run ufs, specifying the appropriate root directory:
  28
  29 $ sudo ~/go/bin/ufs -addr=:564 -root=whereever
  30
  31Here is an example qemu command which some of us use:
  32
  33A more complex usage (Ron's case) involves serving a root file system
  34to an NxM instance being run on an Arch virtual machine guest in
  35vmware fusion. That's not near as hard as it sounds. The OSX machine
  36is called rminnich-macbookair; the arch Linux guest VM is called arch.
  37
  38On OSX, we start two commands:
  39
  40$ ufs -addr:7777
  41
  42$ ssh -R 564:rminnich-macbookair:7777 root@arch
  43
  44This ssh command sets up a reverse proxy on the arch linux guest to
  45the ufs server running on OSX.  On arch linux, we run the qemu command
  46shown above. When we get the root is from prompt, we use the ip
  47address 10.0.2.2. That's it.
  48