BIC 2.7 Default and Autorun Preferences
Updated 05/24/2007
Copyright 2003-2007, Justin Elliott, Penn State University
Blast Image Config has the ability to read in default and autorun settings.
Default settings are useful for the system admins who want to force the person doing the restore to use certain defaults, ie, Open Firmware settings can't be changed and will be set to "command", etc.
Autorun settings are useful for quick and simple installs - ie, when there's only one image to restore and there's no need to make a lot of choices. Note that in order for autorun to work the default settings MUST be configured as well as the autorun settings.
When first launched, Blast Image Config looks for the edu.psu.clc.blastimageconfig preferences file in /Users/[userid]/Library/Preferences/ and reads the key and value pairs. This flat file contains keys and values for the various default and autorun settings. Currently the autorun/defaults pref file is a flat text file and not in a plist/XML format.
This sample edu.psu.clc.blastimageconfig preference file is already pre-configured to do the following:| Desired Action | Key Configured |
| Enable Autorun | AUTO_RUN=YES |
| Prompt if ok to autorun is ON | PROMPT_TO_AUTORUN=YES |
| Set the default autorun button to NO | DEFAULT_AUTORUN_BUTTON=NO |
| Set the Firmware security to command | OF_MODE=COMMAND |
| password set to "macosxlabs" | OF_PASSWD=%c7%cb%c9%c5%d9%d2%c6%cb%c8%d9 |
| Will not log the pre restore script | LOG_PRE_RESTORE_SCRIPT_OUTPUT=NO |
| No pre-restore script to execute | # PRE_RESTORE_SCRIPT (commented out) |
| Skip over setting the date and time | SKIP_DATE_TIME_SET=YES |
| Set the network configuration to DHCP | NETWORK_CONFIG=DHCP |
| Use the existing network prefs on the restored disk, don't force a new one to be created | CREATE_NEW_NETWORK_PREFS_FILE=NO |
| Set the 'Computer Name' to "My Mac" | COMPUTER_NAME=My Mac |
| Set the 'Rendezvous' (Bonjour/local) to "My-Mac" | LOCAL_NAME=My-Mac |
| Enable the AirPort Card if it's installed | ENABLE_AIRPORT=YES |
| Use the "MasterSystem.dmg" disk image | DEFAULT_DISK_IMAGE=MasterSystem.dmg |
| Don't add the other partitions on the booted disk to the 'Disk To Restore to' list | EXCLUDE_BOOT_DISK_VOLUMES=YES |
| Restore to the first disk | RESTORE_FIRST_DISK=YES |
| Don't enable verification to save time | ENABLE_VERIFICATION=NO |
| Don't pause on the restore dialog, just go! Make absolutely sure that the autorun prefs are good before doing this! | PAUSE_ON_RESTORE=NO |
| Set the boot blocks for the restored disk | BLESS_RESTORED_DISK=YES |
| Set the Mac's internal firware to boot from the restored disk - what 'Startup Disk' sets | SET_OF_BOOT=YES |
| Do not log the post restore script | LOG_POST_RESTORE_SCRIPT_OUTPUT=NO |
| Do not run any post restore script | # POST_RESTORE_SCRIPT (commented out) |
| Restart when finished | ENDING_TASK=RESTART |
The format of the keys and values in the file is as follows:
KEY_NAME=KEY_VALUELines starting with a '#' are treated as comments:
# This is a comment line.Here are the possible keys and values:
| Key Name | Possible Values | Key Description |
| AUTO_RUN | YES NO |
Should PSU BIC auto run with these defaults? |
| PROMPT_TO_AUTORUN | YES NO |
If we're autorunning, do you want to be prompted to autorun or not? (This is provided for a way to cancel an autorun.) |
| DEFAULT_AUTORUN_BUTTON | YES NO CANCEL |
Which button should be the default button? If you pressed return on this dialog, it would be the button selected. |
| LOCK_OF_SETTINGS | YES NO |
Do you want to allow (YES) or not (NO) the user to make changes to the Open Firmware security defaults? |
| QUIT_OLD_OPFW_VERS | YES NO |
If the Mac's Open Firmware is old and can't support Open Firmware Security, do you want to QUIT (YES) or not (NO)? |
| OF_MODE | DONOTMODIFY NONE COMMAND FULL |
Which mode do you want to set the Open Firmward to? Most environment should use the command mode. |
| OF_PASSWD_MODE | USEADMIN SPECIFY_PASSWORD USE_ENCRYPTED |
What should the Open Firmware password be? Use the Admin password at login, prompt for a specific password, or use a pre-encrypted password. |
| OF_PASSWD | EXAMPLE ONLY: %c7%cb%c9%c5%d9%d2%c6%cb%c8%d9 |
This is the encrypted open firmware password that should be applied. Read the instructions below on how to obtain this. |
| LOG_PRE_RESTORE_SCRIPT_OUTPUT | YES NO |
Added in version 2.7.0b1. The output of the pre and post restore scripts can now be logged to the run log file. |
| PRE_RESTORE_SCRIPT | ScriptName.pl | This is the filename of the script in the Pre-Restore-Scripts folder that should be selected as a default and executed when autorunning. |
| SKIP_DATE_TIME_SET | YES NO |
Do you want to skip over setting the date and time? |
| NETWORK_CONFIG | DO_NOT_CHANGE DHCP SET_IP |
How should the network settings be configured on the restored disk? |
| CREATE_NEW_NETWORK_PREFS_FILE | YES NO |
Added in version 2.7.0b1. The network preferences file on the restored disk can now be erased before a new one is created, if desired. Read the Revision History for more details on this setting. |
| DNS_SERVER1 | 123.123.123.123 | IP address of the primary DNS Server. Only used when the NETWORK_CONFIG is set to SET_IP |
| DNS_SERVER2 | 123.123.123.123 | IP address of the second DNS Server. Only used when the NETWORK_CONFIG is set to SET_IP |
| DNS_SERVER3 | 123.123.123.123 | IP address of the third DNS Server. Only used when the NETWORK_CONFIG is set to SET_IP |
| COMPUTER_NAME | Mac.{$IP} | Set the computer name on the restored disk. The max length is 63 characters, and should not contain these characters: "@", "=", ":". Use {$IP} to insert the Mac's IP address when using a static IP configuration. |
| LOCAL_NAME | Mac-{$IP} | Set the local (rendezvous) name on the restored disk. The max length is 63 characters, and should not contain these characters: " ", "'", "!", ".". Use {$IP} to insert the Mac's IP address when using a static IP configuration. |
| ENABLE_AIRPORT | YES NO |
Added to PSU BIC version 2.6.4. If an AirPort (802.11 Wireless Network Card) is detected, should it be enabled on the restored disk? Please note that this will ONLY work reliably when PSU BIC is running under Mac OS X 10.4.7, with ncutil version 3.1.1 installed, and the restored volume is ALSO at Mac OS X 10.4.7 or higher. All that this does is enable the card - whatever wireless networks were selected and known about on the master Mac that was imaged should continue to be recognized on the restored Mac. |
| DEFAULT_DISK_IMAGE | MasterSystem.dmg http://myserver.edu/MasterSystem.dmg /Volumes/ServerVolume/path/to/systemRestoreImage.dmg |
This is the name of the disk image that should be selected in the Disk Image popup menu. Images found in the RestoreImages folder or as specified in the NetworkImagesList file are FIRST added to the Disk Images popup menu, and THEN the matching disk image is automatically selected. As of version 2.5b2: If the path begins with "/" then the path is assumed to be a full absolute path and NOT an image in the RestoreImages folder. The easiest way to get this path is to drag and drop the image file from the Finder into the a terminal.app window and then copy the path that was generated there and paste it into the DEFAULT_DISK_IMAGE key value field. |
| EXCLUDE_BOOT_DISK_VOLUMES | YES NO |
Added in version 2.7.0b1. Set this to 'YES' if you do NOT want the other partitions that are on the same physical disk as the booted volume. If you are booting with a disk that has 2 or more partitions on it and you don't want them accidentally deleted by BIC, enable this setting. Read the Revision History for more details on this setting. |
| RESTORE_FIRST_DISK | YES NO |
Should the first available disk in the Disk To Restore popup menu be used for the autorun restore? |
| ENABLE_VERIFICATION | YES NO |
Should the restore be verified? If YES, the restore disk IMAGE must be read-only/compressed and have been scanned (checksums added). |
| PAUSE_ON_RESTORE | YES NO |
Added with BIC version 2.0b17. If autorunning, do you still want to pause at the main restore dialog? Useful for when you want all other tasks to be automated but you might need to select a different restore image or disk to restore to. |
| BLESS_RESTORED_DISK | YES NO |
Should the restored disk be bootable? In most cases, this will be YES |
| SET_OF_BOOT | YES NO |
Should the Open Firmware boot device be set to the restored disk? In most cases, you want this to be YES. If Open Firmware security is enabled, and this is set to NO, it's possible that the Mac will not allow the booting from the restored disk. |
| LOG_POST_RESTORE_SCRIPT_OUTPUT | YES NO |
Added in version 2.7.0b1. The output of the pre and post restore scripts can now be logged to the run log file. |
| POST_RESTORE_SCRIPT | ScriptName.pl | This is the filename of the script in the Post-Restore-Scripts folder that should be selected as a default and executed when autorunning. This script receives the shell path of the restored disk. |
| ENDING_TASK | QUIT RESTART SHUTDOWN |
What should be done when the restore and configure process is complete? |
In order to use the OF_PASSWD_MODE key set to USE_ENCRYPTED, you must provide the open firmware encrypted password in the OF_PASSWD key. Here's how to obtain the Open Firmware encrypted password:
- Run PSU Blast Image config on a Mac and set the Open Firmware password to the admin or specify the password, or ...
- Download and run Apple's Open Firmware Password tool and set the password.
- Open the terminal application from /Applications/Utilities/
- While in the Terminal window, enter in this command as a user with admin rights which will prompt you to enter in your admin password to obtain the security-password field from the nvram command:
sudo nvram -p | grep security-password
- The nvram will return the encrypted password:
security-password %c7%cb%c9%c5%d9%d2%c6%cb%c8%d9
- In this case you would copy the text returned starting at the '%' and ending at the rightmost '9'. The clipboard would then be set to "%c7%cb%c9%c5%d9%d2%c6%cb%c8%d9" (without the quotes). Paste this string into the prefs file for the OF_PASSWD key.
This site maintained by the Classroom and Lab Computing group of Information Technology Services.
Suggestions and comments about this web site: CLC Webmasters; Other contacts here.
This page was last modified: 5/24/2007 9:09:42 PM.