User Tools

Site Tools


vps_-_9front

9front on an SDF VPS

An image1 might appear here. A redirect to the SDF VPS - Plan 9 / 9Front home, includes SDF html and wiki tutorials mentioned in the Table of Contents.

/contrib/???/9front-notes
            @@@@@@   @@@@@@@@  @@@@@@@    @@@@@@   @@@  @@@  @@@@@@@
           @@@@@@@@  @@@@@@@@  @@@@@@@@  @@@@@@@@  @@@@ @@@  @@@@@@@
           @@!  @@@  @@!       @@!  @@@  @@!  @@@  @@!@!@@@    @@!  
           !@!  @!@  !@!       !@!  @!@  !@!  @!@  !@!!@!@!    !@!  
           !!@!!@!!  @!!!:!    @!@!!@!   @!@  !@!  @!@ !!@!    @!!  
             !!@!!!  !!!!!:    !!@!@!    !@!  !!!  !@!  !!!    !!!  
                !!!  !!:       !!: :!!   !!:  !!!  !!:  !!!    !!:  
                !:!  :!:       :!:  !:!  :!:  !:!  :!:  !:!    :!:  
           ::::: ::   ::       ::   :::  ::::: ::   ::   ::     ::  
            : :  :    :         :   : :   : :  :   ::    :      :

About

This is the tutorial for setting-up the 9front2 operating system in a VPS slice on SDF. The tutorial is aimed at participants in the SDF Plan 9 Boot Camp3, but should be useful to other SDF VPS users. More recently, the Boot Camp participants will begin studying virtualized amd64 9front.

xAn amd64 9front supplement to the SDF Plan 9 Boot Camp arrived in 2021.

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

Getting Involved

Plan 9 has active communities which mostly interact by email. You are encouraged to join the 9fans mailing list where discussion about Plan 9, and related technologies occur.

SDF hosts the plan9-l mailing list for participants in the Plan 9 Boot Camp. Email 'majordomo' and 'subscribe plan9-l' to join.

Of the various VPS that SDF offers1, the SDF Plan 9 Boot Camp VPS is the only VPS provided without subscription, to SDF MetaARPA2 members. The Boot Camp VPS slice includes cluster access to the SDF Plan 9 Community 9p server. With your help, Plan 9 participation at SDF can continue to promote networking, learning and participation. To request an SDF Boot Camp Plan 9 VPS, type 'plan9' at the SDF shell3 ($ plan9).

1 VPS membership, or participation, required. 2 Type 'meta' at the SDF shell ($ meta) for details. 3 UNIX Shell Account.

Console Menu and Shell

xctl-h is backspace, kind of; ctl-u erases the current line. As seen, with the VPS Plan 9 console prompt ctl-h backspace, the screen output may not be what one would expect1.
xTo detach the Plan 9 console prompt (%), while retaining the ability to reattach it without rebooting your server, press ctl-] to close the prompt (%). Then, press 'q' to disconnect the VPS Maintenance Shell menu, and ssh connection. You can return again with another ssh to the allocated VPS server, an SDF VPS Maintenance Shell menu review, and a press on the 'c' key to connect to the Plan 9 console prompt (%).

1 Control keys -- Available at the SDF Boot Camp VPS server console prompt

Getting started

xIf you are reviewing this, and want to 9front Drawterm to the new 9front Boot Camp VPS follow this suggested path.
xInstall the 9front Drawterm, since it's needed for the 9front Boot Camp VPS.
xWrite down your Plan 9 Boot Camp password (except for the Plan 9 Drawterm password).
xWrite down your Plan 9 Boot Camp IP address (YOUR_IP, as seen in the reminder below).
xThe VPS Maintenance Shell console will ask for the password before confirming a shutdown 's', or a start 'r'. Keep your password nearby.
xRequest assistance, encouragement, or help.
xcom
xYOUR_IP (You will need the Plan 9 VPS IP address, please record it.)
xMachine identity # (Top line of the VPS Maintenance Shell menu)
xAn 's' reminder, and other options. (9front VPS Maintenance Shell commands)
xWhat Drawterm am I using? Do I need another? $ ./drawterm –help (A 9front Drawterm comparison.)
xThe 9front Drawterm files.

Install

After receiving notification of an allocated VPS slice, connect by '$ ssh <SDF member ID>@<VPS slice>.sdf.org'. The password1 is the same as your SDF member login. At the VPS Maintenance Shell menu, type 'x' for a Clean Install.

  % WARNING! YOU WILL LOSE YOUR DATA!
  
  This function allows you to completely destroy your plan9 image
  and install a fresh generic distribution.
  
  Do you wish to continue? (yes/no) yes
  % Copying a fresh plan9 image [PLEASE WAIT]
xThis may take time.
 % Copying a fresh plan9 image [PLEASE WAIT] [COMPLETE]
 (continue)
xPress the '[Enter]' key to continue to the VPS Maintenance Shell.

Basics

When the Plan 9 system boots, it will ask where root is from (the network, or a local disk). Just press the '[Enter]' key to select local (the default), “bootargs is (tcp, tls, il, local!device)[local!/dev/sdC0/fscache]”. Next, there will be prompt to login. Press the '[Enter]' key to login as the Plan 9 default “user[glenda]:”.

  bootargs is (tcp, tls, il, local!device)[local!/dev/sdC0/fscache]
  user[glenda]:

You will now see the Plan 9 VPS console rc prompt (%), Plan 9's shell.

Plan 9 shell

xctl-h is backspace, kind of; ctl-u erases the current line. As seen, with the VPS Plan 9 console prompt ctl-h backspace, the screen output may not be what one would expect.
xTo detach the Plan 9 console prompt (%), while retaining the ability to reattach it without rebooting your server, press ctl-] to close the prompt (%). Then, press 'q' to disconnect the VPS Maintenance Shell menu, and ssh connection. You can return again with another ssh to the allocated VPS server, an SDF VPS Maintenance Shell menu review, and a press on the 'c' key to connect to the Plan 9 console prompt (%).
Plan 9 Rc shellPlan 9 Rc Survival Guide

1 A VPS password change option is available from the VPS Maintenance Shell, after login.

Networking

xNetworking: The “Networking” description from the “Plan 9 on an SDF VPS” may not apply to this tutorial.
xReview the /usr/glenda/start file, or rc script, from the VPS console prompt (%).
  term% cat /usr/glenda/start

The mentioned /usr/glenda/start file does not require immediate editing. Very minor edits1 can be made with % ed, or % sam -d, from the VPS console prompt (%), or later with % ed, % sam, or % acme, from the Drawterm rio rc prompt (%).

xThis shutdown and restart section applies, and is necessary2 after an % fshalt, before the networking is restarted.

1 % man dp9ik 2 % fshalt from an rc prompt (%), then at the “VPS Maintenance Shell” enter 's' - force shutdown, then enter 'r' - reset or start.

9front Drawterm

Drawterm1 is essentially a BLIT terminal emulator which allows you to connect to your 9front system and load the rio windowing system. rio is a direct successor of UNIX 'layers' and Plan 9 '8½'.

  $ ./drawterm -h YOUR_IP -u glenda

From the 9front Drawterm screen

1Press [Enter] once.
2Type your Drawterm password, then press [Enter].
Plan 9 Console Keyboard activity
auth[your.IP.exhibt.here]: ⇐ Press [Enter] once.
glenda@plan9 dp9ik password: ⇐ Type your Drawterm password, then press [Enter]
The cpu: failed to chdir to message is not uncommon.

From rio:

New ⇐ release the button here
Resize
Move
Delete
Hide
1At the rio grey screen, press the right button of your mouse. A menu (above) should appear. Then, release the button over the “New” option.
2Now, press the right button again near the upper-left corner of Drawterm, and drag the mouse to the lower-right before releasing the button, drawing a rectangle.
New
Resize
Move
Delete ⇐ delete a window gracefully
Hide
There is a “Delete” option in addition to the “New” option. This “Delete” option is useful. It will delete a window gracefully.
New
Resize
Move
Delete
Hide ⇐ hide a window
There is a “Hide” option in addition to the “New” option.

1 Drawterm is a X11 application that allows one to connect to a remote Plan 9 server…; a graphical client for Plan 9 CPU servers. DRAWTERM http://drawterm.9front.org

Drawterm and file transfer

A 9front Drawterm note:

Command 9front Drawterm output
$ ./drawterm –helpusage: drawterm [-GBO] [-h host] [-u user] [-a authserver] [-s secstore] [-e 'crypt hash'] [-k keypattern] [-p] [-t timeout] [-r root] [-c cmd …]
Although missing from the “$ ./drawterm –help” output, the “-r /path/to/local/directory” option will show the “/path/to/local/directory” files in “/mnt/term”. This means that you can transfer files between the computer that you are connecting from and your 9front VPS simply by copying files in /mnt/term and getting them from your computer (or the reverse.)
Example: $ ./drawterm -h YOUR_IP -u glenda -r /path/to/local/directory

Closing Drawterm

Introduction to Operating Systems Abstractions Using Plan 9 from Bell Labs (pdf; external archive)
1.3. Leaving the system; Page 6.
To leave your terminal you have all you need. Press the terminal power button (don’t look at the window system for it) and switch it off. Because the files are kept in the file server, any file you changed is already kept safe in the file server. Your terminal has nothing to save. You can switch it off at any time.

local os:

Drawterm application
Quit⇐ select quit

A 9front rcpu application

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

Edit the /lib/ndb/local file:

xThe echo 'auth=9p.sdf.org authdom=9sdf' » /lib/ndb/local is only applied initially. The results are retained.
% echo 'auth=9p.sdf.org authdom=9sdf' >> /lib/ndb/local

Check if factotum is running:

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

RCPU to 9p.sdf.org

xA 9p.sdf.org user name (-u USER) is required.
% rcpu -h 9p.sdf.org -u USER
password:
!
xOnce connected to 9p.sdf.org:
cpu% cd $home
xStart the rio1,2 window system:
cpu% rio
xStart stats -lmisce in a new rio1,2 rc window:
cpu% stats -lmisce

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
%

1 More about rio 2 More details about rio

9front VPS update tasks

x'sysupdate' is reserved1 for the user glenda (Thu Jan 14 08:07:38 GMT 2021).
xThe VPS Maintenance Shell console will ask for the password before confirming a shutdown [s], or a start [r]. Keep your password nearby.
xStep “II.) Updating your system” (% mk install) will take time.
xOptionally, select “scroll” to toggle the window scroll (on). This will reduce the need to manually scroll during the install.
/plan9-l/Have_fun/there_is_a_lot_we_can_do_now/
Tasks I.,II., and III., are preformed from the 9front Drawterm VPS connection,
or 9front Drawterm rio rc prompt (%).
 
