9front on qemu with drawterm on linux

Rudimentary HOWTO about running the latest 9front on qemu and connecting to it with a drawterm running full rio wm from host linux system.

I’m using Fedora 43 here on x86_64 host machine but anything will do.

9front version I’ve tried is the ‘release’ one, regular amd64 install ISO.

This is not a full-fledged manual with detailed descriptions of anything, just a quick jumpstart.

  1. qemu-img create 9front.raw 32G

  2. To boot from ISO and install the system:

    qemu-system-x86_64 -enable-kvm -smp $(nproc) -m 8192 -cpu host -M q35 -cdrom ./9front-11321.amd64.iso -net nic -drive file=9front.raw,format=raw,media=disk,index=0,cache=writeback

  3. To boot normally (I usually put this into boot.sh, note the 17019 port passthrough):

    qemu-system-x86_64 -enable-kvm -smp $(nproc) -m 8192 -cpu host -M q35 -net nic -net user,hostfwd=tcp:127.0.0.1:17019-:17019 -drive file=9front.raw,format=raw,media=disk,index=0,cache=writeback

  4. Inside of the 9front system (I used this and this guides):

    Input your desired password at prompts.

    term% touch $home/lib/keys
    term% auth/keyfs -p $home/lib/keys
    ...
    term% auth/changeuser -p glenda
    ...
    term% auth/factotum -n
    term% echo 'key proto=dp9ik dom=9front user='$user' !password=mypassw' >/mnt/factotum/ctl
    term% aux/listen1 -t 'tcp!*!rcpu' /rc/bin/service/tcp17019
    

    The last command stays in foreground (unless you add & at the end).

  5. Clone the drawterm repository from git://git.9front.org/plan9front/drawterm

  6. Build it with CONF=unix make. You’ll need libX11-devel and libXt-devel.

  7. Connect to the 9front with ./drawterm -h 127.0.0.1 -u glenda, press Enter on first prompt of auth, then input your password.

  8. Run rio in terminal and voila!

You can run last 2 commands from step 4 (echoing into factotum ctl and running aux/listen1) without anything else on ’live’ installer session.

There are some better guides on proper setting up of the whole system (with separate auth servers for example) but I used this quick solution as a beginner in 9front to start feeling my way around.