Plan9 continues

So Plan9 is becoming a very large time sink! After playing with a VM/QEMU I decided to buy a cheap minipc and install on some real hardware (Lenovo ThinkCentre with 16GB Ram and an i5 – £70 from eBay).

Installing the 9front fork of Plan9 is really easy. I did decide to complicate matters and use two drives so I had to manually partition them as the install script is quite simplistic (but really does make life easier!). Plan9 is a distributed OS. It needs a CPU server a file server, and auth(entication) server and then clients. Due to it’s quite ancient heritage the file system (CWFS) uses a cache and a WORM (write once read many) partition. Which in times gone by could have been an optical drive jukebox. As the name suggests this partition is read from, but writes are instead done to the fscache drive.

Other partitions are:

  • 9fat (DOS partition where the boot parameters are stored in a file called plan9.ini)
  • other
  • nvram (used to simulate a real NVRAM storage where authentication stuff is stored).

Drive/partition naming is very similar to linux


So for some inane reason I put the WORM partition on one largish SATA spinning drive and the rest on a different drive. Of course I made life harder for myself. plan9 prides itself on a simple filesystem. It does not really have command completion as the philosophy is that files should not be squirrelled away in hard to remember locations (you do have simple filename completion with CTRL – f). Not sure I quite agree with that, but what it does is automatically find portions and mount then (no stab needed here). But of course since my main partitions are on a separate drive which I went and attached to the second SATA port, then it cannot find them so I do have to specify them in plan9.ini

9fs 9fat
cd /n/9fat
acme /n/9fat/plan9.ini

(More on acme later. A quick to learn but wacky text editor).

Of course I found this out the hard way with an unbootable system in configuring the system to allow remote connections (see next section). But a quick reboot from the install USB stick. I mounted the 9fat partition. Unfortunately without a graphical environment none of the text editors worked. But sed does. A quick reboot later and all was well. But now I do create backups when I edit plan9.ini!

Now how do I connect to this headless plan9 server. With Drawterm of course! Drawterm is an emulated plan9 client. Calling it emulated is not really accurate as it runs natively on whatever OS you install on (for me that was Linux) and it brings the 9p protocol to connect.

But to do this you need to configure the authentication server and allow remote connections

Anyway with the networked OS model I got Drawterm working on Linux and the CPU, file and auth servers are all running on the ThinkCentre.

So after quite a few hours I find myself with this!

Drawterm on the right, Plan9 under QEMU on the left

Plan9 running under QEMU, with Drawterm on the right connected to a real Plan9 server.

Spot the difference?

No, me neither!