Classic Mac Hardware (Troubleshooting, Upgrading, & Modifying) > General Hardware Discussions

Q: How to define simple nonvolatile shortcut commands in Open Firmware?

<< < (2/2)


--- Quote from: glt on March 24, 2016, 06:31:46 PM ---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.

--- End quote ---
nvalias works like this

--- Code: ---nvalias alias device-path

--- End code ---

So in your instance you would do something like this

--- Code: ---nvalias usbBoot usb2/disk@1:2,\\yaboot

--- End code ---

then you can just type

--- Code: ---boot usbBoot

--- End code ---

You can try this, but I'm not sure how it would work honestly.

--- Code: ---nvalias usbBoot boot%20usb2/disk@1:2,\\yaboot

--- End code ---

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

For the telnet starting thingy you can do (just replace with what ever ip address you want it to listen on)

--- Code: --- nvalias startTelnet " enet:telnet," io

--- End code ---

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.

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.

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


--- Quote from: RossDarker on April 29, 2018, 05:35:19 AM ---There is some sort of button under the eject key I think on PowerBooks.

--- End quote ---

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.


[0] Message Index

[*] Previous page

Go to full version