User Tools

Site Tools


Plan 9 / 9Front, the namespace, and an interactive terminal

  • This tutorial is intended for SDF Boot Camp participants, providing them and overview.
  • It's an accompaniment to the SDF Plan 9 Boot Camp tutorials.
  • And, a tutorial about the Raspberry Pi 2 B.
    • An amd64 terminal (term%) is an optional topic.

DRAFT tutorial

====== 9front terminal on a Raspberry Pi 2 B ======



This is a tutorial about setting-up the Plan 9 9front 1 operating system, as a terminal on a Raspberry Pi 2 Model B. The tutorial is aimed at participants in the SDF Plan 9 Boot Camp 2, but should be useful to other SDF VPS users.

The following steps assume that you have edited files while user “glenda”, have run '% fshalt' from the VPS console rc prompt (%) or Drawterm rio rc prompt (%), been able to “[s] - Force Shutdown”, “[r] - reset or start” from the VPS Maintenance Shell, and have used 9front Drawterm successfully.

The SDF Plan 9 / 9Front VPS, 9front Drawterm, and a 9front 9pi terminal are independent. This tutorial is for educational purposes, and provides additional information about a 9pi. The 9front Drawterm works very well. Yet, some participants may decide to read about a 9pi terminal. The SDF Boot Camp participants study virtualized amd64 9front.

1 Plan9front (or 9front) is a fork of the Plan 9 from Bell Labs operating system; Plan 9 Derivatives and forks. 2 Booting

Less ambitious:


Nightly ISO


The pi.img file can be used for Raspberry Pi 1, 2, and 3.
The pi3.img file can be used for Raspberry Pi 3 and 4 (11/23/2023; 9FRONT “HUMANBIOLOGICS” RELEASED (2023/11/22)).

The pi3.img file can be used for Raspberry Pi 3 and 4 (11/18/2023; 9FRONT “DON’T TOUCH THE ARTWORK” RELEASED (2023/06/25).)
ISO 3) or Nightly ISO? 4 months 23 days
✔ Nightly ISO 4)
The pi3.img file can be used for Raspberry Pi 3 and 4 (1/27/2021; 9FRONT “EMAILSCHADEN” RELEASED 2020/10/19).


More ambitious:

Appendix J - Junk
Raspberry Pi


[:!:] 5)CAUTION[:!:] 6)CAUTION[:!:] 7)CAUTION[:!:] 8)

Cautionary instructions for working with SD cards can be found here:

Installing operating system images (1/27/2021; external archive)
“Writing the image”
“How you write the image to the SD card will depend on the operating system you are using.”

  • Linux
  • Mac OS
  • Windows
  • Chrome OS

The copy to an SD card process:


[:!:] 9)Run lsblk -p to see which devices are currently connected to your machine.
[:!:] 10)The mentioned /dev/sdc may not apply to your machine. Locate the proper SD card designation, first.
[:!:] 11)Do not guess. Verify first.
..Optionally, a separate computer can be used, where there is no danger of damaging a hard drive.
  • Run lsblk -p to see which devices are currently connected to your machine.
     lsblk -p
  • ( [:!:] 12) CAUTION) /dev/sdc may not apply to your machine.
    sudo dd bs=1M if=9pi.img of=/dev/sdc
    lsblk -p
    umount /dev/sdc1

The copy image process:

  • Insert the MicroSD card.
    • Start the Raspberry Pi 2 B.
% 9fs pidos
% cp /sys/src/9/bcm/9pi2 /n/pidos/9pi2

Edit cmdline.txt if needed:

% cd /n/pidos/
% lc cmdline.txt
% sam cmdline.txt
[:!:]13)Add text with a single space separator, for example “mouseport=ps2intellimouse”; all “cmdline.txt” entries remain on a single line.

Example of additional cmdline.txt text:

console=0 mouseport=ps2intellimouse
  • Optional ( [:!:] 14) CAUTION) example:
     console=0 mouseport=ps2intellimouse nobootprompt=local!#S/sdM0/fs user=glenda
    • [:!:] 15) local!#S/sdM0/fs is an example only.
      • Boot the 9pi without the optional example.
      • Replace local!#S/sdM0/fs with what is displayed during a successful boot.

An overclock the Pi 2 B process:

Modify (optional) the default config.txt file:


A start networking process:

  • The example is using DHCP.
  • [:!:] 16) The ndb/dns example is only applied initially, and not required for Less ambitious. The results are retained. Entering it again will result in a message: “another dns instance is running”.
     % ndb/dns
  •  % ip/ipconfig


Configure a Time zone process:

The shutdown process:

  •  % fshalt

The start network process:

  • Start the Raspberry Pi.
    % ip/ipconfig
    % date
    • Check the date after waiting a minute, if needed for validating the network connection.
      % date


