wm: doc

ref: e1812d3638e2e3fd9a66d83f55770c38289512fa
dir: /cpu-p9.ms/

View raw version
Configuring the cpu server for plan 9

First add your user to the adm group. See fossil-p9.

Afterwards, set your timezone, see timezone-p9.ms.

Next, make sure to configure your network information. See ndb-p9.ms.

term% mkdir /cfg/$sysname/
term% dircp /cfg/example /cfg/$sysname/

Then, edit /cfg/$sysname/cpurc to uncomment this line:

# ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask

Note: You may also want to copy this to /cfg/$sysname/termrc and also to run the
command manually, because by default, plan 9 runs as a terminal service. It will not
run as a cpu service until the cpu kernel has been compiled as described below.

term% auth/wrkey
bad authentication password
bad authentication id
bad authentication domain
authid: glenda
authdom: fork.inter9.org
auth password:
secstore password:

Make sure to configure the auth server, see auth-p9.ms.

Build the cpu kernel:

cd /sys/src/9/pc
mk 'CONF=pccpuf'
term% 9fat:
term% cp /sys/src/9/pc/9pccpuf /n/9fat/
Add these lines to the beginning of /n/9fat/plan9.ini

[menu]
menuitem=cpu, Plan 9 CPU Kernel
menuitem=terminal, Plan 9 Terminal Kernel
menudefault=cpu, 10

[cpu]
bootfile=sdC0/!9fat!9pccpuf

[terminal]
bootfile=sdC0!9fat!9pcf

[common]
nobootprompt=local!#S/sdC0/fossil

Make sure to replace sdC0 with your actual disk.
Make sure also to delete the pre-existing line:

bootfile=sdC0!9fat!9pcf

Clear nvram and then set a new password:

term% echo garbage >/dev/sdC0/nvram

Remember to replace sdC0 with your actual hard disk.

Set the password:

term% auth/keyfs

Add the hostowner glenda to sys and adm groups:

term% con -Cl /srv/fscons
prompt: uname glenda glenda
prompt: uname sys +glenda
prompt: uname adm +glenda
prompt: fsys main
main: create /active/cron/glenda glenda glenda d775
main: create /active/sys/log/cron glenda glenda a664

Append these lines to the bottom of /lib/ndb/auth:

hostid=glenda
       uid=!sys uid=!adm uid=*

Change the hostowner's password:

term% auth/changeuser glenda