Image zone/Volume bar

HP Desktop M7240UK
Windows 7
Hi
I recently upgraded to Windows 7 from XP and I have lost the HP Image zone,how can I reinstall it?.
Also on my keyboard I have volume controls which when pressed would bring up a green volume bar on the monitor, this has also vanished and it was very handy.
Please can you help me retrieve these valuable items.
Regards

York, I don't believe that you will be able to reinstall HP Image Zone software.  There is no way to install individual programs from the Recovery Discs.  As for the volume bar, this is a special app.  I have the same problem with my Logitech keyboard after installing Win7 Pro.  So far I haven't found the solution for this either.  I believe the Logitech software is not compatible with Win7.
Signature:
HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
HP Photosmart 7520 AIO
++++++++++++++++++
**Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
Intelligence is God given; Wisdom is the sum of our mistakes!
I am not an HP employee.

Similar Messages

  • Volume Bar wont show

    Bottom Line: volume bar wont show
    ive tried cleaning the dock connecter with a tooth brush, with a paper towel, blowing it, nothings working
    Ive also tried erasing, restoring, reseting, turning the phone on/off, going to settings > music > sound check > on/off
    I need help or should i just go to APPLE and have them replace it?

    I assume you have a back up. Put in recovery mode turn off device hold down home button while connecting cable to the phone keep holding home button down until you see itunes and cable image on screen of the iphone. Itune will descover the device in recovery mode click ok and then click restore. Setup device as new device and test it.

  • Display shows a spinning disc with a magnifying glass and the volume bar?

    My ipod display shows a spinning disc with a magnifying glass,
    the volume bar is underneath...and none of the buttons work.
    Is this it? Do I need to buy a new one? I wouldn't be surprised, it's almost 3 years old and I've never had a problem with it... but still! Any ideas what I'm looking at? thank you!

    Gotta love the internet. Here's what I found about this display message.
    http://playlistmag.com/help/2004/09/trubipod/index.php
    Symptom: The iPod displays the image of a spinning disk and magnifying glass.
    Cure 1: Congratulations! You've managed to initiate the iPod's built-in disk scanning test. This is normally done on the first three generations of iPods by resetting the iPod and then pressing Previous, Next, Menu, and the Select button. This icon isn't available on the mini and fourth-generation iPods.
    If you've initiated the scanning test and don't wish for it to complete, reset the iPod. If you'd like to complete the scan, plug the iPod into a power source as the test drains the battery quickly and takes between 15 and 20 minutes to complete.
    Hopefully all is well.

  • Sometimes the volume bar doesn't show up on the ipad

    Hello,
    I was wondering if anyone could help me with a problem I am having. One day out of the blue the sound on my wife's iPad stoped working for music or videos. The speakers still worked for ringers but not anything else, so I know that the speakers still work. Also I have noticed that the sound only works for the videos and music when you plug in headphones. Also for some reason if you go to raise or lower the volume the volume bar isn't present, I can't do anything with sound aside from hear my ringer. So I wanted to know if anyone knew what was wrong with it. I am thinking there might be a short because sometimes it will work again but only for about 3 seconds and then it doesn't work any more.
    Also please don't give me the link of trouble shooting steps because I have already done them all, and I have also reset the iPad back to the original factory settings and nothing fixed the problem. I even went as far as going to geek squad since I had free tech support from them for the moment and they just told me that according to all the test/trouble shooting procedure that there is nothing wrong with the iPad hardware or software wise and since the speaker works with the ringer, it is obviously working. However for some reason it does not work with videos, music, or anything else for that matter without the headphones being plugged in.
    If anyone has experience this problem please tell me what you had to do to get it fixed, and if repair was necessary how much did it cost?
    P.S. I am sure that the mute is not on.

    It is likely that you need a change a setting on your email server. See here -
    http://support.tigertech.net/outlook-2007-lmos
    http://email.about.com/od/outlookexpressbackuphelp/qt/et_server_copy.htm

  • System Image Utility "volume on diskxsx failed to mount"

    I've been trying to create a NetRestore image using System Image Utility (SIU) for the past couple of days, but no matter what I do it fails.  I was oringally using OSX 10.8.4, but have now upgraded to 10.8.5.
    After reading through the logs, I can see SIU fails whilst it's trying to mount the volume.  Has anyone else had this issue, and if so, were you able to fix it?
    I also noticed the "Create image of /Volume/Macintosh HD/" function stops at 48% instead of 100%.  Is that normal?
    Below is a copy of the log that SIU produced.
    Starting image creation.
    Workflow Started (2013-09-24 08:41:36 +0100)
    OS X Server 10.8.5 (12F37), System Image Utility 10.8.3 (624)
    Starting action: Define Image Source (1.4)
    Finished running action: Define Image Source
    Starting action: Create Image (1.7.2)
    Starting image creation process...
    Create NetRestore Image
    Initiating NetRestore from installed volume.
    progressPrefix="_progress"
    ++ progressPrefix=_progress
    scriptsDebugKey="DEBUG"
    ++ scriptsDebugKey=DEBUG
    imageIsUDIFKey="1"
    ++ imageIsUDIFKey=1
    imageFormatKey="UDZO"
    ++ imageFormatKey=UDZO
    mountPoint=""
    ++ mountPoint=
    ownershipInfoKey="501:20"
    ++ ownershipInfoKey=501:20
    blockCopyDeviceKey="0"
    ++ blockCopyDeviceKey=0
    dmgTarget="NetInstall"
    ++ dmgTarget=NetInstall
    potentialRecoveryDevice="disk4s3"
    ++ potentialRecoveryDevice=disk4s3
    asrSource="ASRInstall.pkg"
    ++ asrSource=ASRInstall.pkg
    destPath="/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi"
    ++ destPath='/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    skipReorderingKey="0"
    ++ skipReorderingKey=0
    sourceVol="/Volumes/Macintosh HD"
    ++ sourceVol='/Volumes/Macintosh HD'
    postInstallHelperKey="1"
    ++ postInstallHelperKey=1
    . "${1}/createCommon.sh"
    + . /tmp/niutemp.rDvE48RI/createCommon.sh
    # createCommon.sh
    # Common functionality for the Image creation process.
    # sourced in by the various SIU scripts
    # Copyright © 2007-2012 Apple Inc. All rights reserved.
    # Using dscl, create a user account
    AddLocalUser()
    # $1 volume whose local node database to modify
    # $2 long name
    # $3 short name
    # $4 isAdminUser key
    # $5 password data
    # $6 password hint
    # $7 user picture path
    # $8 Language string
    local databasePath="/Local/Default/Users/${3}"
    local targetVol="${1}"
    # Find a free UID between 501 and 599
    for ((i=501; i<600; i++)); do
    output=`/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -search /Local/Default/Users UniqueID $i`
    # If there is already an account dscl returns it, so we're looking for an empty return value.
    if [ "$output" == "" ]; then
    break
    fi
    done
    # Create the user record
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -create $databasePath
    if [ $? != 0 ]; then
    echo "Failed to create '${databasePath}'."
    return 1
    fi
    # Add long name
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath RealName "${2}"
    if [ $? != 0 ]; then
    echo "Failed to set the RealName."
    return 1
    fi
    # Set up the users group information
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 20
    if [ $? != 0 ]; then
    echo "Failed to set the PrimaryGroupID."
    return 1
    fi
    # Add some additional stuff if the user is an admin
    if [ "${4}" == 1 ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/admin" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the admin group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserveradm" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserveradm group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserverusr" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserverusr group."
    return 1
    fi
    fi
    # Add UniqueID
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UniqueID ${i}
    if [ $? != 0 ]; then
    echo "Failed to set the UniqueID."
    return 1
    fi
    # Add Home Directory entry
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath NFSHomeDirectory /Users/${3}
    if [ $? != 0 ]; then
    echo "Failed to set the NFSHomeDirectory."
    fi
    if [ "${6}" != "" ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath AuthenticationHint "${6}"
    if [ $? != 0 ]; then
    echo "Failed to set the AuthenticationHint."
    return 1
    fi
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath picture "${7}"
    if [ $? != 0 ]; then
    echo "Failed to set the picture."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -passwd $databasePath "${5}"
    if [ $? != 0 ]; then
    echo "Failed to set the passwd."
    return 1
    fi
    # Add shell
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UserShell "/bin/bash"
    if [ $? != 0 ]; then
    echo "Failed to set the UserShell."
    return 1
    fi
    # Create Home directory
    if [ -e "/System/Library/User Template/${8}.lproj/" ]; then
    /usr/bin/ditto "/System/Library/User Template/${8}.lproj/" "${targetVol}/Users/${3}"
    else
    /usr/bin/ditto "/System/Library/User Template/English.lproj/" "${targetVol}/Users/${3}"
    fi
    if [ $? != 0 ]; then
    echo "Failed to copy the User Template."
    return 1
    fi
    /usr/sbin/chown -R $i:$i "${targetVol}/Users/${3}"
    if [ $? != 0 ]; then
    echo "Failed to set ownership on the User folder."
    return 1
    fi
    # Copies a list of files (full paths contained in the file at $1) from source to the path specified in $2
    CopyEntriesFromFileToPath()
    local theFile="$1"
    local theDest="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    local leafName=`basename "${FILE}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Copying ${FILE}."
    fi
    /usr/bin/ditto $opt "${FILE}" "${theDest}/${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Copies a list of packages (full path, destination pairs contained in the file at $1) from source to .../System/Installation/Packages/
    CopyPackagesWithDestinationsFromFile()
    local theFile="$1"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    local leafName=`basename "${FILE}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Copying ${FILE}."
    fi
    read SUB_PATH
    /usr/bin/ditto $opt "${FILE}" "${mountPoint}/Packages/${SUB_PATH}${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Create an installer package in ${1} wrapping the supplied script ${2}
    CreateInstallPackageForScript()
    local tempDir="$1"
    local scriptPath="$2"
    local scriptName=`basename "${scriptPath}"`
    local entryDir=`pwd`
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Create installer for script ${scriptName}"
    opt="-v"
    fi
    # shouldn't exist on entry...
    if [ -e "${tempDir}/emptyDir" ]; then
    /bin/rm -rf "${tempDir}/emptyDir"
    fi
    # make some directories to work in
    /bin/mkdir $opt -p "${tempDir}/${scriptName}.pkg/Contents/Resources" || return 1
    /bin/mkdir $opt "${tempDir}/emptyDir" || return 1
    # Create Archive.pax.gz
    cd "${tempDir}/emptyDir"
    /bin/pax -w -x cpio -f "${tempDir}/${scriptName}.pkg/Contents/Archive.pax" .
    /usr/bin/gzip "${tempDir}/${scriptName}.pkg/Contents/Archive.pax"
    cd "${entryDir}"
    # Create the Archive.bom file
    /usr/bin/mkbom "${tempDir}/emptyDir/" "${tempDir}/${scriptName}.pkg/Contents/Archive.bom" || return 1
    # Create the Info.plist
    /bin/cat > "${tempDir}/${scriptName}.pkg/Contents/Info.plist" << END
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>CFBundleIdentifier</key>
    <string>com.apple.SystemImageUtility.${scriptName}</string>
    <key>CFBundleShortVersionString</key>
    <string>1</string>
    <key>IFMajorVersion</key>
    <integer>1</integer>
    <key>IFMinorVersion</key>
    <integer>0</integer>
    <key>IFPkgFlagDefaultLocation</key>
    <string>/tmp</string>
    <key>IFPkgFlagInstallFat</key>
    <false/>
    <key>IFPkgFlagIsRequired</key>
    <false/>
    <key>IFPkgFormatVersion</key>
    <real>0.10000000149011612</real>
    </dict>
    </plist>
    END
    echo "pkmkrpkg1" > "${tempDir}/${scriptName}.pkg/Contents/PkgInfo"
    echo "major: 1\nminor: 0" > "${tempDir}/${scriptName}.pkg/Contents/Resources/package_version"
    # Copy the script
    /bin/cp "$scriptPath" "${tempDir}/${scriptName}.pkg/Contents/Resources/postflight"
    # clean up
    /bin/rm -r "${tempDir}/emptyDir"
    return 0
    # Validate or create the requested directory
    CreateOrValidatePath()
    local targetDir="$1"
    if [ ! -d "${targetDir}" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating working path at ${targetDir}"
    fi
    /bin/mkdir -p "${targetDir}" || return 1
    fi
    # If any exist, apply any user accounts
    CreateUserAccounts()
    # $1 volume whose local node database to modify
    local count="${#userFullName[*]}"
    local targetVol="${1}"
    if [ $count -gt 0 ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Adding $count user account(s) to the image"
    fi
    for ((index=0; index<$count; index++)); do
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Adding user ${userFullName[$index]}"
    fi
    #lay down user here
    AddLocalUser "${targetVol}" "${userFullName[$index]}" "${userUnixName[$index]}" "${userIsAdmin[$index]}" "${userPassword[$index]}" "${userPassHint[$index]}" "${userImagePath[$index]}" "${userLanguage[$index]}"
    if [ $? != 0 ]; then
    echo "Failed to create the User '${userUnixName[$index]}'."
    return 1
    fi
    #suppress the Apple ID request
    DisableAppleIDRequestForUser "${targetVol}" "${userUnixName[$index]}"
    done
    # "touch"
    /usr/bin/touch "${targetVol}/private/var/db/.AppleSetupDone"
    /usr/bin/touch "${targetVol}/Library/Receipts/.SetupRegComplete"
    fi
    # retry the hdiutil detach until we either time out or it succeeds
    retry_hdiutil_detach()
    local mount_point="${1}"
    local tries=0
    local forceAt=0
    local limit=24
    local opt=""
    forceAt=$(($limit - 1))
    while [ $tries -lt $limit ]; do
    tries=$(( tries + 1 ))
    /bin/sleep 5
    echo "Attempting to detach the disk image again..."
    /usr/bin/hdiutil detach "${mount_point}" $opt
    if [ $? -ne 0 ]; then
    # Dump a list of any still open files on the mountPoint
    if [ "${scriptsDebugKey}" == "DEBUG" ]; then
    /usr/sbin/lsof +fg "${mount_point}"
    fi
    if [ $tries -eq $forceAt ]; then
    echo "Failed to detach disk image at '${mount_point}' normally, adding -force."
    opt="-force"
    fi
    if [ $tries -eq $limit ]; then
    echo "Failed to detach disk image at '${mount_point}'."
    exit 1
    fi
    else
    tries=$limit
    fi
    done
    # Create the dyld shared cache files
    DetachAndRemoveMount()
    local theMount="${1}"
    local mountLoc=`mount | grep "${theMount}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Detaching disk image"
    # Dump a list of any still open files on the mountPoint
    if [ "${scriptsDebugKey}" == "DEBUG" ]; then
    /usr/sbin/lsof +fg "${theMount}"
    fi
    fi
    # Finally detach the mount (if it's actually mounted) and dispose the mountPoint directory
    if [ "${mountLoc}" != "" ]; then
    /usr/bin/hdiutil detach "${theMount}" || retry_hdiutil_detach "${theMount}" || return 1
    fi
    /bin/rmdir "${theMount}" || return 1
    return 0
    # Turn off the Apple ID request that happens on first boot after installing the OS
    DisableAppleIDRequestForUser()
    local targetUserLib="${1}/Users/${2}/Library"
    # Only do this if the file doesn't exist
    if [ ! -e "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Disabling Apple ID request for user '${2}'"
    fi
    /usr/libexec/PlistBuddy -c "Add :DidSeeCloudSetup bool 1" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :LastSeenCloudProductVersion string 10.8" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    fi
    return 0
    # If the pieces exist, enable remote access for the shell image
    EnableRemoteAccess()
    local srcVol="${1}"
    local opt=""
    if [ -e "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Enabling shell image remote access support"
    opt="-v"
    fi
    # install some things (again which aren't part of BaseSystem) needed for remote ASR installs
    /usr/bin/ditto $opt "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" "${mountPoint}/usr/lib/pam/pam_serialnumber.so.2" || return 1
    if [ -e "${srcVol}/usr/sbin/installer" ]; then
    /usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 1
    fi
    # copy the sshd config and add our keys to the end of it
    if [ -e "${srcVol}/etc/sshd_config" ]; then
    /bin/cat "${srcVol}/etc/sshd_config" - > "${mountPoint}/etc/sshd_config" << END
    HostKey /private/var/tmp/ssh_host_key
    HostKey /private/var/tmp/ssh_host_rsa_key
    HostKey /private/var/tmp/ssh_host_dsa_key
    END
    fi
    fi
    return 0
    # If it exists, install the sharing names and/or directory binding support to the install image
    HandleNetBootClientHelper()
    local tempDir="${1}"
    local targetVol="${2}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    if [ -e  "${tempDir}/bindingNames.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Directory Service binding information"
    fi
    /usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${targetVol}/etc/bindingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
    /bin/chmod 644 "${targetVol}/etc/bindingNames.plist"
    fi
    if [ -e  "${tempDir}/sharingNames.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Sharing Names support"
    fi
    /usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${targetVol}/etc/sharingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
    /bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
    fi
    if [ -e  "${tempDir}/NetBootClientHelper" ]; then
    /usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
    /bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
    /usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    /bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    # finally, make sure it isn't disabled...
    /usr/libexec/PlistBuddy -c "Delete :com.apple.NetBootClientHelper" "${targetVol}/var/db/launchd.db/com.apple.launchd/overrides.plist" > /dev/null 2>&1
    fi
    return 0
    # If any exist, install configuration profiles to the install image
    InstallConfigurationProfiles()
    local tempDir="${1}"
    local targetVol="${2}"
    local profilesDir="${targetVol}/var/db/ConfigurationProfiles"
    if [ -e  "${tempDir}/configProfiles.txt" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Configuration Profiles"
    fi
    /bin/mkdir -p "${profilesDir}/Setup" || return 1
    # Make sure the perms are correct
    /usr/sbin/chown root:wheel "${profilesDir}"
    /bin/chmod 755 "${profilesDir}"
    /usr/sbin/chown root:wheel "${profilesDir}/Setup"
    /bin/chmod 755 "${profilesDir}/Setup"
    /usr/bin/touch "${profilesDir}/.profilesAreInstalled"
    CopyEntriesFromFileToPath "${tempDir}/configProfiles.txt" "${profilesDir}/Setup" || return 1
    # Enable MCX debugging
    if [ 1 == 1 ]; then
    if [ -e  "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" ]; then
    /usr/libexec/PlistBuddy -c "Delete :debugOutput" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Delete :collateLogs" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    /usr/libexec/PlistBuddy -c "Add :debugOutput string -2" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :collateLogs string 1" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    fi
    # Converts a list of scripts (full paths contained in the file at $1) into packages in $3
    InstallScriptsFromFile()
    local tempDir="${1}"
    local theFile="${2}"
    local targetDir="${3}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Converting scripts into install packages"
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    # make an installer package out of the script
    CreateInstallPackageForScript "$tempDir" "${FILE}" || return 1
    # copy the resulting package to the Packages directory
    local leafName=`basename "${FILE}"`
    /usr/bin/ditto $opt "${tempDir}/${leafName}.pkg" "${targetDir}/${leafName}.pkg" || return 1
    # clean up
    /bin/rm -r "${tempDir}/${leafName}.pkg"
    fi
    done < "${theFile}"
    return 0
    # Prepare the source by deleting stuff we don't want to copy if sourcing a volume
    PostFlightDestination()
    local tempDir="${1}"
    local destDir="${2}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Performing post install cleanup"
    opt="-v"
    fi
    # delete the DS indices to force reindexing...
    if [ -e "${mountPoint}/var/db/dslocal/indices/Default/index" ]; then
    /bin/rm $opt "${mountPoint}/var/db/dslocal/indices/Default/index"
    fi
    # detach the disk and remove the mount folder
    DetachAndRemoveMount "${mountPoint}"
    if [ $? != 0 ]; then
    echo "Failed to detach and clean up the mount at '${mountPoint}'."
    return 1
    fi
    echo "Correcting permissions. ${ownershipInfoKey} $destDir"
    /usr/sbin/chown -R "${ownershipInfoKey}" "$destDir"
    # Prepare the source by deleting stuff we don't want to copy if sourcing a volume
    PreCleanSource()
    local srcVol="$1"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    if [ -e "$srcVol/private/var/vm/swapfile*" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Removing swapfiles on $1"
    fi
    /bin/rm $opt "$srcVol/private/var/vm/swapfile*"
    fi
    if [ -e "$srcVol/private/var/vm/sleepimage" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Removing sleepimage on $1"
    fi
    /bin/rm $opt "$srcVol/private/var/vm/sleepimage"
    fi
    if [ -d "$srcVol/private/tmp" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Cleaning out /private/tmp on $1"
    fi
    /bin/rm -r $opt "$srcVol/private/tmp/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/private/var/tmp" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Cleaning out /private/var/tmp on $1"
    fi
    /bin/rm -r $opt "$srcVol/private/var/tmp/*" > /dev/null 2>&1
    fi
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Cleaning out devices and volumes on $1"
    fi
    if [ -d "$srcVol/Volumes" ]; then
    /bin/rm -r $opt "$srcVol/Volumes/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/dev" ]; then
    /bin/rm $opt "$srcVol/dev/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/private/var/run" ]; then
    /bin/rm -r $opt "$srcVol/private/var/run/*" > /dev/null 2>&1
    fi
    # Copy kernel and build the kext cache on the boot image
    PrepareKernelAndKextCache()
    local srcDir="$1"
    local destDir="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Preparing the kernel and kext cache for the boot image"
    opt="-v"
    fi
    # Insure the kext cache on our source volume (the boot shell) is up to date
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Updating kext cache on source volume"
    fi
    /usr/sbin/kextcache -update-volume "${srcDir}" || return 1
    # Copy the i386 and, if it exists, the x86_64 architecture
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing the kext cache to the boot image"
    fi
    # make sure this doesn't exist
    if [ -e "${destDir}/i386" ]; then
    /bin/rm -rf "${destDir}/i386"
    fi
    # Install kextcaches to the nbi folder
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating a kernelcache for the boot shell"
    fi
    /bin/mkdir -p $opt "${destDir}/i386/x86_64" || return 1
    /usr/sbin/kextcache -arch x86_64 -L -N -S -z -K "${srcDir}/mach_kernel" -c "${destDir}/i386/x86_64/kernelcache" "${srcDir}/System/Library/Extensions" || return 1
    # Create the i386 and x86_64 boot loaders on the boot image
    PrepareBootLoader()
    local srcVol="$1"
    local destDir="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Preparing boot loader"
    opt="-v"
    fi
    # Copy the boot.efi to the booter shell
    if [ -e "${mountPoint}/System/Library/CoreServices/boot.efi" ]; then
    /usr/bin/ditto $opt "${mountPoint}/System/Library/CoreServices/boot.efi" "${destDir}/i386/booter" || return 1
    else
    /usr/bin/ditto $opt "${srcVol}/System/Library/CoreServices/boot.efi" "${destDir}/i386/booter" || return 1
    fi
    # Unlock the file so we can change its owner later
    chflags nouchg "${destDir}/i386/booter"
    # Copy the PlatformSupport.plist file
    if [ -e "${mountPoint}/System/Library/CoreServices/PlatformSupport.plist" ]; then
    /usr/bin/ditto $opt "${mountPoint}/System/Library/CoreServices/PlatformSupport.plist" "${destDir}/i386/PlatformSupport.plist" || return 1
    else
    /usr/bin/ditto $opt "${srcVol}/System/Library/CoreServices/PlatformSupport.plist" "${destDir}/i386/PlatformSupport.plist" || return 1
    fi
    # If it exists, install the partitioning application and data onto the install image
    ProcessAutoPartition()
    local tempDir="$1"
    local opt=""
    local targetDir=""
    if [ -e "$tempDir/PartitionInfo.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    # Determine if this is an install source, or a restore source
    if [ -d "${mountPoint}/Packages" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Partitioning application and data to install image"
    fi
    targetDir="${mountPoint}/Packages"
    elif [ -d "${mountPoint}/System/Installation/Packages" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Partitioning application and data to restore image"
    fi
    targetDir="${mountPoint}/System/Installation/Packages"
    else
    echo "There doesn't appear to be either an install or restore source mounted at ${mountPoint}"
    return 1
    fi
    # Create the Extras directory if it doesn't exist
    if [ ! -d "${targetDir}/Extras" ]; then
    /bin/mkdir "${targetDir}/Extras"
    fi
    targetDir="${targetDir}/Extras"
    /usr/bin/ditto $opt "$tempDir/PartitionInfo.plist" "${targetDir}/PartitionInfo.plist" || return 1
    /usr/bin/ditto $opt "$tempDir/AutoPartition.app" "${targetDir}/AutoPartition.app" || return 1
    fi
    return 0
    # If it exists, install the minstallconfig.xml onto the install image
    ProcessMinInstall()
    local tempDir="$1"
    local opt=""
    local targetDir="${mountPoint}/Packages/Extras"
    if [ -e "$tempDir/minstallconfig.xml" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing minstallconfig.xml to install image"
    opt="-v"
    fi
    /usr/bin/ditto $opt "$tempDir/minstallconfig.xml" "${targetDir}/minstallconfig.xml" || return 1
    /usr/sbin/chown root:wheel "${targetDir}/minstallconfig.xml"
    /bin/chmod 644 "${targetDir}/minstallconfig.xml"
    fi
    return 0
    # untar the OSInstall.mpkg so it can be modified
    untarOSInstallMpkg()
    local tempDir="$1"
    local opt=""
    # we might have already done this, so check for it first
    if [ ! -d "${tempDir}/OSInstall_pkg" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "uncompressing OSInstall.mpkg"
    opt="-v"
    fi
    /bin/mkdir "${tempDir}/OSInstall_pkg"
    cd "${tempDir}/OSInstall_pkg"
    /usr/bin/xar $opt -xf "${mountPoint}/System/Installation/Packages/OSInstall.mpkg"
    # make Distribution writeable
    /bin/chmod 777 "${tempDir}/OSInstall_pkg"
    /bin/chmod 666 "${tempDir}/OSInstall_pkg/Distribution"
    fi
    # Make a tempdir to mount the image on
    mountPoint=`mktemp -d "/tmp/mnt.XXXXXXXX"`
    mktemp -d "/tmp/mnt.XXXXXXXX"
    ++ mktemp -d /tmp/mnt.XXXXXXXX
    + mountPoint=/tmp/mnt.7E4iD6mQ
    sourceMount=""
    + sourceMount=
    crfsErrExit()
    echo "Execution of '`basename \"${0}\"`' failed. Cleaning up."
    # detach the disk and remove the mount folder
    DetachAndRemoveMount "${mountPoint}"
    # detach the mounted source, if necessary
    if [ "${sourceMount}" != "" ] ; then
    DetachAndRemoveMount "${sourceMount}"
    fi
    # Remove the items we created
    /bin/rm -r "$destPath/i386" > /dev/null 2>&1
    /bin/rm "$destPath/$dmgTarget.dmg" > /dev/null 2>&1
    /bin/rm "$destPath/System.dmg" > /dev/null 2>&1
    # Finally, remove the directory IF empty
    /bin/rmdir "$destPath"
    exit 1
    InstallNetBootClientHelper()
    local tempDir="${1}"
    local destDir="${mountPoint}/Packages/Extras"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    if [ -e "${tempDir}/bindingNames.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Directory Service binding information"
    fi
    /usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${destDir}/bindingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${destDir}/bindingNames.plist"
    /bin/chmod 644 "${destDir}/bindingNames.plist"
    fi
    if [ -e "${tempDir}/sharingNames.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Sharing Names support"
    fi
    /usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${destDir}/sharingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${destDir}/sharingNames.plist"
    /bin/chmod 644 "${destDir}/sharingNames.plist"
    fi
    # This is required, make sure it's here
    /usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${destDir}/NetBootClientHelper" || return 1
    /usr/sbin/chown root:wheel "${destDir}/NetBootClientHelper"
    /bin/chmod 555 "${destDir}/NetBootClientHelper"
    /usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${destDir}/com.apple.NetBootClientHelper.plist" || return 1
    /usr/sbin/chown root:wheel "${destDir}/com.apple.NetBootClientHelper.plist"
    /bin/chmod 644 "${destDir}/com.apple.NetBootClientHelper.plist"
    /usr/bin/ditto $opt "${tempDir}/installClientHelper.sh" "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh" || return 1
    /usr/sbin/chown root:wheel "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh"
    /bin/chmod 555 "${mountPoint}/var/tmp/niu/postinstall/installClientHelper.sh"
    return 0
    InstallBaseSystemToShell()
    local baseSystemDMG="${1}"
    local shellMount="${2}"
    local tempDir=`/usr/bin/dirname "${1}"`
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    opt="-v"
    echo "Copying Base System bits to the boot shell image"
    fi
    baseMount=`mktemp -d "/tmp/mnt_bs.XXXXXXXX"`
    /usr/bin/hdiutil attach "${baseSystemDMG}" -noverify -owners on -nobrowse -noautoopen -mountpoint "${baseMount}" -quiet || return 1
    # Copy the boot.efi and SystemVersion.plist out to the shell dmg
    /usr/bin/ditto $opt "${baseMount}/System/Library/CoreServices/boot.efi" "${shellMount}/boot.efi" || return 1
    chflags nouchg "${shellMount}/boot.efi"
    /bin/mkdir -p "${shellMount}/usr/standalone/i386" || return 1
    /bin/ln "${shellMount}/boot.efi" "${shellMount}/usr/standalone/i386/boot.efi" || return 1
    /bin/mkdir -p "${shellMount}/System/Library/CoreServices" || return 1
    /bin/ln "${shellMount}/boot.efi" "${shellMount}/System/Library/CoreServices/boot.efi" || return 1
    /usr/bin/ditto $opt "${baseMount}/System/Library/CoreServices/SystemVersion.plist" "${shellMount}/System/Library/CoreServices/SystemVersion.plist" || return 1
    # stash some things we need for later
    /usr/bin/ditto $opt "${baseMount}/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache" "${tempDir}/kernelcache" || return 1
    /usr/bin/ditto $opt "${baseMount}/System/Library/CoreServices/com.apple.recovery.boot/PlatformSuppo rt.plist" "${tempDir}/PlatformSupport.plist" || return 1
    # Clean up
    /usr/bin/hdiutil detach "${baseMount}" || retry_hdiutil_detach "${baseMount}" || return 1
    /bin/rmdir "${baseMount}"
    theDmg=`basename "${baseSystemDMG}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Copying ${theDmg} to the boot shell."
    fi
    /usr/bin/ditto $debug_opt "${baseSystemDMG}" "${shellMount}/${theDmg}"
    return 0
    # Set up for script debugging
    debug_opt=""
    + debug_opt=
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    debug_opt="-v"
    fi
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + debug_opt=-v
    # Prepare the destination
    CreateOrValidatePath "${destPath}" || crfsErrExit
    + CreateOrValidatePath '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    + local 'targetDir=/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    + '[' '!' -d '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi' ']'
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + echo 'Creating working path at /Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    Creating working path at /Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi
    + /bin/mkdir -p '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    # Source in our image building commands
    . "${1}/buildCommands.sh"
    + . /tmp/niutemp.rDvE48RI/buildCommands.sh
    '/System/Library/CoreServices/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/asrFromVolume.sh' "/tmp/niutemp.rDvE48RI" "/Volumes/Macintosh HD" "System" || exit 1
    ++ '/System/Library/CoreServices/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/asrFromVolume.sh' /tmp/niutemp.rDvE48RI '/Volumes/Macintosh HD' System
    progressPrefix="_progress"
    ++ progressPrefix=_progress
    scriptsDebugKey="DEBUG"
    ++ scriptsDebugKey=DEBUG
    imageIsUDIFKey="1"
    ++ imageIsUDIFKey=1
    imageFormatKey="UDZO"
    ++ imageFormatKey=UDZO
    mountPoint=""
    ++ mountPoint=
    ownershipInfoKey="501:20"
    ++ ownershipInfoKey=501:20
    blockCopyDeviceKey="0"
    ++ blockCopyDeviceKey=0
    dmgTarget="NetInstall"
    ++ dmgTarget=NetInstall
    potentialRecoveryDevice="disk4s3"
    ++ potentialRecoveryDevice=disk4s3
    asrSource="ASRInstall.pkg"
    ++ asrSource=ASRInstall.pkg
    destPath="/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi"
    ++ destPath='/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    skipReorderingKey="0"
    ++ skipReorderingKey=0
    sourceVol="/Volumes/Macintosh HD"
    ++ sourceVol='/Volumes/Macintosh HD'
    postInstallHelperKey="1"
    ++ postInstallHelperKey=1
    # variables we will need
    created_dest="NO"
    + created_dest=NO
    afvErrExit()
    echo "Execution of '`basename \"${0}\"`' failed. Cleaning up."
    # detach the disk and remove the mount folder
    if [ "${created_dest}" == "YES" ]; then
    /bin/rm -r "${destPath}"
    fi
    exit 1
    retrieveBaseSystemDMG()
    local tempDir="${1}"
    local opt=""
    if [ "${potentialRecoveryDevice}" != "" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Retrieving BaseSystem bits from Recovery HD"
    opt="-v"
    fi
    recoveryMount=`mktemp -d "/tmp/mnt_rp.XXXXXXXX"`
    /usr/sbin/diskutil mount readOnly -mountPoint "${recoveryMount}" "${potentialRecoveryDevice}" || return 1
    # Now make sure this is what was expected
    if [ -e "${recoveryMount}/com.apple.recovery.boot/BaseSystem.dmg" ]; then
    /usr/bin/ditto $opt "${recoveryMount}/com.apple.recovery.boot/BaseSystem.dmg" "${tempDir}/BaseSystem.dmg" || return 1
    /usr/bin/ditto $opt "${recoveryMount}/com.apple.recovery.boot/BaseSystem.chunklist" "${tempDir}/BaseSystem.chunklist"
    fi
    /usr/sbin/diskutil unmount "${potentialRecoveryDevice}" || return 1
    /bin/rmdir "${recoveryMount}"
    fi
    return 0
    # Insure the working path (dmg destination) exists
    if [ ! -d "${destPath}" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating working path at ${destPath}"
    fi
    /bin/mkdir -p "${destPath}" || afvErrExit
    created_dest="YES"
    fi
    + '[' '!' -d '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi' ']'
    # If the volume source is the boot drive we have an asr:// type source
    if [ "${2}" == "/" ]; then
    # Create an empty image to skip the ASR volume creation
    /usr/bin/touch "${destPath}/${3}.dmg"
    # Set aside the needed BaseSystem.dmg
    retrieveBaseSystemDMG "${1}" || afvErrExit
    fi
    + '[' '/Volumes/Macintosh HD' == / ']'
    # Look for an existing System.dmg
    if [ ! -e "${destPath}/${3}.dmg" ]; then
    # Didn't find one, so create it from volume source
    ${1}/makeNetRestoreFromItem.sh "${1}" "${2}" "${3}" || afvErrExit
    fi
    + '[' '!' -e '/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi/System.dmg' ']'
    + /tmp/niutemp.rDvE48RI/makeNetRestoreFromItem.sh /tmp/niutemp.rDvE48RI '/Volumes/Macintosh HD' System
    progressPrefix="_progress"
    ++ progressPrefix=_progress
    scriptsDebugKey="DEBUG"
    ++ scriptsDebugKey=DEBUG
    imageIsUDIFKey="1"
    ++ imageIsUDIFKey=1
    imageFormatKey="UDZO"
    ++ imageFormatKey=UDZO
    mountPoint=""
    ++ mountPoint=
    ownershipInfoKey="501:20"
    ++ ownershipInfoKey=501:20
    blockCopyDeviceKey="0"
    ++ blockCopyDeviceKey=0
    dmgTarget="NetInstall"
    ++ dmgTarget=NetInstall
    potentialRecoveryDevice="disk4s3"
    ++ potentialRecoveryDevice=disk4s3
    asrSource="ASRInstall.pkg"
    ++ asrSource=ASRInstall.pkg
    destPath="/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi"
    ++ destPath='/Users/morgan/Desktop/NetRestore of Macintosh HD_2.nbi'
    skipReorderingKey="0"
    ++ skipReorderingKey=0
    sourceVol="/Volumes/Macintosh HD"
    ++ sourceVol='/Volumes/Macintosh HD'
    postInstallHelperKey="1"
    ++ postInstallHelperKey=1
    . "${1}/createCommon.sh"
    + . /tmp/niutemp.rDvE48RI/createCommon.sh
    # createCommon.sh
    # Common functionality for the Image creation process.
    # sourced in by the various SIU scripts
    # Copyright © 2007-2012 Apple Inc. All rights reserved.
    # Using dscl, create a user account
    AddLocalUser()
    # $1 volume whose local node database to modify
    # $2 long name
    # $3 short name
    # $4 isAdminUser key
    # $5 password data
    # $6 password hint
    # $7 user picture path
    # $8 Language string
    local databasePath="/Local/Default/Users/${3}"
    local targetVol="${1}"
    # Find a free UID between 501 and 599
    for ((i=501; i<600; i++)); do
    output=`/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -search /Local/Default/Users UniqueID $i`
    # If there is already an account dscl returns it, so we're looking for an empty return value.
    if [ "$output" == "" ]; then
    break
    fi
    done
    # Create the user record
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -create $databasePath
    if [ $? != 0 ]; then
    echo "Failed to create '${databasePath}'."
    return 1
    fi
    # Add long name
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath RealName "${2}"
    if [ $? != 0 ]; then
    echo "Failed to set the RealName."
    return 1
    fi
    # Set up the users group information
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 20
    if [ $? != 0 ]; then
    echo "Failed to set the PrimaryGroupID."
    return 1
    fi
    # Add some additional stuff if the user is an admin
    if [ "${4}" == 1 ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/admin" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the admin group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserveradm" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserveradm group."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append "/Local/Default/Groups/_appserverusr" GroupMembership "${3}"
    if [ $? != 0 ]; then
    echo "Failed to add the user to the _appserverusr group."
    return 1
    fi
    fi
    # Add UniqueID
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UniqueID ${i}
    if [ $? != 0 ]; then
    echo "Failed to set the UniqueID."
    return 1
    fi
    # Add Home Directory entry
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath NFSHomeDirectory /Users/${3}
    if [ $? != 0 ]; then
    echo "Failed to set the NFSHomeDirectory."
    fi
    if [ "${6}" != "" ]; then
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath AuthenticationHint "${6}"
    if [ $? != 0 ]; then
    echo "Failed to set the AuthenticationHint."
    return 1
    fi
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath picture "${7}"
    if [ $? != 0 ]; then
    echo "Failed to set the picture."
    return 1
    fi
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -passwd $databasePath "${5}"
    if [ $? != 0 ]; then
    echo "Failed to set the passwd."
    return 1
    fi
    # Add shell
    /usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UserShell "/bin/bash"
    if [ $? != 0 ]; then
    echo "Failed to set the UserShell."
    return 1
    fi
    # Create Home directory
    if [ -e "/System/Library/User Template/${8}.lproj/" ]; then
    /usr/bin/ditto "/System/Library/User Template/${8}.lproj/" "${targetVol}/Users/${3}"
    else
    /usr/bin/ditto "/System/Library/User Template/English.lproj/" "${targetVol}/Users/${3}"
    fi
    if [ $? != 0 ]; then
    echo "Failed to copy the User Template."
    return 1
    fi
    /usr/sbin/chown -R $i:$i "${targetVol}/Users/${3}"
    if [ $? != 0 ]; then
    echo "Failed to set ownership on the User folder."
    return 1
    fi
    # Copies a list of files (full paths contained in the file at $1) from source to the path specified in $2
    CopyEntriesFromFileToPath()
    local theFile="$1"
    local theDest="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    local leafName=`basename "${FILE}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Copying ${FILE}."
    fi
    /usr/bin/ditto $opt "${FILE}" "${theDest}/${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Copies a list of packages (full path, destination pairs contained in the file at $1) from source to .../System/Installation/Packages/
    CopyPackagesWithDestinationsFromFile()
    local theFile="$1"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    local leafName=`basename "${FILE}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Copying ${FILE}."
    fi
    read SUB_PATH
    /usr/bin/ditto $opt "${FILE}" "${mountPoint}/Packages/${SUB_PATH}${leafName}" || return 1
    fi
    done < "${theFile}"
    return 0
    # Create an installer package in ${1} wrapping the supplied script ${2}
    CreateInstallPackageForScript()
    local tempDir="$1"
    local scriptPath="$2"
    local scriptName=`basename "${scriptPath}"`
    local entryDir=`pwd`
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Create installer for script ${scriptName}"
    opt="-v"
    fi
    # shouldn't exist on entry...
    if [ -e "${tempDir}/emptyDir" ]; then
    /bin/rm -rf "${tempDir}/emptyDir"
    fi
    # make some directories to work in
    /bin/mkdir $opt -p "${tempDir}/${scriptName}.pkg/Contents/Resources" || return 1
    /bin/mkdir $opt "${tempDir}/emptyDir" || return 1
    # Create Archive.pax.gz
    cd "${tempDir}/emptyDir"
    /bin/pax -w -x cpio -f "${tempDir}/${scriptName}.pkg/Contents/Archive.pax" .
    /usr/bin/gzip "${tempDir}/${scriptName}.pkg/Contents/Archive.pax"
    cd "${entryDir}"
    # Create the Archive.bom file
    /usr/bin/mkbom "${tempDir}/emptyDir/" "${tempDir}/${scriptName}.pkg/Contents/Archive.bom" || return 1
    # Create the Info.plist
    /bin/cat > "${tempDir}/${scriptName}.pkg/Contents/Info.plist" << END
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>CFBundleIdentifier</key>
    <string>com.apple.SystemImageUtility.${scriptName}</string>
    <key>CFBundleShortVersionString</key>
    <string>1</string>
    <key>IFMajorVersion</key>
    <integer>1</integer>
    <key>IFMinorVersion</key>
    <integer>0</integer>
    <key>IFPkgFlagDefaultLocation</key>
    <string>/tmp</string>
    <key>IFPkgFlagInstallFat</key>
    <false/>
    <key>IFPkgFlagIsRequired</key>
    <false/>
    <key>IFPkgFormatVersion</key>
    <real>0.10000000149011612</real>
    </dict>
    </plist>
    END
    echo "pkmkrpkg1" > "${tempDir}/${scriptName}.pkg/Contents/PkgInfo"
    echo "major: 1\nminor: 0" > "${tempDir}/${scriptName}.pkg/Contents/Resources/package_version"
    # Copy the script
    /bin/cp "$scriptPath" "${tempDir}/${scriptName}.pkg/Contents/Resources/postflight"
    # clean up
    /bin/rm -r "${tempDir}/emptyDir"
    return 0
    # Validate or create the requested directory
    CreateOrValidatePath()
    local targetDir="$1"
    if [ ! -d "${targetDir}" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Creating working path at ${targetDir}"
    fi
    /bin/mkdir -p "${targetDir}" || return 1
    fi
    # If any exist, apply any user accounts
    CreateUserAccounts()
    # $1 volume whose local node database to modify
    local count="${#userFullName[*]}"
    local targetVol="${1}"
    if [ $count -gt 0 ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Adding $count user account(s) to the image"
    fi
    for ((index=0; index<$count; index++)); do
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Adding user ${userFullName[$index]}"
    fi
    #lay down user here
    AddLocalUser "${targetVol}" "${userFullName[$index]}" "${userUnixName[$index]}" "${userIsAdmin[$index]}" "${userPassword[$index]}" "${userPassHint[$index]}" "${userImagePath[$index]}" "${userLanguage[$index]}"
    if [ $? != 0 ]; then
    echo "Failed to create the User '${userUnixName[$index]}'."
    return 1
    fi
    #suppress the Apple ID request
    DisableAppleIDRequestForUser "${targetVol}" "${userUnixName[$index]}"
    done
    # "touch"
    /usr/bin/touch "${targetVol}/private/var/db/.AppleSetupDone"
    /usr/bin/touch "${targetVol}/Library/Receipts/.SetupRegComplete"
    fi
    # retry the hdiutil detach until we either time out or it succeeds
    retry_hdiutil_detach()
    local mount_point="${1}"
    local tries=0
    local forceAt=0
    local limit=24
    local opt=""
    forceAt=$(($limit - 1))
    while [ $tries -lt $limit ]; do
    tries=$(( tries + 1 ))
    /bin/sleep 5
    echo "Attempting to detach the disk image again..."
    /usr/bin/hdiutil detach "${mount_point}" $opt
    if [ $? -ne 0 ]; then
    # Dump a list of any still open files on the mountPoint
    if [ "${scriptsDebugKey}" == "DEBUG" ]; then
    /usr/sbin/lsof +fg "${mount_point}"
    fi
    if [ $tries -eq $forceAt ]; then
    echo "Failed to detach disk image at '${mount_point}' normally, adding -force."
    opt="-force"
    fi
    if [ $tries -eq $limit ]; then
    echo "Failed to detach disk image at '${mount_point}'."
    exit 1
    fi
    else
    tries=$limit
    fi
    done
    # Create the dyld shared cache files
    DetachAndRemoveMount()
    local theMount="${1}"
    local mountLoc=`mount | grep "${theMount}"`
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Detaching disk image"
    # Dump a list of any still open files on the mountPoint
    if [ "${scriptsDebugKey}" == "DEBUG" ]; then
    /usr/sbin/lsof +fg "${theMount}"
    fi
    fi
    # Finally detach the mount (if it's actually mounted) and dispose the mountPoint directory
    if [ "${mountLoc}" != "" ]; then
    /usr/bin/hdiutil detach "${theMount}" || retry_hdiutil_detach "${theMount}" || return 1
    fi
    /bin/rmdir "${theMount}" || return 1
    return 0
    # Turn off the Apple ID request that happens on first boot after installing the OS
    DisableAppleIDRequestForUser()
    local targetUserLib="${1}/Users/${2}/Library"
    # Only do this if the file doesn't exist
    if [ ! -e "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Disabling Apple ID request for user '${2}'"
    fi
    /usr/libexec/PlistBuddy -c "Add :DidSeeCloudSetup bool 1" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :LastSeenCloudProductVersion string 10.8" "${targetUserLib}/Preferences/com.apple.SetupAssistant.plist" > /dev/null 2>&1
    fi
    return 0
    # If the pieces exist, enable remote access for the shell image
    EnableRemoteAccess()
    local srcVol="${1}"
    local opt=""
    if [ -e "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Enabling shell image remote access support"
    opt="-v"
    fi
    # install some things (again which aren't part of BaseSystem) needed for remote ASR installs
    /usr/bin/ditto $opt "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" "${mountPoint}/usr/lib/pam/pam_serialnumber.so.2" || return 1
    if [ -e "${srcVol}/usr/sbin/installer" ]; then
    /usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 1
    fi
    # copy the sshd config and add our keys to the end of it
    if [ -e "${srcVol}/etc/sshd_config" ]; then
    /bin/cat "${srcVol}/etc/sshd_config" - > "${mountPoint}/etc/sshd_config" << END
    HostKey /private/var/tmp/ssh_host_key
    HostKey /private/var/tmp/ssh_host_rsa_key
    HostKey /private/var/tmp/ssh_host_dsa_key
    END
    fi
    fi
    return 0
    # If it exists, install the sharing names and/or directory binding support to the install image
    HandleNetBootClientHelper()
    local tempDir="${1}"
    local targetVol="${2}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    if [ -e  "${tempDir}/bindingNames.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Directory Service binding information"
    fi
    /usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${targetVol}/etc/bindingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
    /bin/chmod 644 "${targetVol}/etc/bindingNames.plist"
    fi
    if [ -e  "${tempDir}/sharingNames.plist" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Sharing Names support"
    fi
    /usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${targetVol}/etc/sharingNames.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
    /bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
    fi
    if [ -e  "${tempDir}/NetBootClientHelper" ]; then
    /usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
    /bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
    /usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
    /usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    /bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
    # finally, make sure it isn't disabled...
    /usr/libexec/PlistBuddy -c "Delete :com.apple.NetBootClientHelper" "${targetVol}/var/db/launchd.db/com.apple.launchd/overrides.plist" > /dev/null 2>&1
    fi
    return 0
    # If any exist, install configuration profiles to the install image
    InstallConfigurationProfiles()
    local tempDir="${1}"
    local targetVol="${2}"
    local profilesDir="${targetVol}/var/db/ConfigurationProfiles"
    if [ -e  "${tempDir}/configProfiles.txt" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing Configuration Profiles"
    fi
    /bin/mkdir -p "${profilesDir}/Setup" || return 1
    # Make sure the perms are correct
    /usr/sbin/chown root:wheel "${profilesDir}"
    /bin/chmod 755 "${profilesDir}"
    /usr/sbin/chown root:wheel "${profilesDir}/Setup"
    /bin/chmod 755 "${profilesDir}/Setup"
    /usr/bin/touch "${profilesDir}/.profilesAreInstalled"
    CopyEntriesFromFileToPath "${tempDir}/configProfiles.txt" "${profilesDir}/Setup" || return 1
    # Enable MCX debugging
    if [ 1 == 1 ]; then
    if [ -e  "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" ]; then
    /usr/libexec/PlistBuddy -c "Delete :debugOutput" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Delete :collateLogs" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    /usr/libexec/PlistBuddy -c "Add :debugOutput string -2" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    /usr/libexec/PlistBuddy -c "Add :collateLogs string 1" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
    fi
    fi
    # Converts a list of scripts (full paths contained in the file at $1) into packages in $3
    InstallScriptsFromFile()
    local tempDir="${1}"
    local theFile="${2}"
    local targetDir="${3}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Converting scripts into install packages"
    opt="-v"
    fi
    while read FILE
    do
    if [ -e "${FILE}" ]; then
    # make an installer package out of the script
    CreateInstallPackageForScript "$tempDir" "${FILE}" || return 1
    # copy the resulting package to the Packages directory
    local leafName=`basename "${FILE}"`
    /usr/bin/ditto $opt "${tempDir}/${leafName}.pkg" "${targetDir}/${leafName}.pkg" || return 1
    # clean up
    /bin/rm -r "${tempDir}/${leafName}.pkg"
    fi
    done < "${theFile}"
    return 0
    # Prepare the source by deleting stuff we don't want to copy if sourcing a volume
    PostFlightDestination()
    local tempDir="${1}"
    local destDir="${2}"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Performing post install cleanup"
    opt="-v"
    fi
    # delete the DS indices to force reindexing...
    if [ -e "${mountPoint}/var/db/dslocal/indices/Default/index" ]; then
    /bin/rm $opt "${mountPoint}/var/db/dslocal/indices/Default/index"
    fi
    # detach the disk and remove the mount folder
    DetachAndRemoveMount "${mountPoint}"
    if [ $? != 0 ]; then
    echo "Failed to detach and clean up the mount at '${mountPoint}'."
    return 1
    fi
    echo "Correcting permissions. ${ownershipInfoKey} $destDir"
    /usr/sbin/chown -R "${ownershipInfoKey}" "$destDir"
    # Prepare the source by deleting stuff we don't want to copy if sourcing a volume
    PreCleanSource()
    local srcVol="$1"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    opt="-v"
    fi
    if [ -e "$srcVol/private/var/vm/swapfile*" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Removing swapfiles on $1"
    fi
    /bin/rm $opt "$srcVol/private/var/vm/swapfile*"
    fi
    if [ -e "$srcVol/private/var/vm/sleepimage" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Removing sleepimage on $1"
    fi
    /bin/rm $opt "$srcVol/private/var/vm/sleepimage"
    fi
    if [ -d "$srcVol/private/tmp" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Cleaning out /private/tmp on $1"
    fi
    /bin/rm -r $opt "$srcVol/private/tmp/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/private/var/tmp" ]; then
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Cleaning out /private/var/tmp on $1"
    fi
    /bin/rm -r $opt "$srcVol/private/var/tmp/*" > /dev/null 2>&1
    fi
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Cleaning out devices and volumes on $1"
    fi
    if [ -d "$srcVol/Volumes" ]; then
    /bin/rm -r $opt "$srcVol/Volumes/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/dev" ]; then
    /bin/rm $opt "$srcVol/dev/*" > /dev/null 2>&1
    fi
    if [ -d "$srcVol/private/var/run" ]; then
    /bin/rm -r $opt "$srcVol/private/var/run/*" > /dev/null 2>&1
    fi
    # Copy kernel and build the kext cache on the boot image
    PrepareKernelAndKextCache()
    local srcDir="$1"
    local destDir="$2"
    local opt=""
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Preparing the kernel and kext cache for the boot image"
    opt="-v"
    fi
    # Insure the kext cache on our source volume (the boot shell) is up to date
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Updating kext cache on source volume"
    fi
    /usr/sbin/kextcache -update-volume "${srcDir}" || return 1
    # Copy the i386 and, if it exists, the x86_64 architecture
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
    echo "Installing the kext cache to the boot image"
    fi
    # make sure this doesn't exist
    if [ -e "${destDir}/i386" ]; then
    /bin/rm -rf "${destDir}/i386"
    fi
    # Install kextcaches to the nbi folder

    After running your command, and using the mounted image as my source for creating the NetRestore image, SIU was able to complete the first two steps, but failed on the rest.  It was able to complete "Creating Image From Source", and "Preparing Image For Restore", but it fails on "Creating Bootable System".
    I've copied and pasted the end of the error log.  Any idea what caused the Bootable System from successfully being created?
    PERCENT:-1.000000
    Finalizing disk image.
    created: /Users/morgan/Desktop/30sept.nbi/System.dmg
    # Set aside the needed BaseSystem.dmg
    retrieveBaseSystemDMG "${1}" || mnrfiErrExit
    + retrieveBaseSystemDMG /tmp/niutemp.3PZq4yzF
    + local tempDir=/tmp/niutemp.3PZq4yzF
    + local opt=
    + '[' disk2s3 '!=' '' ']'
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + opt=-v
    + echo 'Retrieving BaseSystem bits from Recovery HD'
    Retrieving BaseSystem bits from Recovery HD
    mktemp -d "/tmp/mnt_rp.XXXXXXXX"
    ++ mktemp -d /tmp/mnt_rp.XXXXXXXX
    + recoveryMount=/tmp/mnt_rp.75pVTRHs
    + /usr/sbin/diskutil mount readOnly -mountPoint /tmp/mnt_rp.75pVTRHs disk2s3
    Volume Recovery HD on disk2s3 mounted
    + '[' -e /tmp/mnt_rp.75pVTRHs/com.apple.recovery.boot/BaseSystem.dmg ']'
    + /usr/sbin/diskutil unmount disk2s3
    Volume Recovery HD on disk2s3 unmounted
    + /bin/rmdir /tmp/mnt_rp.75pVTRHs
    + return 0
    # update progress information
    echo "${progressPrefix}_preparingASR_"
    + echo _progress_preparingASR_
    # "Scan the image for restore"
    asr_opt=""
    + asr_opt=
    if [ "${skipReorderingKey}" == 1 ] ; then
    asr_opt="--nostream"
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Preparing image for restore without multicast reordering"
    fi
    else
    if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
    echo "Preparing image for restore"
    fi
    fi
    + '[' 0 == 1 ']'
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + echo 'Preparing image for restore'
    Preparing image for restore
    /usr/sbin/asr imagescan --source "${destPath}/${dmgContainer}.dmg" $asr_opt || mnrfiErrExit
    + /usr/sbin/asr imagescan --source /Users/morgan/Desktop/30sept.nbi/System.dmg
    Checksumming partition of size 63 blocks...done
    Block checksum: ....10....20....30....40....50....60....70....80....90....100
    Reordering:     ....10....20....30....40....50....60....70....80....90....100asr: successfully scanned image "/Users/morgan/Desktop/30sept.nbi/System.dmg"
    # update progress information
    echo "${progressPrefix}_creatingInstallSystem_"
    + echo _progress_creatingInstallSystem_
    restoreSource="${sourceVol}"
    + restoreSource='/Volumes/Macintosh HD'
    # If this is a restore from install media, mount that as our source
    if [ "${restoreSource}" == "(installMedia)" ] ; then
    sourceMount=`mktemp -d "/tmp/mnt_src.XXXXXXXX"`
    /usr/bin/hdiutil attach "${destPath}/System.dmg" -noverify -owners on -nobrowse -noautoopen -mountpoint "${sourceMount}" -quiet || crfsErrExit
    restoreSource="${sourceMount}"
    fi
    + '[' '/Volumes/Macintosh HD' == '(installMedia)' ']'
    # If we don't have a BaseSystem.dmg available to us fail now.
    if [ ! -e "${1}/BaseSystem.dmg" ]; then
    echo "There is no BaseSystem.dmg (Recovery HD) associated with the source ${restoreSource}."
    crfsErrExit
    fi
    + '[' '!' -e /tmp/niutemp.3PZq4yzF/BaseSystem.dmg ']'
    + echo 'There is no BaseSystem.dmg (Recovery HD) associated with the source /Volumes/Macintosh HD.'
    There is no BaseSystem.dmg (Recovery HD) associated with the source /Volumes/Macintosh HD.
    + crfsErrExit
    basename "${0}"
    ++ basename '/System/Library/CoreServices/System Image Utility.app/Contents/Library/Automator/Create Image.action/Contents/Resources/createRestoreFromSources.sh'
    + echo 'Execution of '\''createRestoreFromSources.sh'\'' failed. Cleaning up.'
    Execution of 'createRestoreFromSources.sh' failed. Cleaning up.
    + DetachAndRemoveMount /tmp/mnt.nfN5nVgM
    + local theMount=/tmp/mnt.nfN5nVgM
    mount | grep "${theMount}"
    ++ mount
    ++ grep /tmp/mnt.nfN5nVgM
    + local mountLoc=
    + '[' DEBUG == VERBOSE -o DEBUG == DEBUG ']'
    + echo 'Detaching disk image'
    Detaching disk image
    + '[' DEBUG == DEBUG ']'
    + /usr/sbin/lsof +fg /tmp/mnt.nfN5nVgM
    + '[' '' '!=' '' ']'
    + /bin/rmdir /tmp/mnt.nfN5nVgM
    + return 0
    + '[' '' '!=' '' ']'
    + /bin/rm -r /Users/morgan/Desktop/30sept.nbi/i386
    + /bin/rm /Users/morgan/Desktop/30sept.nbi/NetInstall.dmg
    + /bin/rm /Users/morgan/Desktop/30sept.nbi/System.dmg
    + /bin/rmdir /Users/morgan/Desktop/30sept.nbi
    + exit 1
    Script is done.
    Bridge exited with status 256
    Failed to create image from restore source.
    An unknown error has occurred.
    An unknown error has occurred.
    Image creation process finished...
    Stopping image creation.
    Image creation failed.
    Thanks.

  • I have my iPhone 4s plugged into a dock and the dock connected to an amplifier, the problem is that the amplifier doesn't have a volume changer and when i plug in the iPhone into the dock the iPhones volume bar disappears. how can i change the volume?app?

    Hi
    I have my iPhone 4s plugged into a dock and the dock connected to an amplifier with 2 speakers and a bass, the problem is that the amplifier doesn't have a volume changer and when i plug in the iPhone into the dock the iPhone´s volume bar disappears and im not allowed to change the volume and its very loud. how can i change the volume? is there an app? any ideas??(my dock doesnt have infrared remote controller )
    TY!!!!

    Kline25 wrote:
    So even if I just ask to pay them to replace the lock button they won't because my screens are third-party?
    Apple does not repair devices beyond replacing the screen on some models or a battery replacement.  They replace the ENTIRE device.
    For the Out of Warranty replacement cost, you could have gotten a fully functional replacement device.  Instead you chose to spend less to get only the screen replaced and continue to live with additional issues.
    Apple will not touch the device now.  They will know that it was opened elsewhere and that the replacement screen is not original.

  • IPod Touch 3.1.3 1G no volume bar.

    does anyone has this problem? i plugged in earpiece, reset everything,restore to factory setting,tried everything but still there is no volume bar appearing! There is a very very soft volume but its really depressing you can't adjust the volume!

    Try the standard fixes to rule out a software problem:
    - Reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod
    if still problem that indicates a hardware problem and an appointment at the genius Bar of an Apple store is in order.

  • Ipod Touch Version 3.1.3 volume bar disappeared and will not return

    The volume bar on my 1st generation iOS 3.1.3 ipod touch started disappearing then would return with tweeking of the headphones and sometimes when resetting all settings. Now it is gone completely and won't come back.
    I have tried resetting to factory settings.
    Cleaning the jack with a clean dry toothbrush.
    Any ideas???
    I thought I would try getting help here before going to the apple store.

    From your description it appears that the headphone jack is bad. You can make an appointment at the Genius Bar of an Apple store to hear what they have to say.
    If Apple can't clean out the jack, they will exchange it for this price.
    Apple - Support - iPod - Repair pricing
    Likely not worth it for a 1G iPod. Thee a thrid-party place that is less expensive.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • My iPhone 4s no longer has sound for any of the applications but it does have sound for phone functions.  Where is the setting for app sound?  I have gone to the multitask screen and the volume bar is empty.

    I recently found my phone outside in light rain (it had been there about 20 minutes).  It had some glitches at first, however after letting it rest overnight it seemed to mostly recover.  The one problem I am having is that I no longer have sound for any of my applications.  I do have sound for phone fuctions, and I am able to use the speaker for phone functions. 
    When I am in my applications, including music/videos, the only way I can hear is if I use my earbuds.  I am able to make a video and it will record sound just fine.
    When I go to the multitask screen, the volume bar is empty and I cannot adjust it using the side buttons (even though in settings I have that feature activated). I completely reset all of my settings tonight and that did not make a difference. 
    Is there a setting I am missing, or am I just SOL?  I am trying to avoid having to get a whole new phone but it is very frustrating to not have sound with my applications.

    Hi Baileyfour,
    Welcome to the Support Communities!
    The articles below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/TS1630
    There are two places where vibrations can be set.
    One is the Settings > Sounds
    The other area is Settings > Notifications
    If you have an app set to Alert, it may have a vibration set for it.
    iOS: Understanding Notifications
    http://support.apple.com/kb/ht3576
    Information about Notifications settings can also be found in the iPhone User Guide (pages 131, 132)
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    I hope this information helps ....
    Have a great day!
    - Judy

  • Ipod 4th gen volume buttons not working. Volume bar not showing in music or video apps, not a speaker problem as this works fine when testing built in alarm tones???

    Ipod 4th gen volume buttons not working. Volume bar not showing in music or video apps, not a speaker problem as this works fine when testing built in alarm tones???

    Have you tried the standard fixes:
    - Reset:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Restore the iPod from backup via iTunes
    - Restore the iPod to factory defaults/new iPod.
    If still problem you likely have a hardware problem and an appointment at the Genus Bar of an Apple store is in order.

  • Windows 7 and HP Image Zone software

    I have a new Pavilion s5212y w/Windows 7 and an HP Photosmart 8450 printer that comes with HP Image Zone software for editing pictures.  The software isn't supported by Win 7, won't install (tells me to upgrade op-sys).  Is there a work around for this or will the software be made compatible with the new system?  Don't misunderstand, the printer works fine, it's just that I can't use the software to edit pictures before printing.  Thanks.

    I just bought a used HP Officejet 5610   The situation was that I had a new Windows 7 machine that no longer worked with my old nice Canon scanner and my HP 5550 printer had broken cradles so I bought a used HP Officejet 5610 and was able to save/refill the color cartridge from that and I had a working black cartridge from my 5550 that worked with the 5610.  On the whole, I am stoked-- it works well.  The new old machine has a much better cradle design than the old old machine, but I still miss my OmniPage OCR software that came with my old Canon Scanner and will not work with Win 7 and Ominipage costs more new than I paid for my scanner in the first place, like 150 bucks.  I too have been looking for cheap OCR ware again.  I am told there is a small OCR applet that comes with Microsoft office that works well with tiff files only.  So if you already have Microsoft Office you already own it.  I'll try the Picaso software from google I guess.  The fax and scan software that comes with Win 7 works with my scanner, but only produces low res jpg files.  I understand that my 5610 likes working with Adobe Photoshop. I have copy of Photoshop Elements that hopefully will work with Win 7.  I will also try that. thanks folks.

  • How do I get my volume bar back on iPhone 4?

    My volume bar is missing from my iPhone 4 and this seems to be the reason the audio won't work when I try to play music. However, when I play a ringtone the audio is fine. I put my iPhone in the Bose speaker dock and the volume bar comes back, but only temporarily. I've already tried restoring it and it didn't fix the problem. Help?

    Just came home to find I have the same problem!! iPhone 4S, never jail broken,dropped or spilled anything on it! I have been using my original iPhone charger (when they came out with the new iPhone I just shaved my charging/docking station to fit) so it is a little on the dirty side!
    This is the first post I read so I did the headphone thing, the docking undocking thing, restarted it and messed with all the volume setting and neither of them worked.
    So finally taking "mike iPhone guys" post, I looked @ the 32 pin port at the bottem of the iPhone and I reminded me of a old Nintendo cartridge do untreated it as so.
    *** THIS IS HOW I FIXED THIS ISSUE, I DO NOT RECOMMEND IT BEFORE CONSULTING APPLE, YOU MIGHT DAMAGE YOUR DEVICE*********
    These are the exact steps I took ....
    1. I blew into the port and it did absolutely nothing!
    2. I took a vacuum ($200 Hoover windtunnel t series P.A.W.S pet approved vacuum, so it has some power behind it, not the most expensive but not the cheapest either) and used the smallest accessory, the long connection hose/tube with the smaller rectangle attachment and sucked the air out of the port.
    This worked for 5 secs my volume bar appeard and then disappeared again.
    3. I took a very thin butter knife, wrapped it with a paper towel that I sprayed windex with and stuck it in gently one both sides, tested and still didn't work.
    4. Repeated the previous step but added a little pressure and shoved the blade in the upper part only closest to the screen, not the bottem side the knife didn't want to go in as easy so I didn't try, alot of dirt was on the rag, then I used a dry part of the towel and did the same again until there was no dirt on it!
    Tested and still didn't work!
    5. Blow in it once more, and vacuumed it once more but this time putting my finger in the area that the vacuum didn't reach on both ends an lightly tapping it, WORKS FINE NOW! Just needed some
    Cleaning. I can only assume the dirt does make it
    Think that it's still docked.

  • My volume bar isn't working,how do I fix it ?

    How do I get a volume bar to work again?

    Thanks for following up
    Actually, I think my back up/sync is working.  However I still see the sync/back up icon on some of my online albums in the right side of the organizer screen.
    I can't figure out why some online albums have the icon and some don't.  I've right clicked on each and choose "share" yet the albums situation stays the same with the same albums as before displaying the sync/back up icon.
    I purchased an additional online storage, but after adding more photos and video, the amount of storage used hasn't increased.
    Am I going crazy???
    Thanks
    Dave

  • After updating my iPhone 4S to iOS 7.0.6 my iPhone won't play sound. When I pull up on the screen where it shows volume bar, brightness bar, etc. The volume bar does not show up. Even muting and unmuting it didn't work. I reset my settings and nothing

    No sound plays. Muting and unmuting doesn't work. Volume bar doesn't show up. Tried resetting my settings but nothin happened. Please help

    Hello, lrc2. 
    Thank you for visiting Apple Support Communities.
    Here is an article I would recommend taking a look at.  Try all of the steps in this article and if you are still experiencing the issue, see step 9.
    iPhone: No sound or distorted sound from speaker
    http://support.apple.com/kb/ts5180
    Cheers,
    Jason H.

  • Can't open HP Image Zone (HP Scanjet 4070) since I updated to Lion due to incompatibility. Is there a solution for this?

    Can't open image zone for HP Scanjet 4070 Photosmart since I updated to Lion because "PowerPC apps are not compatible". Is there a solution to this?

    I hear ya. My son and his young growing familiy live in Torrey Heights near SD and I have a daughter in FL. They are smart kids.
    Thanks again

Maybe you are looking for