3

I'd like to run some code, go away and have a coffee and come back to a MacBook with the NVRAM, PRAM and SMC all reset (rather than doing them manually with yoga postures to press all the keys, waiting around for various signals that it worked etc).

Is there a quick and easy terminal script I can run?

I have a bad mac keyboard which could 'unpress' or double press at any time so I would think the reset was performed when in fact it had not. I want to alleviate that doubt

0
2

I'd try with a script using the following outline

sudo nvram -c

which should clear the contents of NVRAM.

curl 'https://sourceforge.net/projects/refind/files/0.11.4/refind-flashdrive-0.11.4.zip/download' --output refind.usbimage

copy SmcFlasher there (https://discussions.apple.com/thread/4855319?answerId=22024754022#22024754022)

shutdown -r now

and then you will have to manually follow the smcflasher instuctions up to

SmcFlasher.efi -reset 1

you can of course automate that as well by modifying the USB image accordingly and you'd be right where you want to be.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .