Deploy Mac OSX with recovery partition k2000
I am currently stumped on deploying a mac image that includes the recovery partition. We need this to support device encryption. I referenced the below document and have not been able to make any progress as this seem to be referencing an older OSX version. I tried to update the scripts to my current version but the deployment now stops with "remaining partition space is too low."
https://support.quest.com/kace-systems-deployment-appliance/kb/131931
I contacted support and the informed me that they dont support this and that I should ask my question on ITNinja. Any help you can provide will be much appreciated.
Thanks!
3 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
jnchaney
6 years ago
The following two articles helped me out a lot. Had to update the Create Partition and the Recovery Partition tasks and was able to successfully deploy the recovery partition.
The articles explain why the changes are necessary.
http://rishidhar1.blogspot.com/2017/05/re-creating-recovery-partition-for.html
http://www.itninja.com/question/error-creating-osx-sierra-recovery-partition
http://www.itninja.com/question/error-creating-osx-sierra-recovery-partition
Comments:
-
What changes did you make to the "Create Partition" task? - esylvest 6 years ago
-
I think they may have fixed the Create Partition task in the latest K2000 update.
The one I use is :
Create Single HFS+ Partition
#!/bin/bash
if [ `arch` = 'ppc' -o `arch` = 'ppc64' ]; then
PartitionType=APMFormat
else
PartitionType=GPTFormat
fi
/usr/sbin/diskutil partitionDisk disk0 $PartitionType "Journaled HFS+" "$KACE_SYSTEM_DRIVE_NAME" "100%" - jnchaney 6 years ago-
Thanks, I'll give that a shot. - esylvest 6 years ago
-
Also had to use two different tasks for deploying the recovery environment. This one is for devices without the touchbar :
Build OSX Recovery Partition (HighSierra)-Legacy No Touchbar
#!/bin/bash
#
# note the NAME of the partition image file
# must match the imagename below
# example imagename="nameorpartitionimage"
#
imagename="highsierra.rhd"
partloc="/opt/kace/petemp/ImageStore/$imagename"
if [[ ! -a $partloc ]]
then
echo "could not find recovery partition image "
echo "should be $partloc"
exit 1
fi
dcheck=`diskutil list | grep disk0s | wc -l | awk '{print $1}'`
if [[ $dcheck != "2" ]]
then
echo "can not be run on disk0 without and existing HFS partition"
echo "or with more than one. there are $dcheck on disk0"
exit 1
fi
let rpartsizeb=`ls -l $partloc | awk '{print $5}'`
let rpartsizes=$rpartsizeb/512
let tds=`diskutil info disk0 | grep "Disk Size" | awk '{print $5}' | sed 's/(//g'`
let efisize=220200960
let partsize=$tds-$rpartsizeb-$efisize
if (($partsize<$efisize))
then
echo "remaining partition space is too low ($partsize)"
echo "no room for OS"
exit 1
fi
res="$partsize""B"
/usr/sbin/diskutil resizeVolume "$KACE_SYSTEM_DRIVE_NAME" "$res"
slice=`df | grep disk0 | awk '{print $1}' `
sleep 5
/usr/bin/hdiutil detach $slice
let parts=`gpt show disk0 | grep 48465300 | awk '{print $1 }'`
let partl=`gpt show disk0 | grep 48465300 | awk '{print $2 }'`
let partbase=$parts+$partl
gpt add -b $partbase -s $rpartsizes -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0
pname="Recovery HD"
dd if=$partloc of=/dev/disk0s3
sleep 2
/usr/bin/hdiutil detach $slice
gpt label -i 3 -l "$pname" disk0
exit 0 - jnchaney 6 years ago
http://rishidhar1.blogspot.com/2017/05/re-creating-recovery-partition-for.html
http://www.itninja.com/question/error-creating-osx-sierra-recovery-partition - jnchaney 6 years ago