Task IV. is preformed from the 9front VPS Maintenance Shell console rc prompt (%).
   a.) Due to the way that namespaces work on 9front, change
       to the console prompt to preform the "9fs 9fat" in Task IV.
   b.) be careful
 
I.) Updating Ori's git9:
 
1. git/clone https://github.com/oridb/git9.git
2. cd git9
3. mk install
 
II.) Updating your system:
 
1. type 'sysupdate' - note if changes are brought in.
   (you can 'cat /bin/sysupdate' to see how it works)
   (also just an 'hg incoming' will tell you what patches are available)
2. cd /
3. . /sys/lib/rootstub      (you can 'cat /sys/lib/rootstub' to see)
4. cd /sys/src
5. mk install
 
III.) Updating your kernel:
 
1. cd /sys/src/9/pc64
2. mk
 
IV.) Installing your new kernel:
 
From the vps?.sdf.org console:
 
1. type '9fs 9fat'
# be careful:
2. cp /sys/src/9/pc64/9pc64 /n/9fat/9pc64
3. fshalt
4. select menu option 's' and then 'r'
 
OR, from the Drawterm rio rc prompt:
 
1. % cd
2. % pwd
/usr/glenda
3. % bind -a '#S' /dev
4. % 9fs 9fat
5. % cp /sys/src/9/pc64/9pc64 /n/9fat/9pc64
6. % echo sync >>/srv/hjfs.cmd
7. % fshalt
8. Select menu option 's' and then 'r' from the vps?.sdf.org console.
 
V.) Your system should boot completely up-to-date.

clean or nuke:

xclean - The clean target removes object files and yacc intermediate files but does not touch the library. The nuke target removes the library as well as the files removed by the clean target.2
xnuke - The nuke target removes the library as well as the files removed by the clean target.2

If you have done a 'sysupdate' and have issues with mk install failing, try this.

xThis will take time.
/plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src
2. mk clean
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install

OR (only if necessary)

xThis will take time.
/plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src
2. mk nuke
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install

If you have done a 'sysupdate' and have issues with mk install failing due to a specific directory, try this (a upas example only, select the appropriate directory).

xThis may take time.
/plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src/cmd/upas
2. mk clean
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install

OR (only if necessary)

xThis may take time.
/plan9-l/Have_fun/Plan_9_Mkfiles/
1. cd /sys/src/cmd/upas
2. mk nuke
3. cd /
4. . /sys/lib/rootstub
5. cd /sys/src
6. mk install

1 Pending further evaluation. 2 Plan 9 Mkfiles

Working in 9front

When using Drawterm1 to connect to the SDF 9front cpu server, your local files will be available at “/mnt/term”: “% lc /mnt/term”. You can copy files between the SDF 9front VPS and your local os without the use of additional protocols. In other words, when working with Drawterm, your environment is a composite of your local os and the Plan 9 system – technically it is a three node grid, because the Drawterm program acts as an ultra-minimal independent Plan 9 terminal system, connecting your host os to the SDF 9front cpu server.

  % lc -l /mnt/term

From a rio window:

cut
paste
snarf
plumb
look
send
scroll ⇐ toggle window scroll
xPress the middle mouse button, while the pointer is over a rio window. Select “scroll” to toggle the window scroll (on/off).
xA carefree scroll setting for room plan9 in com (toggle scroll on before % vt -f /lib/font/bit/pelm/unicode.8.font)

At the rio rc prompt:

At the Plan 9 rio rc prompt, the DELETE key provides an interrupt.
At the Plan 9 rio rc prompt, the Ctrl+F or INSERT key provides an auto-completion feature within the rio window system.
xAt the Plan 9 rio rc prompt, the Ctrl+F reports the number of files in the current directory.
xType a few characters and then a Ctrl+F will match.
At the Plan 9 rio rc prompt, use the Ctrl+B key to go from anywhere in the rio window back to the command prompt.
At the Plan 9 rio rc prompt, use the Ctrl+A key to go to the beginning of a line.
At the Plan 9 rio rc prompt, use the Ctrl+E key to go to the end of the line.
At the Plan 9 rio rc prompt, use the Ctrl+U key to erase the current line.
At the Plan 9 rio rc prompt, use the Ctrl+W key to erase the previous word.
At the Plan 9 rio rc prompt, use the Ctrl+I key to tab.
At the Plan 9 rio rc prompt, the “” executes the previous command.
At the Plan 9 rio rc prompt, the prints the previously used command.
At a rio window, ESC changes the border.Then it accepts multiple commands and when ESC is pressed again they are issued together.
% pwd
/usr/glenda
% cd lib/mothra
% lc
hit.html
% "" c
     % cd lib/mothra
Can't cd lib/mothra: 'lib' directory entry not found
% "" l
     % lc
hit.html
%
xHint:grep '^cpu% ' /dev/texthttp://docs.9front.org/tips-and-tricks

profile:

  % cat /usr/$user/lib/profile | grep rio
RIO:rio -i riostartIts -i option names a startup script, which typically contains several window commands generated by wloc.
RIO:rio -i riostart -sThe -s option initializes windows so that text scrolls; the default is not to scroll.
RIO:rio -i riostart -bThe -b option reverses the normal color scheme for windows, painting white text on a black background.
xRiostart is located here: $home/bin/rc/riostart
xrio customization details

profile and rules

xA user profile: /usr/$user/lib/profile
xA user profile: /usr/$user/lib/plumbing
xSome 9front plumber rules are located in /sys/lib/plumb/basic
xSome 9front plumber rules are located in /mnt/plumb/rules

