Skip to main content
Question

InstaDMG nice find!

  • September 26, 2012
  • 37 replies
  • 71 views

Forum|alt.badge.img+21

Pleasantly surprised to find the latest version of InstaDMG creating a 10.8.2 build includes the restore partition!

Tried it 3 more time with zero'd out new disk and restore partition is there.

This is great! No more messing with complicated imaging partitions and configs :)

37 replies

bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 26, 2012

why not just compile in Casper Admin? you get the recovery then too.. worked 10.7+ for me :)


Forum|alt.badge.img+20
  • Valued Contributor
  • September 26, 2012

I could never get the recovery partition to lay down with casper so I package the bits and have a script install it "at reboot".


Forum|alt.badge.img+19
  • Contributor
  • September 26, 2012

@bentoms if you compile, then you're getting the recovery partition from the machine you compiled on. So, hardware compatibility issues will result- for instance, I compiled a 10.7.5 image on a non-retina MBP, and the resulting recovery HD could not boot retina MBP's.
The best way is to just import the installESD.dmg file into casper admin, have casper admin identify it as an OS install, and then create a configuration with that installESD as the base image. That way the OS installation process occurs each time a machine is imaged, and you'll always have the appropriate drivers present on the recovery HD for whatever hardware you're imaging.
Since it actually runs the OS install each time instead of doing a block copy there is a small speed penalty, but I'd rather know that the install process was correct for the hardware each time it runs. Even with installing about 8 GB of other software, I can still image machines in about 30 minutes from start to finish with this method.


Forum|alt.badge.img+13
  • Contributor
  • September 27, 2012

Please vote here to get official support form JAMF for InstallESD method.
https://jamfnation.jamfsoftware.com/featureRequest.html?id=606

I find it is very easy when it comes to create a new image. Just drop the InstallESD.dmg and ready to go.


Forum|alt.badge.img+21
  • Author
  • Honored Contributor
  • September 27, 2012

There are lots of ways to make a build work. For me InstaDMG is the quickest, cleanest and covers compatibility. Just thought I would share this find.


Forum|alt.badge.img+21
  • Author
  • Honored Contributor
  • September 27, 2012

just found a gottch causing confilcts with Sophos SafeGuard for Mac.

Sophos SafeGaurd looks for and relies on the Recovery Volume called "Recovery HD"

Unfortunately InstaDMG creates the recovery partition called "Macintosh HD"

What Sophos need to do is build their installer to look for the partition scheme of Apple_Boot and not the volume name when it tries to mount its kernel.

A work around it create a launch daemon and script

/bin/sh

InstaDMGRecovery="Macintosh HD"
RecoveryHDID=`/usr/sbin/diskutil list | grep "$InstaDMGRecovery" | awk 'END { print $NF }'`
AppleRecovery="Recovery HD"
UnMount=`/usr/sbin/diskutil list | grep "$AppleRecovery" | awk 'END { print $NF }'`

# Mount the volume
/usr/sbin/diskutil mount /dev/"$RecoveryHDID"

# Rename the volume
diskutil rename /Volumes/"$InstaDMGRecovery" "$AppleRecovery"

# Pause 5 Seconds
sleep 5

# Unmount the volume
/usr/sbin/diskutil unmount /dev/"$UnMount"

# Delete the LaunchDaemon so that it will not run again!
rm -rf /Library/LaunchDaemons/com.recovery.hd.Launchd.plist

bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@nick.. wouldn't the InstaDMG way have the same issue with the recovery partition?

Also, wouldn't the OS install process then require internet connectivity? (we're behind an authenticated proxy).

AFAIK, if the OS boots the mac.. then the recovery will work.. i've not seen otherwise..

So say for example we deploy 10.8.2 to compatible Hardware using an OS DMG complied in Casper Admin.. will some Macs then fail to boot to the recovery partition?


  • September 27, 2012

This article does a good job of using instadmg and creating a proper recovery partition: http://derflounder.wordpress.com/2011/08/04/creating-a-never-booted-10-7-image-with-included-recovery-hd-partition/


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@Sar, yep that seems to be the source when compiling.. unless i am missing something?


  • September 27, 2012

If you go through the steps in the article, the recovery partition created is labeled properly (Recovery HD) and not Macintosh HD like @tkimpton was dealing with. It also should be hardware independent since it's being created from the InstallESD.dmg package.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@Sar.. sorry you were replying to Tim & not me... apologies


  • September 27, 2012

