Subject: Re: storing nvaliases in NVRAM ('NVRAMRC not valid')
To: zeta.orionis <zeta.orionis@gmail.com>
From: Dan LaBell <dan4l-nospam@verizon.net>
List: port-macppc
Date: 04/17/2005 03:07:54
On Apr 15, 2005, at 5:52 AM, zeta.orionis wrote:

> Open Firmware 3; I have 2 OSs (OS 9 and NetBSD 2.0) on this computer.
>
> In OF, nvalias [alias] [boot device] works as far as I can make out.
exact input might help, but see below first

> nvstore produces, without exception, 'NVRAMRC not valid.'
>
Do you need nvstore? From my notes on OF I have nvstore associated with
nvedit, and nvrun...  Yes,  from Apple Open Firmware Read me:  Goes 
nvedit which edits a temp buffer, then either nvrun to run forth code 
from tempbuffer, or nvstore to actually
move script into nvram, or nvquit to discard temp buffer.   nvalias 
says it stores
the command devalias <alias> <device-pathname> in nvramrc, I think, 
maybe nvstore
is not necessary, than devalias is more direct, and actually its the 
temp buffer that is of nvedit/nvstore invalid because it hasn't been 
initialized... No nvedit call, there may be a checksum involved or 
similar-- I actually haven't used nvedit on the mac more than entering 
it and then ^c to quit it, I should probably learn it.

> I've reset PRAM and tried reset-nvram in OF; neither have helped.
> Is resetting PRAM the same as resetting NVRAM, or are they two 
> different things? Ought my next step be downloading the 90MB Mac OS 
> 9.1 update so I can run t
> he firmware updater? -- just tell me whether it would help, so I don't 
> spend two days downloading for nothing. As far as I can see it's not 
> NVRAM that's the problem; it's the NVRAMRC file. I don't know how to 
> alter this
Its listed in printenv
Also
nvramrc type
will print it.
cr ascii # emit nvramrc type ascii # emit cr
should do
#<contents of string>#
all on 1 line, might help find any garbage in it.   I don't have any 
nvaliases,
I think I'll set one, and try it out.  That last line is untested I 
actually just
did cr nvramrc type cr, and then nvramrc  and verified 0 len string via 
.s to look at stack.  -- should work though basically just a putc...