At the rio rc prompt:

slay:

slay, broke, dontkill - print commands to kill processes

xThe 'webfs' process is used to illustrate the 'slay' command.
xA way to clear the browser cache.
  % slay webfs
  @{echo kill>/proc/527/ctl} # webfs
  @{echo kill>/proc/612/ctl} # webfs
  @{echo kill>/proc/683/ctl} # webfs
1Press the left mouse button, and sweep, to highlight (in grey) the % slay webfs output text.
2Press the middle mouse button to select 'send'.
3Release the middle mouse button to complete the 'send' to rc (% slay webfs | rc).
cut
paste
snarf
plumb
look
send ⇐ release the middle mouse button here
noscroll

ns:

xns - display name space
xns [ -r ] [ pid ]
xns prints a representation of the file name space of the process with the named pid, or by default itself.

An ns example.

1In one Drawterm rio window, enter these two commands at the rio rc prompt (%). The sam editor will start.
  cpu% touch test.edit
  cpu% sam test.edit
2In another Drawterm rio window, enter these three commands at the rio rc prompt (%). Use the pid from your “sam test.edit” line.
  cpu% ps -a | grep sam
  glenda         1280    0:00   0:00      188K Pread    sam test.edit
  glenda         1282    0:00   0:00      312K Rendez   samterm [main]
  glenda         1283    0:00   0:00      312K Pread    samterm [mouseproc]
  glenda         1284    0:00   0:00      312K Pread    samterm [kbdproc]
  glenda         1285    0:00   0:00      312K Pread    samterm
  glenda         1286    0:00   0:00      312K Pread    samterm
  glenda         1290    0:00   0:00       56K Pread    grep sam
  cpu% ns 1280 | grep tmp >view.tmp
  cpu% cat view.tmp
  bind -c /n/other/usr/glenda/tmp /usr/glenda/tmp
  bind -c /n/other/usr/glenda/tmp /tmp

1 Taken from Expanding your Grid …CPU AND DRAWTERM CONNECTIONS BETWEEN MULTIPLE MACHINES.

Editors

xThe “Plan 9 on an SDF VPS” applications tutorial (Sam, Ed, and Acme) applies to this tutorial.
xSAM:sam1, B, sam.save, samterm - screen editor with structural regular expressionshttp://man.9front.org/1/sam
xED:ed2 - text editorhttp://man.9front.org/1/ed
xACME:acme3, win - interactive text windowshttp://man.9front.org/1/acme

sam:

Sam is a screen editor.

  % pwd
  /usr/glenda
  % cp /usr/glenda/lib/profile /usr/glenda/lib/EDprofile
  % sam /usr/glenda/lib/EDprofile
1While the cursor is over the sam window, press the right button of your mouse and drag the cursor over the file name.
2Release the right mouse button once the cursor is over the file name.
3The cursor pointer will change to a square.
4Press the right button, while the square cursor is over the lower panel, to load the file in the lower panel
new
zerox
resize
close
write
~~sam~~
- /lib/EDprofile ⇐ release the right mouse button here
A few words about 'w' writing the file, and how to 'q' quit sam.
Commands (sam -d) are typed in the upper panel, while edits are typed in the lower panel.
Press the left mouse button to activate the upper panel, or the lower panel.
Type a 'w' in the upper panel, then press '[Enter]'. This saves the file.
Type a 'q' in the upper panel, then press '[Enter]'. This quits sam.
cut
paste
snarf
plumb
look
<rio> ⇐ toggle cut&paste buffer
send
1Press the middle mouse button, while the pointer is over a sam window.
2Select “<rio>” to toggle the sam cut&past buffer to rio (on/off). The default cut&paste buffer is sam.

'sam -d':

% sam -d Editing will be done with the command language only, as in ed.
Command Option Quick Reference
SAM:sam -dhttp://sam.cat-v.org/cheatsheet/

ed:

Ed is a text editor, and similar to 'sam -d'.

xed Cheat Sheeted Cheat Sheet tutorial. (wiki)
xed Cheat Sheethttp://sdf.org/?tutorials/ed (tutorials, compatible with Plan 9 abaco, or mothra)

acme:

xAcme manages windows of text that may be edited interactively or by external programs.http://man.9front.org/1/acme
  % acme
Newcol Kill Putall Dump Exit
New Cut Paste Snarf Sort Zerox Delcol
  % acme SDF_User_Contributed_Tutorials.html
Newcol Kill Putall Dump Exit
New Cut Paste Snarf Sort Zerox Delcol
SDF_User_Contributed_Tutorials.html Del Snarf : Look⇐ Replace Look with Edit ,s/Booting/Rowing/g
Newcol Kill Putall Dump Exit
New Cut Paste Snarf Sort Zerox Delcol
SDF_User_Contributed_Tutorials.html Del Snarf : Edit ,s/Booting/Rowing/g
xView A Tour Of The Acme Editor for details.
Mouse buttons 1, 2, & 3 - 3:06; Edit - 7:03
snippet: SDF_User_Contributed_Tutorials.html
<p>
This is the tutorial for setting-up the 9front<sup>2</sup> operating system in a VPS slice on SDF. The tutorial is aimed at participants in the SDF <a href="/doku.php?id=vps_-_plan_9#about" class="wikilink1" title="vps_-_plan_9" data-wiki-id="vps_-_plan_9">Plan 9 Boot Camp</a><sup>3</sup>, but should be useful to other SDF VPS users. More recently, the <em>Boot Camp</em> participants will begin studying virtualized <em>amd64 9front</em>.
</p>
 