@bentoms Not sure what will happen with Casper imaging and different hardware. I don't use it, but i'm suspecting it's 'hardware dependent' in the following sense:
You built your image on a MBP running 10.7.0 and the new MBP's Retina display come out. At this point i don't think your image should work on those machines since it won't have support for the new hardware. Say 10.7.1 comes out which includes new drivers and such. At that point, u can upgrade your old MBP to 10.7.1 and create the image and that should work for the new hardware. That's how i understand it based on having to deal with netboot sets and such.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@Sar.. correct, my question was if you create a recovery partition on say a Mac Pro using 10.8.2 then this should boot any hardware that is 10.8.2 compatible, no?

(retina MBP, mac mini etc..)

Then when the next model of mac comes out, we need to follow the same rules as per the net boot image & this will also create a compatible recovery partition.


  • September 27, 2012

@bentoms Yes, that's how i also understand it.


  • September 27, 2012

@bentoms Actually, there's only one issue with that approach (using an image) as opposed to solutions like instadmg where it's more of an install than an image. If you created your image on a machine that does have an ethernet port and used that image on a MacBook Air or a Retina MBP, the network drivers are gonna be incorrect.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@Sar, compiling an image in Casper Admin creates a never booted DMG like InstaDMG.


  • September 27, 2012

@bentoms Guess I should take a look at Casper Admin then. Thanks for the info.


Forum|alt.badge.img+9
  • Contributor
  • September 27, 2012

@bentoms: Is this what you mean?

  1. Add InstallESD to Casper Admin
  2. Add to a Configuration
  3. Compile the configuration
  4. Use this configuration via Casper Imaging on any hardware that will support that dot release of OS X

bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@jafuller: yep

My configuration only contains the InstallESD, when compiling the InstallESD partitions the DMG that Casper Admin gives it to install into. The end result is that the DMG contains both OS & Recovery partitions.


  • September 27, 2012

@bentoms Can you explain your process in a bit more detail. So you upload the InstallESD to Casper Admin, compile it and use Casper Imaging to image your machines?


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • September 27, 2012

@Sar, correct. i used the complied config as my mac OS base, then add all the apps to it as part of the imaging config.


Forum|alt.badge.img+19
  • Contributor
  • September 27, 2012

@bentoms: with 10.7.5, a compiled image did NOT have a hardware agnostic recovery HD. have you tested your 10.8 recovery functionality on all hardware?

The non-compiled casper imaging method definitely does result in a hardware agnostic recovery HD.


Forum|alt.badge.img+21
  • Author
  • Honored Contributor
  • September 27, 2012

@Sar yep read InstaDMG article but it is COMPLETLY different from what is happening.

I can replicate this every single time I build a new InstaDMG

Restore gets called Macintosh HDM However I haven't tried creting one by changin the 10.8 vailla catlog file to Recovery HD will try that tomorrow!

Oh as for Sophos SafeGuard they have done themselves once again with out of date Read me files with the installer and this hidden article referencing out of date JAMF documentation contridicting Sophos saying after install do NOT use Casper reboot!!! Had enough of Sophos this week premium support means shite

http://www.sophos.com/support/knowledgebase/article/112949.html


Forum|alt.badge.img+20
  • Valued Contributor
  • September 27, 2012

Download this:
http://support.apple.com/kb/DL1464

Follow these instructions to create a recovery Partition:
http://afp548.com/2012/08/15/creating-a-10-8-recovery-hd-package-with-luggage/

Package them to a temp directory during imaging.

Run the following 2 scripts at reboot

#!/bin/bash

# Create Recovery Partition
# author: matt.lee@fox.com

path="/Library/Application Support/JAMF/Post Image/Recovery HD"

sudo "$path"/bin/dmtest ensureRecoveryPartition "/" "$path"/etc/BaseSystem.dmg 0 0 "$path"/etc/BaseSystem.chunklist


rm -R "$path"
#!/bin/sh

# Hide Recovery Partition
# author: matt.lee@fox.com

/usr/sbin/diskutil unmount /dev/disk0s3
/usr/sbin/asr adjust -target /dev/disk0s3 -settype Apple_Boot

Recovery completed!


Forum|alt.badge.img+21
  • Author
  • Honored Contributor
  • September 27, 2012

Thanks Ben , gonna use Casper Admin and compile a config with InstallESD.dmg, Java etc

Spent way too long stressing this!