InstaDMG nice find!

tkimpton
Valued Contributor II

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 37

bentoms
Release Candidate Programs Tester

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

Matt
Valued Contributor

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".

nkalister
Valued Contributor

@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.

Kumarasinghe
Valued Contributor

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.

tkimpton
Valued Contributor II

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.

tkimpton
Valued Contributor II

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
Release Candidate Programs Tester

@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?

Not applicable

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
Release Candidate Programs Tester

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

Not applicable

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
Release Candidate Programs Tester

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

Not applicable

@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
Release Candidate Programs Tester

@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.

Not applicable

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

Not applicable

@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
Release Candidate Programs Tester

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

Not applicable

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

jafuller
Contributor

@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
Release Candidate Programs Tester

@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.

Not applicable

@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
Release Candidate Programs Tester

@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.

nkalister
Valued Contributor

@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.

tkimpton
Valued Contributor II

@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

Matt
Valued Contributor

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!

tkimpton
Valued Contributor II

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

Spent way too long stressing this!

bentoms
Release Candidate Programs Tester

@nick, so presumably the 10.7.5 recovery failed to boot? So far on maybe 4 pieces of hardware 10.8.2 has worked. No retina's yet, but will check asap.

nkalister
Valued Contributor

yep, the retina's failed to boot and had the telltale tiny little apple logo, which means the drivers for the retina display were not present.

bentoms
Release Candidate Programs Tester

@Nick, I'll investigate more closely with my 10.8.2 build.

Was the 10.7.5 you tried a full version from the App Store? Or combo updated 10.7.4 - 10.7.5?

bentoms
Release Candidate Programs Tester

@Nick, I'll investigate more closely with my 10.8.2 build.

Was the 10.7.5 you tried a full version from the App Store? Or combo updated 10.7.4 - 10.7.5?

nkalister
Valued Contributor

10.7.5 full version, compiled in casper admin. non-compiled is always correct.

tkimpton
Valued Contributor II

Tried this

1.InstallESD.dmg (10.8.2) to casper admin (8.62)
2.Created a config
3. Dragged InstallESD.dmg to config
4.Added others like java
5. Compiled config
6. Tried a build

It just block copied the InstallESD.dmg and didn't create a never booted OS dmg like InstaDMG.

After speaking to Jamf support they have never heard of this.

What they have heard of is the monolythic approach using composer to cature an OS and upload and compil that!

I also tried the InstallESD.dmg options in Casper admin to tick its a Apple OS installer and that didn't accept it.

So not sure how you guys are doing this but InstaDMG is the only option I have.

bentoms
Release Candidate Programs Tester

Tim, what OS are you running Casper Admin on when you tried to tick the box that says its an Apple OS installer?

I think I needed to be on 10.8 to be able to tick that box, once that was done.. i did steps: 2,5 &6 only. No need to add JAVA this time.

Kumarasinghe
Valued Contributor

I was going to say the same thing. You have to open Casper Admin from a 10.8 machine to make it a OS installer package.

tkimpton
Valued Contributor II

Ah Bugger! I have doing it from my 10.7.4 jss server

Thanks guys.

*JAMF support please no more half artiles. Need a proper white paper!

tkimpton
Valued Contributor II

i take it i need to compile using casper admin on a 10.8 machine as well to create a never booted dmg?

tkimpton
Valued Contributor II

made the installer but fail and doesnt bless the boot disk because Casper Admin keeps reporting and error occured connection to jss and just boot to the recovery HD

tried this 5 times today!

going back to InstaDMG at least it works!

bentoms
Release Candidate Programs Tester

Your holding it wrong.

:)

I'll be upgrading my JSS to 8.62 so I'm going to then try what Nick suggested. But for me on 8.61, compiling the AppStore 10.8.2 works a treat!