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!

Taking procrastination further – Installing Plan9 under QEMU

So instead of doing something useful and needed (like gardening!) during a few hours off last week I decided that what I really needed to do was install plan9!

A few months back I got various Windows NT VMs and OS/2 VMs running. Then Haiku (a port of BeOs) the other week and now this….!

I started with the last “official” build of Plan 9. This was difficult and I had to abandon it as I just could not get it sufficiently configured to launch Rio (the window manager). However, further googling shows that there is a port of plan9 called 9front. This is under continual development and the build I installed was just a few months old. Under QEMU (using libvirtd) it was a pretty hassle free install.

Once installed I found that there is also a recent port of NetSurf, as the two existing browsers are a few decades behind. Downloading the sources from Git, compiling and installing was quite straightforward. The only hurdle was that text does not auto scroll in terminals. Not a significant hurdle you may think. But I guess due to “everything is a file” when the text reaches the end of the terminal then the process stops working. Here as soon as the build script got to the bottom of the terminal it just stopped compiling. Luckily there is an auto scroll option.

  • Middle click and choose SCROLL/NOSCROLL
  • Incidentally you really need a three button mouse. For example to open a new terminal:

  • Choose NEW
  • The cursor changes to a cross. With the RIGHT MOUSE BUTTON draw where you need the new terminal to be.
  • Screenshot from 2023 09 08 14 18 18

    Screenshot from 2023 09 11 12 31 52

    I have no idea what I will do with it. But that goes for more or less all the VMs I have. Install, fire up a few times, then never again.