Nvram: Error getting variable - 'com.twocanoes.mds.var1'

I’m trying to use the mds_var1 variable in a script, but my script is failing and I’m seeing the following errors the /var/log/install.log after the workflow has run:

2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: Setting Variables from NVRAM if needed
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var1’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var2’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var3’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var4’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var5’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var6’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var7’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var8’: (iokit/common) data was not found
2019-09-06 12:38:20-07 MacBook-Air installd[287]: ./postinstall: nvram: Error getting variable - ‘com.twocanoes.mds.var9’: (iokit/common) data was not found

For context, I’m only using mds_var1 in a script which creates a user account and renames the machine.
Also, not sure if this is related, but I am not defining a user account in the MDS workflow settings.

Thanks!

Those errors can be ignored for the variables you are not using. Variables work by setting them in NVRAM in recovery then setting them in the environment when the script is run.

tim

Hi Tim,

Thank you for your response. The issue is that the variable I am using, mds_var1, is not being set, even though data is being entered in the pop-up during the imagr workflow.

Is there a specific order that should be in place for pkgs and scripts when using the variables? I currently have my pkgs set to run after macOS install, and scripts set to run after macOS and pkgs.

that shouldn’t make any difference. I’ll ask the person who does the QA on the variables to take a look.

@mkachtan, there is a new pre-beta build that should resolve this issue. This appears to be related to an issue with availability of the variable values for scripts run before vs. after packages. The new build will work with either of these options chosen.

1 Like

You guys are incredible, thank you so much. I will begin testing shortly and report back.

Just tested and confirmed working. Thanks again guys!

1 Like