Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

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

glt

  • 1 MB
  • *
  • 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.
Logged

nanopico

  • 512 MB
  • *****
  • Posts: 769

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.
Logged
If it ain't broke, don't fix it, or break it so you can fix it!

DieHard

  • Staff Member
  • 2048 MB
  • ******
  • Posts: 2413

Quote
I don't have the specific details at hand as I'm in the hospital at the moment

Hope all is well :)
Logged

GaryN

  • Project Patron
  • 1024 MB
  • *
  • Posts: 1589
  • active member

As do we all!
Logged

nanopico

  • 512 MB
  • *****
  • Posts: 769

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.
Logged
If it ain't broke, don't fix it, or break it so you can fix it!

nanopico

  • 512 MB
  • *****
  • Posts: 769

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.
Logged
If it ain't broke, don't fix it, or break it so you can fix it!

darthnVader

  • 512 MB
  • *****
  • Posts: 681
  • 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.
Logged

RossDarker

  • 256 MB
  • *****
  • Posts: 282

There is some sort of button under the eject key I think on PowerBooks.
Logged

darthnVader

  • 512 MB
  • *****
  • Posts: 681
  • New Member
Re: Q: How to define simple nonvolatile shortcut commands in Open Firmware?
« Reply #8 on: October 13, 2018, 01:34:49 AM »

There is some sort of button under the eject key I think on PowerBooks.

I din't see one one my iBook, I don't have any powerbooks on hand right now.

I'm sure there is a way to load the defaults like there is for the tower G4's, but I just haven't been able to find it yet. If you hold the power button on the iBook/Powerbook, you do get the programers tone, but it just powers down if you keep holding, unlike the towers, that will give a second boot chime after the programers tone and enter Open Firmware with the defaults loaded, so you can reset the NVRAM from the command line in OF.

EDIT, ok, I forgot about the Open Firmware password lock on later iBooks and Powerbooks, this would be why we can't enter Open Firmware with the defaults loaded by pressing and holding the power button, as it would bypass that security feature.

Open Firmware 4.1.7 or 4.1.8 or later would likely require some pin on the logic board to be tapped, but the info is likely never to be made public unless we find it ourselves.
« Last Edit: October 13, 2018, 01:47:54 AM by darthnVader »
Logged
Pages: [1]   Go Up

Recent Topics