/build/static/layout/Breadcrumb_cap_w.png

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
  • hi, did you get this sorted as i want to add recovery pations to my mac images thanks - markc0 7 years ago
  • if its any help, i extracted the .sh file from the installer and edit line 30 to inc Disk Size instead of Total size. then i added this script as a pre install task, i selected the System Image Detail to force continue on errors and so far so good. - markc0 7 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 - jnchaney 6 years ago

Answers (1)

Posted by: jnchaney 6 years ago
Senior White Belt
1
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

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