Author Topic: Q: How to define simple nonvolatile shortcut commands in Open Firmware?  (Read 2695 times)

Offline glt

  • Member
  • *
  • Posts: 1
  • new to the forums
I'd like to be able to start Open Firmware's telnet without having to type the whole incantation every time--I can't always remember it, and for some reason I'm typo-prone when talking to Open Firmware.  :(

Is there a way to define a shortcut for this in Open Firmware and save it in NVRAM somehow, so it will always be there?

For the same reason I'd also like to be able to boot from my USB thumb drive without typing the whole boot usb2/disk@1:2,\\yaboot magic phrase.

I know I should be able to do that with nvalias and will probably try on my own (I haven't yet), but someone  might save me a few moments if they could post it here.

Offline nanopico

  • Platinum Member
  • *****
  • Posts: 713
Yes you should be able to do this.
You just need to define a word in open firmware via a nvram script and an alias for the usb part.
I don't have the specific details at hand as I'm in the hospital at the moment, but if no one else get's back to you then I will try to reply when I get out.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline DieHard

  • Administrator
  • Platinum Member
  • *****
  • Posts: 1488
Quote
I don't have the specific details at hand as I'm in the hospital at the moment

Hope all is well :)

Offline GaryN

  • Platinum Member
  • *****
  • Posts: 814
  • active member
As do we all!

Offline nanopico

  • Platinum Member
  • *****
  • Posts: 713
Quote
I don't have the specific details at hand as I'm in the hospital at the moment

Hope all is well :)

As do we all!

It is now I think.  And thank you.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline nanopico

  • Platinum Member
  • *****
  • Posts: 713
I'd like to be able to start Open Firmware's telnet without having to type the whole incantation every time--I can't always remember it, and for some reason I'm typo-prone when talking to Open Firmware.  :(

Is there a way to define a shortcut for this in Open Firmware and save it in NVRAM somehow, so it will always be there?

For the same reason I'd also like to be able to boot from my USB thumb drive without typing the whole boot usb2/disk@1:2,\\yaboot magic phrase.

I know I should be able to do that with nvalias and will probably try on my own (I haven't yet), but someone  might save me a few moments if they could post it here.
nvalias works like this

Code: [Select]
nvalias alias device-path

So in your instance you would do something like this
Code: [Select]
nvalias usbBoot usb2/disk@1:2,\\yaboot

then you can just type
Code: [Select]
boot usbBoot

You can try this, but I'm not sure how it would work honestly.
Code: [Select]
nvalias usbBoot boot%20usb2/disk@1:2,\\yaboot

Then in theory you could just type usbBoot, hit enter and it would boot.

For the telnet starting thingy you can do (just replace 192.168.1.2 with what ever ip address you want it to listen on)
Code: [Select]
nvalias startTelnet " enet:telnet,192.168.1.2" io

Again you should be able to type startTelnet to start it.

Now I may be restating what you may already know, but be very careful in open firmware.  It is a lot of fun, but can cause issues.  In general most commands that screw anything up can be undone by turning the machine of and restarting it or by starting up and resetting nvram or by powering down and draining all power and letting it sit for a while.
In some instances seemingly harmless commands go wrong (if you miss type something) and poof your done and you are replacing a motherboard.  I've bricked two iBooks now playing around and because it affected early boot, it would never get far enough in initialization to even check for things like Command-Option-P-R to reset anything.    So word of caution, double check that you typed everything in correctly.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 272
  • New Member
You can't brick a New World Mac with incorrect NVRam settings, tho it will seem as if you did.

On tower system, Hold the power button, keep holding, wait for the Boot Chime, Keep holding, wait for the Programers Tone, keep holding, wait for the second Boot Chime, keep holding, finally the screen will light up and you will be presented with Open Firmware with the Defaults loaded rather than whatever you did to hose the system.

Reset the nvram, or change back whatever you changed that hosed the system.

I'll look into how to do this on portables, seem to not work the same.

There will always be a way to load the defaults, tho Apple likely didn't publish this to the general public, so they could turn some coin for there techs.

Offline RossDarker

  • Silver Member
  • ****
  • Posts: 195
There is some sort of button under the eject key I think on PowerBooks.
Dunking a biscuit is one of life's greatest joys.