<p>
<sup>1</sup><a href="https://en.wikipedia.org/wiki/ASCII_art" class="interwiki iw_wp" title="https://en.wikipedia.org/wiki/ASCII_art">ASCII art</a> <sup>2</sup> <a href="http://fqa.9front.org/fqa1.html" class="urlextern" title="http://fqa.9front.org/fqa1.html" rel="ugc nofollow">Plan9front</a> (or <em>9front</em>) is a fork of the <em>Plan 9</em> from <a href="https://9p.io/plan9/index.html" class="urlextern" title="https://9p.io/plan9/index.html" rel="ugc nofollow">Bell Labs operating system</a>; <a href="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Derivatives_and_forks" class="interwiki iw_wp" title="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs#Derivatives_and_forks">Plan 9 Derivatives and forks</a>. <sup>3</sup> <a href="https://en.wikipedia.org/wiki/Booting" class="interwiki iw_wp" title="https://en.wikipedia.org/wiki/Booting">Booting</a>
</p>

1 Sam (text editor) 2 ed (text editor) 3 Acme (text editor)

Mothra

xThe “Plan 9 on an SDF VPS” Browsing the web tutorial (Abaco) applies to this tutorial.

mothra - retrieve and display World-Wide Web files

  % mothra
  % webfs; mothra -k
  %

rio rc send:

xThe previously issued 'webfs; mothra' string is used to illustrate the 'send' selection.
xAnother way to 'send' commands the rio rc prompt (%).
1Press the left mouse button, and sweep, to highlight the webfs; mothra input text.
2Press the middle mouse button to select 'send'.
3Release the middle mouse button to complete the 'send' to rc (% webfs; mothra | rc).
cut
paste
snarf
plumb
look
send ⇐ release the middle mouse button here
noscroll

mothra save hit:

While using mothra, the 'save hit' and 'hit list' is accessed by pressing the right mouse button. The right mouse button 'save hit' selection will add the current URL to $home/lib/mothra/hit.html. The right mouse button 'hit list' selection will display the hit list in the mothra browser.

alt display
moth mode
snarf
paste
plumb
search
save hit ⇐ release the right mouse button here
hit list
exit
snippet: $home/lib/mothra/hit.html
<html><head><title>Hit List</title></head>
<body><h1>Hit list</h1>
<p><a href="http://wiki.sdf.org/doku.php?id=vps_-_plan_9_9front">http://wiki.sdf.org/doku.php?id=vps_-_plan_9_9front</a>

Shutdown and restart

/reveal/bc/VPS/Shell
VPS Maintenance Shell for plan* (xxx.xxx.xx.xx)
no stats collected.
 
[c] - Connect to your console
[l] - list your status
[r] - reset or start
[s] - Force Shutdown (not an OS shutdown)
[t] - toggle your Operating System
[i] - Switch your VPS ID (multiple VPS members only)
[x] - Clean install (destroys data)
[p] - Change your vps.sdf.org password
[u] - View current interface statistics
[U] - View all recorded interface statistics
[q] - Disconnect
 
[30-Oct-20 22:59:17] Command: q
Connection to vps? closed.
$
x% fshalt from a Drawterm rio rc prompt (%), is okay. Close the local Drawterm application separately.

From the 9front Drawterm rio rc prompt:

  cpu% fshalt

  halting.../srv/cwfs.cmd...
  done halting
  cpu%
x% fshalt from the 9front VPS console rc prompt (%), then at the “VPS Maintenance Shell” enter 's' - force shutdown, then enter 'r' - reset or start.

From the 9front VPS Maintenance Shell console prompt:

  term% fshalt

  halting.../srv/cwfs.cmd...halted at Fri Oct 30 15:58:54 2020.

  done halting
  term% 
1Press ctl-] to continue, if viewing where the VPS console rc prompt (%) was once active. Press the '[Enter]' key to access the VPS Maintenance Shell (may apply).
xFrom the VPS Maintenance Shell enter 's' - force shutdown, then enter 'r' - reset or start, or 'q' - disconnect. Enter 'l' to list your status.
xFrom the VPS Maintenance Shell enter 's' - force shutdown before starting the SDF 9front VPS. Ping the SDF Plan 9 VPS IP address (YOUR_IP) to determine if the VPS is running with networking.
  $ ping YOUR_IP

Command reminder

xPreviously mentioned commands from Plan 9 on an SDF VPS.

A screenshot within Drawterm, or from a rio rc prompt.

  % topng </dev/screen >screenshot.png
  % png screenshot.png
Command Example
TOPNG:% topng </dev/screen >screenshot.png

Adding a User

x'sysupdate' is reserved for the user glenda (Thu Jan 14 08:07:38 GMT 2021).
xAdding a User: The “Adding a User” description from the “Plan 9 on an SDF VPS” does not apply to 9front.
Section FQA 7 - System Management
7.3.1 - Adding usershttp://fqa.9front.org/fqa7.html
7.4.2 - Adding usershttp://fqa.9front.org/fqa7.html

You may want to add a user to your system once you get the hang of things. There is really no need to create a new user when you are first starting out. It's safer to use the Drawterm rio rc prompt (%) for the following task, should there be a need for the '[Backspace]' key.