The pi.img file can be used for Raspberry Pi 1, 2, and 3.
The pi3.img file can be used for Raspberry Pi 3 and 4. The “/sys/src/9/bcm/9pi2” is intended for the Raspberry Pi 2, or Raspberry Pi 3, only.

A Plan 9 9front SDF Boot Camp tutorial application

  1. From the Plan 9 VPS Drawterm rio rc cpu prompt (%):
     % aux/listen1 -t 'tcp!*!rcpu' /rc/bin/service/tcp17019
  2. From the Plan 9 9front Raspberry Pi rio rc terminal prompt (%):
     % rcpu -h YOUR_IP -u glenda
    1. (This may take time.)
  3. From the Plan 9 VPS Drawterm rio rc prompt (%):
    1. Press the [Delete] key once.
    2. Enter the following to determine if any additional rcpu listening remains active.
       % ps -a | grep rcpu
  • Note: Half the battle is figuring out where to place the mice, since two mice are the used in this tutorial.
    • The mentioned 9pi terminal prompt (term%) features were absent until the 9pi was connected (rcpu) to a cpu.
      • The mentioned 9pi terminal feature behavior may provide a topic for further discussion.
  • The 9pi terminal example is not intended to replace Drawterm.
    • Additional review is required to determine if a 9pi terminal is suitable.
      • Further study 17) is necessary to configure a 9pi cpu.
  • The 9pi terminal may benefit from additional configuration (TBD).

Additional files:

  • Create a file on the cpu (cpu%) machine.
    echo 'invite 9pi .. please connect.'
    aux/listen1 -t 'tcp!*!rcpu' /rc/bin/service/tcp17019
    • chmod 755 invitemy9pi
  • Create a file on the 9pi term (term%) machine.
    echo 'receive 9pi .. please connect.'
    rcpu -h YOUR_IP -u glenda
    • chmod 755 recmy9pi

A Plan 9 9front rcpu application

From the plan9front Raspberry Pi rio rc terminal prompt (%):

Edit the /lib/ndb/local file:

  • The echo ' authdom=9sdf' >> /lib/ndb/local is only applied initially. The results are retained.
     % echo ' authdom=9sdf' >> /lib/ndb/local

Check if factotum is running:

term% ps | grep factotum
glenda          100    0:00   0:00      168K Pread    factotum
  • Start factotum if it is not running.
    term% auth/factotum


  • A user name (-u USER) is required.
    % rcpu -h -u USER
  • Once connected to
    cpu% cd $home
  • Start the rio 18) 19) window system:
    cpu% rio

An incorrect password repair example:

% cat /mnt/factotum/ctl
key proto=dp9ik dom=9sdf user=USER !password?
% echo 'delkey proto=dp9ik dom=9sdf user=USER' > /mnt/factotum/ctl

Updating the 9pi

I.) Updating the 9pi system:
1. type 'sysupdate' - note if changes are brought in.
   (you can 'cat /bin/sysupdate' to see how it works)
2. cd /
3. . /sys/lib/rootstub      (you can 'cat /sys/lib/rootstub' to see)
4. cd /sys/src
5. mk install
II.) Updating the kernel:
1. cd /sys/src/9/bcm
2. mk
III.) Installing the new kernel:
1. type 9fs pidos
# be careful:
2. cp /sys/src/9/bcm/9pi2 /n/pidos/9pi2
3. fshalt -r
IV.) The 9pi should boot completely up-to-date.
  • Installing the new kernel:
    % cd
    % 9fs pidos
    % cp /sys/src/9/bcm/9pi2 /n/pidos/9pi2
    % fshalt -r
  • Start networking & check date:
    % ip/ipconfig
    % date

Spreading the word about SDF

xDRAFT [:FIXME:] 22)
xnewuser; con -C /srv/hjfs.cmd
xsdflink; …postcom, bboard -s

To be determined

Least ambitious?:

  • It may be possible to use a 9front terminal (term%) from a CD-Rom boot [:FIXME:] 23).
    • The hardware must support networking.
    • Exclude timezone configuration step.
    • To be determined
1) , 3)
The Raspberry Pi 2 Model B available memory is limited, failing if there are too many updates, during an initial sysupdate.
2) , 4)
A recent Nightly ISO may have an update, during an initial sysupdate.
5) , 6) , 7) , 8) , 9) , 10) , 11) , 12) , 13) , 14) , 15) , 16)
The [:!:] is interchangeable with a [CAUTION], for the abaco, and mothra browsers. :!:
22) , 23)
The [:FIXME:] is interchangeable with a [FIXME], for the abaco, and mothra browsers. FIXME
plan9front_terminal_on_a_raspberry_pi_2_b.txt · Last modified: 2023/11/24 03:30 by hc9