Posted on 07-03-2013 12:51 PM
Weird one here.
I'm trying to make a deployable Bootcamp image through Self Service. I have properly made Winclone image which has been successfully tested through the command line. I have a script that "appears" to work that is loosely based on another script that appeared on here a while back.
So i've created a non-flat package in Composer that places all the relevant files into /private/tmp/BootCampDeploy and then runs a postflight script to do the actual work. The package and script actually work but I find this in the policy log:
/usr/sbin/jamf is version 8.71 Executing Policy Bootcamp Deployment... [STEP 1 of 3] Mounting afp://server/CasperShare to /Volumes/CasperShare... [STEP 2 of 3] Copying Win7BootCampV4.pkg... Installing Win7BootCampV4.pkg... Installation failed. The installer reported: dyld: DYLD_ environment variables being ignored because main executable (/System/Library/PrivateFrameworks/Install.framework/Resources/runner) is setuid or setgid installer: Package name is Win7BootCampV4 installer: Installing at base path / installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.) Unmounting file server... [STEP 3 of 3] Running Recon... Locating mobile device records... Displaying message to end user...
So uh huh I think. I'll not use Composer, and instead use Packages (and Iceberg for that matter too). I test again and get an installer failed message. The console log on the computer then reports the following:
Jul 3 20:36:27 macbook-pro.home installd[2255]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.Z5uy96/Scripts/org.ual.pkg.BootCampDeploy.FY6tNJ Jul 3 20:36:29 macbook-pro.home installd[2255]: ./postinstall: Started verify/repair permissions on disk1 Macintosh HD Jul 3 20:36:58 macbook-pro.home installd[2255]: ./postinstall: Permissions differ on "Library/Internet Plug-Ins/JavaAppletPlugin.plugin"; should be lrwxr-xr-x ; they are drwxr-xr-x Jul 3 20:36:58 macbook-pro.home installd[2255]: ./postinstall: Repaired "Library/Internet Plug-Ins/JavaAppletPlugin.plugin" Jul 3 20:37:34 macbook-pro.home installd[2255]: ./postinstall: Finished verify/repair permissions on disk1 Macintosh HD Jul 3 20:37:34 macbook-pro.home installd[2255]: ./postinstall: Wed 3 Jul 2013 20:37:34 BST- : Checking to see if HDD has any CoreStorage volumes... Jul 3 20:39:16 macbook-pro.home installd[2255]: ./postinstall: 1 Jul 3 20:39:16 macbook-pro.home install_monitor[2260]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr Jul 3 20:39:16 macbook-pro.home installd[2255]: PackageKit: releasing backupd Jul 3 20:39:16 macbook-pro.home installd[2255]: PackageKit: allow user idle system sleep Jul 3 20:39:16 macbook-pro.home installd[2255]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “BootCampDeploy.pkg”." UserInfo=0x7fa7ac8124e0 {NSFilePath=./postinstall, NSURL=file://localhost/Users/rjpurves/BootCampDeploy/build/BootCampDeploy.pkg, PKInstallPackageIdentifier=org.ual.pkg.BootCampDeploy, NSLocalizedDescription=An error occurred while running scripts from the package “BootCampDeploy.pkg”.} { NSFilePath = "./postinstall"; NSLocalizedDescription = "An error occurred while running scripts from the package U201cBootCampDeploy.pkgU201d."; NSURL = "file://localhost/Users/rjpurves/BootCampDeploy/build/BootCampDeploy.pkg"; PKInstallPackageIdentifier = "org.ual.pkg.BootCampDeploy"; } Jul 3 20:39:16 macbook-pro.home installer[2253]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “BootCampDeploy.pkg”." UserInfo=0x7f89e2b2dba0 {NSFilePath=./postinstall, NSURL=file://localhost/Users/rjpurves/BootCampDeploy/build/BootCampDeploy.pkg, PKInstallPackageIdentifier=org.ual.pkg.BootCampDeploy, NSLocalizedDescription=An error occurred while running scripts from the package “BootCampDeploy.pkg”.} Jul 3 20:39:17 macbook-pro.home installer[2253]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. Jul 3 20:39:31 macbook-pro.home installd[2255]: installd: Exiting.
The only other info I have is the script i'm running to do the work. If it's not the package, it must be something in here right?
#!/bin/bash
# Bootcamp deployment via Self Service
# Lovingly stolen and massively modified from https://github.com/sonic84/Deploy-Boot-Camp-From-Casper-Self-Service/blob/master/BootCampDeploy.sh
# Implemented : r.purves@arts.ac.uk
# Version 1.0 : 02-07-2013 - Initial Version
# This script is meant to be run as a post-flight package script.
WincloneName="Win7BootCampV4.winclone"
CD="/private/tmp/BootCampDeploy/CocoaDialog.app/Contents/MacOS/CocoaDialog"
##### Hard drive checks #####
$CD progressbar --indeterminate --title "Windows 7 Deployment" --text "Repairing Disk Permissions..."
diskutil repairPermissions /
echo "`date`- $appName: Checking to see if HDD has any CoreStorage volumes..."
coreStorage="`diskutil cs list`"
if [ "$coreStorage" != "No CoreStorage logical volume groups found" ]; then
$CD ok-msgbox --title "Windows 7 Deployment" --text "Volume Error" --icon hazard --informative-text "CoreStorage Volume Detected." --no-cancel --float
exit 1
fi
##### File Checks #####
counter="0"
if ! ( test -e /private/tmp/BootCampDeploy/"$WincloneName" ); then
$CD ok-msgbox --title "Windows 7 Deployment" --text "Volume Error" --icon hazard --informative-text "The package did not deploy correctly" --no-cancel --float
exit 1
fi
##### AC Power check #####
while [ $ACCheck -ne 0 ]
do
ACCheck=`pmset -g live | grep "AC Power" | grep * | wc -l | awk '{print $1}'`
if [ "$ACCheck" != "1" ]; then
$CD ok-msgbox --title "Windows 7 Deployment" --text "Battery Power Detected" --icon atom --informative-text "Please plug your system into AC power and try again." --no-cancel --float
exit 1
fi
done
##### Disable McAfee Antivirus #####
SystemStarter stop cma
/usr/local/McAfee/AntiMalware/VSControl stopoas
##### Disable Computer Sleep #####
sleepvalue="`pmset -g | grep " sleep" | awk '{print $2}'`"
if [[ "$sleepvalue" =~ ^[0-9]+$ ]] ; then
pmset sleep 0
else
noSetSleep=1
fi
##### Deploy the Winclone Image #####
bootcampHostID="`diskutil info BOOTCAMP | grep "Part of Whole:" | awk '{print $4}'`"
bootcampDiskID="`diskutil info BOOTCAMP | grep "Device Identifier:" | awk '{print $3}'`"
if [ "$bootcampDiskID" = "" ] && [ "$bootcampHostID" = "" ]; then
$CD ok-msgbox --title "Warning" --text "Volume Error" --icon hazard --informative-text "Bootcamp volume not present" --no-cancel --float
exit 1
fi
diskutil unmount /Volumes/BOOTCAMP
if [ $? != 0 ]; then
diskutil list
diskutil unmount -f /Volumes/BOOTCAMP
if [ $? != 0 ]; then
$CD ok-msgbox --title "Fatal Error" --text "Disk Error" --icon hazard --informative-text "Bootcamp volume could not be unmounted." --no-cancel --float
exit 1
fi
fi
# WincloneName is declared at the top of this script
# Call winclone.perl that resides in every winclone image to do a GUIless restore
# /private/tmp/BootCampDeploy/$WincloneName/winclone.perl -restore -copy_bcd="/private/tmp/BootCampDeploy/$WincloneName/BCD" -disk_device /dev/$bootcampHostID -ntfs_partition /dev/$bootcampDiskID -v -update_bootini -q -image_dir="/private/tmp/BootCampDeploy/$WincloneName" -gptrefresh_path="/private/tmp/BootCampDeploy/$WincloneName" -ntfstools_dir=/private/tmp/BootCampDeploy/$WincloneName -self-extract
/private/tmp/BootCampDeploy/$WincloneName/winclone.perl -restore -copy_bcd="/private/tmp/BootCampDeploy/$WincloneName/BCD" -disk_device /dev/$bootcampHostID -ntfs_partition /dev/$bootcampDiskID -v -update_bootini -q -image_dir="/private/tmp/BootCampDeploy/$WincloneName" -gptrefresh_path="/private/tmp/BootCampDeploy/$WincloneName" -ntfstools_dir=/private/tmp/BootCampDeploy/$WincloneName
if [ $? != 0 ]; then
$CD ok-msgbox --title "Windows 7 Deployment" --text "Deployment Failure" --icon hazard --informative-text "Bootcamp volume restoration failed" --no-cancel --float
exit 1
fi
##### Re-enable Sleep #####
if [ "$noSetSleep" = 1 ]; then
else
pmset sleep $sleepvalue
fi
##### Re-enable McAfee #####
SystemStarter start cma
/usr/local/McAfee/AntiMalware/VSControl startoas
exit 0
Any thoughts on what i've missed?
Solved! Go to Solution.
Posted on 07-03-2013 02:38 PM
We just released Winclone Pro 4.1. It has a new feature that allows you to create a package and installs via a post install script similar to this one. You can see how it work here:
http://twocanoes.com/winclone/support/create-a-boot-camp-installer-with-winclone-pro
Doc is here:
http://twocanoes.com/winclone/support/deploy-boot-camp-as-a-package-using-winclone-pro-4
If you already have Winclone Pro 4, you update your version by selecting Check for Updates... in the application menu.
Posted on 07-03-2013 02:38 PM
We just released Winclone Pro 4.1. It has a new feature that allows you to create a package and installs via a post install script similar to this one. You can see how it work here:
http://twocanoes.com/winclone/support/create-a-boot-camp-installer-with-winclone-pro
Doc is here:
http://twocanoes.com/winclone/support/deploy-boot-camp-as-a-package-using-winclone-pro-4
If you already have Winclone Pro 4, you update your version by selecting Check for Updates... in the application menu.
Posted on 07-04-2013 12:30 AM
Hrm. I might have to pay for Winclone Pro out of my own pocket.
Posted on 07-08-2013 04:28 PM
Let me know how it goes. Since we just released it, I am interested in feedback when you start using it.
tim