To create a new user, you must connect to the file server console by typing: 'con -C /srv/cwfs.cmd'1. Once at the file server prompt (a blank), create a new user. Replace USER with what you want your new user to be named: 'newuser USER'. You will need to add that USER to the “sys” group if you want it to be able to change system configuration files. Again, change USER to what your new user name is: 'newuser sys +USER'. Exit the file server console prompt (a blank) by typing: 'ctrl+\'. You will now be at the ”> > >“ prompt; type 'q' to quit the ”> > >“ prompt.

  % con -C /srv/cwfs.cmd
  newuser USER
  newuser sys +USER
  newuser adm +USER
  newuser upas +USER
  

Ctrl+\

  >>> q
  %

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“ and ”[r] - reset or start“ the VM from the VPS Maintenance Shell, and have used 9front Drawterm successfully. Enter the new “USER” name after an 'fshalt' and a VPS Maintenance Shell [s] - Force Shutdown and [r] - reset or start.

user[glenda]: ← Enter the new 'USER' name.

Verify your new ”USER“ login with 'pwd' or 'lc -l'. Stop if 'pwd' does not show your new “USER” name.

Initialize the new user environment with '% /sys/lib/newuser', from the VPS console prompt (%).

  term% /sys/lib/newuser

A list of eight directory and file tasks.2

