Discussion:
[9fans] Raspberry Pi: cpu and remote root
(too old to reply)
Tobias Kreisel
2013-01-19 17:17:42 UTC
Permalink
Hi everyone,

Richard’s recent rpi port made me explore plan9 again and
I think I am slowly getting the hang of things. Currently there
are two aspects I wonder about:

1. I have two rpis. One configured as a terminal, the other as
a cpu server (each using the templates on the fat partition).
When logged in at the terminal (as glenda) I connect to the
cpu server via

cpu -h <ip address> -u pi

and end up with a 'helix#' prompt. However, when trying
to run a graphical program like 'sam' I get the error message:

sam: can't create temp file: '/tmp/Z291.pisam' permission denied

Of course I know that it is not much use to have computations
of one rpi be done by another. I am simply trying to experience
a genuine plan9 mode of operation.

In Brian Kernighan’s README (
http://doc.cat-v.org/plan_9/2nd_edition/README)
there a paragraph titled "The CPU Server" which I believe is
what I am looking for, but I wasn’t able to replicate it on the
rpi.

2. What do I need to do in order to have a rpi (configured as
terminal) get its root remotely? I.e. at boot there is a prompt

root is from (local, tcp)[local]:

where I gave the ip address of another rpi (configured as a
cpu server). But that did not work.


Thanks for your reading this far,
Tobias
erik quanstrom
2013-01-19 18:18:10 UTC
Permalink
Post by Tobias Kreisel
1. I have two rpis. One configured as a terminal, the other as
a cpu server (each using the templates on the fat partition).
When logged in at the terminal (as glenda) I connect to the
cpu server via
cpu -h <ip address> -u pi
and end up with a 'helix#' prompt. However, when trying
sam: can't create temp file: '/tmp/Z291.pisam' permission denied
have you run /sys/lib/newuser (newuser(8))?
Post by Tobias Kreisel
2. What do I need to do in order to have a rpi (configured as
terminal) get its root remotely? I.e. at boot there is a prompt
where I gave the ip address of another rpi (configured as a
cpu server). But that did not work.
your file server needs to be listening to tcp in order for this to work.

- erik
Richard Miller
2013-01-20 09:55:16 UTC
Permalink
1. The 9pi image has a cpu kernel but its file system is
not completely configured for use as a server. How you
do that will depend on whether you are adding it as a cpu
server or file server to an existing Plan 9 network, or
using it as a self contained cpu + fs + auth server.
The wiki has quite a bit on this subject - see
http://plan9.bell-labs.com/wiki/plan9/configuring_a_standalone_cpu_server

In this respect the pi is just like any other Plan 9
machine. The 9pi image starts with 'pi' instead of
'bootes' as the hostowner / authid, but you can of
course change this with auth/wrkey and auth/changeuser.
As Erik suggested, you can run /sys/lib/newuser
to create the home directory for user 'pi', or
whatever other name(s) you choose.

2. Once you have a server set up to publish its fossil
connection, your client can use it as root. If the
server is running ip/dhcp and you have set up the
required information in /lib/ndb/local, you can just
reply 'tcp' to the boot prompt. Otherwise you can
reply 'tcp -g r.r.r.r c.c.c.c' where r.r.r.r is your
router's ip address and c.c.c.c is the client's
desired ip address, and you'll be prompted for the
ip address of the server for fs and auth.
To cut down on prompting, you can define things
like bootargs=, fs=, auth=, DNSSERVER= and user=
in cmdline.txt - see plan9.ini(9) for details.
erik quanstrom
2013-01-20 14:06:18 UTC
Permalink
Post by Richard Miller
connection, your client can use it as root. If the
server is running ip/dhcp and you have set up the
required information in /lib/ndb/local, you can just
in particular this means having an entry that looks like

ip=192.168.0.140 sys=ocilla sys=new ether=00259024695c

(pcs will need additional configuration.) this entry
gives you the ip address/mac address/name association.
to associate a file server, etc. with this machine the customary
way is via an ipnet entry. e.g.

# note this network contains my ip address
#
# note that the subnetmask is based off the width of the internel
# representation, a 128-bit ipv6 address.
ipnet=athensnat ip=192.168.0.0 ipmask=/120
fs=aska.quanstro.net
ipgw=192.168.0.4
dns=192.168.0.136
dnsdomain=quanstro.net
authdom=plan9.quanstro.net
auth=ladd

one can verify the correct setup with ndb/ipquery.
e.g.

ndb/ipquery sys ocilla fs
ndb/ipquery sys ocilla ipgw

- erik
Tobias Kreisel
2013-01-21 10:41:50 UTC
Permalink
Thanks Erik and Richard! I will take a more thorough look at the wiki and try your suggestions.

Regards,
Tobias
Post by Richard Miller
1. The 9pi image has a cpu kernel but its file system is
not completely configured for use as a server. How you
do that will depend on whether you are adding it as a cpu
server or file server to an existing Plan 9 network, or
using it as a self contained cpu + fs + auth server.
The wiki has quite a bit on this subject - see
http://plan9.bell-labs.com/wiki/plan9/configuring_a_standalone_cpu_server
In this respect the pi is just like any other Plan 9
machine. The 9pi image starts with 'pi' instead of
'bootes' as the hostowner / authid, but you can of
course change this with auth/wrkey and auth/changeuser.
As Erik suggested, you can run /sys/lib/newuser
to create the home directory for user 'pi', or
whatever other name(s) you choose.
2. Once you have a server set up to publish its fossil
connection, your client can use it as root. If the
server is running ip/dhcp and you have set up the
required information in /lib/ndb/local, you can just
reply 'tcp' to the boot prompt. Otherwise you can
reply 'tcp -g r.r.r.r c.c.c.c' where r.r.r.r is your
router's ip address and c.c.c.c is the client's
desired ip address, and you'll be prompted for the
ip address of the server for fs and auth.
To cut down on prompting, you can define things
like bootargs=, fs=, auth=, DNSSERVER= and user=
in cmdline.txt - see plan9.ini(9) for details.
Loading...