9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Re: [p9fUsers] Re: Plan 9 rpi nvram not found
       [not found] <ZyhnwidMOQUY4pOh@ircnow.org>
@ 2024-11-05 11:04 ` Richard Miller
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Miller @ 2024-11-05 11:04 UTC (permalink / raw)
  To: users, 9fans

> Thank you, I managed to get nvram to read properly.
>... No idea what changed, but somehow, upon rebooting, this time
> it worked.

One possibility: if the SD card gets joggled, it may become inaccessible
and the kernel won't automatically reinitialise it. I use the 'diskparts'
command as an alternative to rebooting.

> My $sysname seems to be set to gnot; I couldn't get it to change despite
> trying to define sys= in /lib/ndb/local.

In a "normal" Plan 9 system, /lib/ndb/local may be on a shared file server
used by multiple machines: "local" here means local to your network, not
local to one host. To find sysname, the ndb/cs command looks up the host
in /lib/ndb/local using its ethernet MAC address - but on the pi zero,
there's no ethernet and no hardcoded MAC. An alternative is to add
'sysname=whatever' to the variables in the cmdline.txt file on the SD card.

> I know config.txt says that the pi zero is using [pi1]'s entry but, in
> practice, my rpi zero wh seems to be using the [pi0] entry

The config.txt file is interpreted by the pi firmware, which has been known
to change its behaviour from one release to the next. I guess the comment
should instead say "Pi Zero W *may* use this entry"

> Inside /cfg/gnot/cpustart I added this line:
> aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service tcp

I think it's more usual to put this in /cfg/$sysname/cpurc, not cpustart.
Or uncomment the 
And you shouldn't need the '-d /rc/bin/service' because those ports
will be handled by the aux/listen in /bin/cpurc.

> However, when I run $ drawterm -u glenda -c 192.168.86.250 -a
> 192.168.86.250, I see this error:
> cpu: can't dial: 192.168.86.250: Connection refused
> The 'Connection refused' error makes me think that the cpu server is not
> listening at all on port 567.

I think it's the ncpu port (17010) you need first. Try 'netstat|grep Listen'
on the cpu server to confirm what it's listening on.

> Any ideas for how to fix this?

It can be useful to insert a 'flag x +' command into /bin/cpurc so you can
watch the startup script progressing.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9bb336bb1166fd70-M9d32faae3d8ec85241b936a0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [9fans] Re: [p9fUsers] Re: Plan 9 rpi nvram not found
       [not found] <ZyHL2dnIY9IHP8SK@inter9.org>
@ 2024-10-30 14:54 ` Richard Miller
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Miller @ 2024-10-30 14:54 UTC (permalink / raw)
  To: jrmu, users, 9fans

> I tried adding nvram='#S/sdM0/nvram' into cmdline.txt as follows:
> 
> readparts=1 nobootprompt=local console='0 b115200' ether1=type=4330 nvram='#S/sdM0/nvram'
> 
> but the readnvram still says it can't find nvram.

When connecting via serial port, you don't have a user-friendly line-editing interface
so it's possible to get inadvertent control characters embedded in a string. Try this
experiment and see if you get a similar result:

    init: starting /bin/rc
    % echo $user
    somebody
    % echo $nvram
    #S/sdM0/nvram
    % echo $nvram | xd -c
    0000000   #  S  /  s  d  M  0  /  n  v  r  a  m \n
    000000e 
    % ls -l $nvram
    --rw-r----- S 0 somebody somebody 512 Apr 14 19:54 '#S/sdM0/nvram'
    % auth/readnvram
    key proto=p9sk1 user=hamnavoe dom=hamnavoe.com !hex=XXXXXXXXXXXXXX !password=______



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9bb336bb1166fd70-M196830fc7d2db2b3b4c6eb94
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-05 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <ZyhnwidMOQUY4pOh@ircnow.org>
2024-11-05 11:04 ` [9fans] Re: [p9fUsers] Re: Plan 9 rpi nvram not found Richard Miller
     [not found] <ZyHL2dnIY9IHP8SK@inter9.org>
2024-10-30 14:54 ` Richard Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).