/plan9-l/Have_fun/add_an_unnecessary_user/
mkdir /n/other/usr/$user
mkdir /n/other/usr/$user/tmp
cp -x /usr/glenda/sdf /usr/$user/sdf
cp -x /usr/glenda/start /usr/$user/start
cp -x /usr/glenda/bin/rc/riostart /usr/$user/bin/rc/riostart
cp /usr/glenda/lib/profile /usr/$user/lib/profile
mkdir /usr/$user/www
cp /usr/glenda/www/* /usr/$user/www/

A list of one pending task.3

/plan9-l/Have_fun/pending_task/
bind -c /n/other/usr/$user/tmp /usr/$user/tmp

A list of two optional tasks.

/plan9-l/Have_fun/optional_tasks/
mkdir /usr/$user/lib/mothra
cp /usr/glenda/lib/mothra/hit.html /usr/$user/lib/mothra/hit.html

The mentioned eight tasks are preformed from the VPS console prompt (%).

  term% mkdir /n/other/usr/$user
  term% mkdir /n/other/usr/$user/tmp
  term% cp -x /usr/glenda/sdf /usr/$user/sdf
  term% cp -x /usr/glenda/start /usr/$user/start
  term% cp -x /usr/glenda/bin/rc/riostart /usr/$user/bin/rc/riostart
  term% cp /usr/glenda/lib/profile /usr/$user/lib/profile
  term% mkdir /usr/$user/www
  term% cp /usr/glenda/www/* /usr/$user/www/

A VPS console prompt (%) % sam -d edit example, similar to % ed. Optionally, a new user start file can be created while user glenda is connected with Drawterm, before a new user is created. The ed, sam, and acme editors are usable with a Drawterm rio rc prompt (%).

/plan9-l/Have_fun/edit_start/
term% lc start
start*
term% cp start start2
term% sam -d start2
 -. start2
/=glenda
=glenda
echo 'key proto=dp9ik dom=plan9 user=glenda !password=L0gWlaM' > /mnt/factotum/ctl
s/=glenda/=moth1
/=L0gWlaM
=L0gWlaM
echo 'key proto=dp9ik dom=plan9 user=moth1 !password=L0gWlaM' > /mnt/factotum/ctl
s/=L0gWlaM/=fR0g1m3
/glenda
glenda
ip/httpd/httpd -a $myip -w /usr/glenda/www
s/glenda/moth1
.
ip/httpd/httpd -a $myip -w /usr/moth1/www
w
start2: #273
q
term%

Start Drawterm from the local operating system, after the /usr/$user/start user name is changed, and the /usr/$user/start www directory name is changed.

  $ ./drawterm -h YOUR_IP -u new USER

1 For the cwfs file server, only ("halting.../srv/cwfs.cmd..."). 2 7.3.1 - Adding users New users are created without a profile, mail directory, tmp directory (needed to edit files with sam) or other confections (sdf, start, riostart, www, index.html). 3 7.3.1 - Adding users The default system /lib/namespace does the following: bind -c /n/other/usr/$user/tmp /usr/$user/tmp

Configure a Time zone

xConfigure a Time zone: The “Configure a Time zone” description from the “Plan 9 on an SDF VPS” does not apply to 9front.
Section FQA 4 - 9front Installation Guide
4.3.15 - tzsetuphttp://fqa.9front.org/fqa4.html
Section FQA 7 - System Management
7.6.3 - UTC Timesynchttp://fqa.9front.org/fqa7.html

You might want to configure your system's timezone1. Identify the timezone with '% lc /adm/timezone'. Assuming that the CET time zone is appropriate, login as the user 'adm'2 'glenda' and 'cp /adm/timezone/CET /adm/timezone/local'. Last, while user “glenda” edit the “TIMESYNCARGS” line in the ”/rc/bin/termrc“ (or ”/rc/bin/cpurc“), using an NTP service. Set it to “TIMESYNCARGS=(-n pool.ntp.org)” and reboot3.

user[glenda]:

  % lc /adm/timezone
  % cp /adm/timezone/CET /adm/timezone/local
% sed 4q /rc/bin/termrc
#!/bin/rc
# this file is run if service=terminal
#TIMESYNCARGS=(-rLa1000000)
TIMESYNCARGS=(-n pool.ntp.org)
% 
  % sam /rc/bin/termrc
  % fshalt

Setting a User's Timezone

If you just want to change the timezone of your user account on a shared system, you can add something like the following to your lib/profile:

cat /adm/timezone/US_Central > /env/timezone

1 Plan 9 Wiki Installation Instructions, SETTING UP CORRECT TIMEZONE section. 2 '% cat /adm/users | grep adm' 3 '% fshalt' from an rc prompt (%), then at the “VPS Maintenance Shell” enter 's' - force shutdown, then enter 'r' - reset or start.

Plan 9 Boot Camp

SDF periodically runs a Plan 9 Boot Camp which is open to anyone with an SDF user1 account. Of the various VPS that SDF offers2, the SDF Plan 9 Boot Camp VPS is the only VPS provided without subscription, to SDF MetaARPA3 members. These Plan 9 Boot Camps are announced about 30 days before they begin and are often set around the International Workshop on Plan 9 conference4. They are usually a seasonal occurrence and run for about 2 months.

Why learn Plan 9 as a group?
Plan 9 wants a community.
Yes you can learn a lot on your own but Plan 9 was designed with a network of machines and users in mind.

Activities of the SDF Plan 9 Boot Camp include:

xInstallation or pre-generated Plan 9 instance under Xen
xSelf Guided Discoveries in: ed, network configuration
xSelf Guided Discoveries in: drawterm (from your computer), rio and stats
xSelf Guided Discoveries in: acme, sam, abaco, mothra and man
xSelf Guided Discoveries in: mapdemo, catclock, juggle and tetris
xSelf Guided Discoveries in: 9front and contrib via ftpfs
xSelf Guided Discoveries in: 9fans mailing list and faces

During the SDF Plan 9 Boot Camp you are encouraged to make screenshots and videos of your Self Guided Discoveries and share your experiences on plan9-l to inspire others to do the same. Participants in the Plan 9 Boot Camps also get a contrib directory on ftp.sdf.org (in pub/sdf/plan9/contrib). This directory persists and can be used perpetually for Plan 9 related sharing.

1 UNIX Shell Account. 2 VPS membership required. 3 Type ”meta“ at the SDF shell ($ meta) for details. 4 International Workshop on Plan 9 http://iwp9.org/

Boot Camp Discoveries or Challenges

Discoveries, or challenges, are mentioned on plan9-l or live on twitch.

Russ Cox's A Tour Of The Acme Editorhttps://archive.org/details/atouroftheacmeeditor
Plan 9 demo, narrated by John Floren (full)https://youtu.be/obKnSDbaBlw
Acme Editor, Acme Mail, Plan 9 demo (short)https://www.youtube.com/user/slawmasta
Command Option Quick Reference, mentioned in an Acme video
SAM:sam -dhttp://sam.cat-v.org/cheatsheet/

A self guided challenge:

NYC*BUG
Plan 9: Not dead, Just Resting, Ori Bernstein
https://www.nycbug.org/index?action=view&id=10672
https://youtu.be/6m3GuoaxRNM
20:00 - 9front plumber rules; % cat /sys/lib/plumb/basic
29:15 - Ori's git9
31:09 - The essence of Plan 9 is 9p and name spaces.
53:32 - /sys/ports/dev-lang

SDF Fall 2021 Plan9 Boot Camp "Tea Note" Presentation

Some "Tea Note" Presentation commands from the rio rc prompt (%).

DATE:date, clock - date and timehttp://man.9front.org/1/date
FILE:file - determine file typehttp://man.9front.org/1/file
HG:hg - Mercurial source code management systemhttp://man.9front.org/1/hg
MEMORY:memory - print memory statistics in human-readable formathttp://man.9front.org/8/memory
MK:mk, membername - maintain (make) related fileshttp://man.9front.org/1/mk
NETSTAT:summarizes past and present network connectionshttp://man.9front.org/1/netstat
PLUMB:plumb - send message to plumberhttp://man.9front.org/1/plumb
PLUMBER:plumber - file system for interprocess messaginghttp://man.9front.org/4/plumber
PLUMBER:Plumbing exampleshttps://9p.io/wiki/plan9/plumbing_examples/index.html
SSHFS:sshfs - secure file transfer protocol clienthttp://man.9front.org/4/sshfs
SYSINFO:sysinfo, sysupdate - report information about, update the systemhttp://man.9front.org/1/sysinfo
SYSUPDATE:download latest sources% cat /bin/sysupdate
WHO:who, whois - who is using the machinehttp://man.9front.org/1/who

Other “Tea Note” Presentation examples from the rio rc prompt (%).

FILE:% for (i in *) file $i
9FS:% 9fs 9fat
9FS:% cd /n/9fat (Only from the VPS console rc prompt, if 9front kernel changes are made)
9FS2:% 9fs: (Plan 9 % 9fs:)

Other "Tea Note" Presentation commands near the SDF prompt ($).

COM:- toggle backspace, % bksp is now ^H; ctl-h
Some hints about Plan 9
Plan 9's system console is a TTY, not a VT
In UNIX almost everything is a file, in Plan 9 everything is a file
Plan 9 is more like UNIX than Linux is like UNIX
Environment variables are stored and manipulated in /env
System configuration is in /cfg
Login configuration is in /rc/bin (termrc or cpurc, also .local files)
System types: cpu vs. term

1 Dependent on schedule availability. 2 A snippet from Plan 9 % man srv: 9fs:9fs is an rc(1) script; examine it to see what local conventions apply.

Hello World

SDF Boot Camp Communication resources

These communication resources are dependent on the preference of the “Boot Camp” participants, during a scheduled SDF Plan 9 Boot Camp. Some previous timely resources are $ com, plan9-l, $ bboard, mastodon.sdf.org, and wiki.sdf.org. The resources are mentioned in below.

xcom1 https://wiki.sdf.org/doku.php?id=com; COM is not IRC - (tutorials, compatible with mothra)
xroom 'plan9' in 'com'
xsubscribe plan9-l (Email 'majordomo' and 'subscribe plan9-l' to join.)
xbboard https://wiki.sdf.org/doku.php?id=bboard
x@SDF https://mastodon.sdf.org/@SDF

1com partial command help; to begin TALK MODE, press [SPACE].

COMMODE ©1993
A:toggles AFK mode
e:emote
g:goto a room
h:command help
q:quit commode
r:room history
R:extended history
z:toggle color mode
-:toggle backspace

SDF Boot Camp 9p resource

x https://9p.sdf.org (an amd64 plan9front1 supplement to the SDF Plan 9 Boot Camp2)

The 9p.sdf.org rio rc prompt is accessable with 9front Drawterm or an rcpu connection. A 9p.sdf.org user name (-u USER) is required.

  $ ./drawterm -h 9p.sdf.org -u USER

A Drawterm rc prompt (without rio; teletype only):

  $ ./drawterm -G -h 9p.sdf.org -u USER
xA Drawterm file transfer hint:% lc /mnt/term

Possible "Tea Note" Presentation commands from the 9p rio rc prompt (%).

bboard:bboard [-anps] [-r n]9p contrib directory
broke:broke [ user ] - broken processes go awayhttp://man.9front.org/1/kill
com:com - An early version of commode9p contrib directory
df:df - disk usage9p contrib directory
auth/factotum:factotum, fgui, userpasswd - authentication agenthttp://man.9front.org/4/factotum
find:find [-1dfq] [path …]9p contrib directory
finger:toe - A very basic finger client for plan9/9front.
gemnine:gemnine [-w] [URL] - Gemini browser for Plan 9
mug:mug - convert an image to a face iconhttp://man.9front.org/1/mug
tweak:tweak - edit image files, subfont files, face files, etc.http://man.9front.org/1/tweak
upas/fs -f:upasfs - mail file serverhttp://man.9front.org/4/upasfs
who:who, whois - who is using the machinehttp://man.9front.org/1/who

bboard example:

date and time example:

xA scheduled Plan 9 Boot Camp TEA NOTE will occur on September 26th at 2PM PDT.
xTEA NOTE Live stream location at twitch.tv
xStart the clock in a rio rc window.
% cp /adm/timezone/US_Pacific /env/timezone && clock.amber

The command will pick up the new timezone, but nothing already running or not sharing the environment will be affected.

broke example:

% psu -a | grep Broke
% broke $user

face example:

gemnine example:

A gemnine acme example.

% gemnine gemini://9p.sdf.org

1 plan9front running natively on hardware. 2 NetBSD Xen [] running Plan 9 Boot Camp participants' VMs, during the announced Plan 9 Boot Camp occurrences.

Tutorials

xPlan 9 Rc Survival Guide http://sdf.org/?tutorials/Plan_9_rc - (tutorials, compatible with Plan 9 abaco, or mothra)
xPlan 9 C Programming http://sdf.org/?tutorials/Plan_9_C - (tutorials, compatible with Plan 9 abaco, or mothra)
xPlan 9 on SDF VPS http://sdf.org/?tutorials/VPS_Plan9 - (tutorials, compatible with Plan 9 abaco, or mothra)
xSDF User Contributed Tutorials (html) https://sdf.org/tutorials/ - (tutorials, compatible with mothra)
xSDF User Contributed Tutorials (wiki) https://wiki.sdf.org - (tutorials, compatible with mothra)
x9FRONT FREQUENTLY QUESTIONED ANSWERS http://fqa.9front.org/
xREADME - “This brief document is intended to help you get started using Plan 9.” (slightly outdated)

An SDF Plan 9 Boot Camp snippet from @SDF (Sept. 26, 2020)
Valued mention resource
Plan 9 from Bell Labshttps://9p.io/plan9
Glenda, the Plan 9 Bunnyhttps://9p.io/plan9/glenda.html
Other hardwarehttps://9p.io/wiki/plan9/Other_hardware/index.html

Plan 9 VPS tutorial

xPlan 9 on an SDF VPS tutorial (wiki)
xGetting Started with Plan 9 Drawterm
xSam (% sam -d)
xEd (% ed)
xAcme (% acme)
xAbaco (% abaco)
xMothra (% mothra -k)
xUseful Plan 9 Commands

Reference book

xIntroduction to Operating Systems Abstractions Using Plan 9 from Bell Labs (pdf; external archive)
xPrevious dedicated links are located at the Plan 9 on an SDF VPS tutorial. (wiki)

Conclusion or close

The wiki formatting used in this tutorial was reviewed with the SDF Plan 9 Boot Camp plan9front mothra browser, and the mothra option '-k': % mothra -k. The intention was to support those SDF Plan 9 Boot Camp participants who may participate (in the Boot Camp) with a low-speed Internet connection. The outcome of the mentioned formatting decision is pending the approval of future wiki editors. Have fun.

vps_-_9front.txt · Last modified: 2021/09/19 03:46 by hc9