Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

Very Light OS to run Casper Imaging

Utilising the hidden Apple Recovery partition, I've managed to modify it to include Casper Imaging and display the Casper Imaging App on the "Mac OSX Utilities" screen. The only issue I'm having is that when I launch casper imaging nothing happens and when attempted from the command line i get "illegal instruction: 4" The best bit, Its only 1GB in size. You can't get more lightweight than that.

The ultimate goal is to make a lightweight netboot image that is 10.6, 10.7, and 10.8 agnostic that will run on any mac regardless of build and machine spec. Much like booting into Windows PE via PXE and starting the SCCM task sequence to deploy windows.

I've tested the same Recovery partition against a dozen of our macs ie Imac, macbooks, and mac minis and they all load the same with no problems...

Happy to be proven wrong but that agnostic lightweight recovery partition looks to me like its begging to be made into a Netboot image to run Casper Imaging. I just can't make the application work inside it.

Comment

Posted: 2/16/13 at 12:35 AM by bentoms

There are some dependencies the app needs that are not included in the recovery partition I guess.

I once went too far when creating a NetBoot image & deleted java, python etc... Got a similar error.

Like

Posted: 2/16/13 at 5:33 AM by bsuggett

I'd be keen to know these dependencies and look into putting them into the recovery partition to make into a netboot image...

Like

Posted: 2/18/13 at 8:28 AM by acdesigntech

+1. I hate our 15GB netboot images....

Like

Posted: 2/18/13 at 9:52 AM by lkerwin

Hello,

Great, so I'm not the only one trying to get this working with 10.8. We also used to rely on using NetInstall Image Creator to make a NetInstall image but only supports 10.4 \- 10.6. I am currently trying to get this working with a modified deploy studio image but haven't been successfully as of yet. To my knowledge the deploy studio Netboot image is modeled close to the Apple restore partition. I have managed to get Casper Imaging to launch but will not connect to the JSS.

Any input regarding this would be much appreciated.

Regards.

Like

Posted: 2/18/13 at 11:08 AM by johnklimeck

I've managed to get our 10.8.2 netboot Casper Imaging image to just under 5 GB (this includes the cool RAM disk trick that has been posted here in JAMF Nation, allows one to use Disk Utility for partitions and erase of HDs).

Delete all apps except needed ones: Terminal, Disk Utility, etc. (No iLife apps), no speech voices, etc.

Use Monolingual to remove all languages except English. Working well.

Like

Posted: 2/18/13 at 11:28 AM by acdesigntech

@johnklimeck: I followed that procedure and the image still ballooned to \~12.5 GB. I'll be recreating the NBI again soon, so I'll try the monolingual procedure again.

Like

Posted: 2/18/13 at 3:16 PM by gregp

The last one I created was around 8 GB. That was base 10.8.2 \+ all software updates \+ Casper Imaging. No other software installed (and no Java).

I tried deleting applications a while back, but doesn't seem to get reclaim all that much disk space.

When creating the NetBoot image, I also use pmset to disable any automatic sleeping & hibernating, then delete /var/vm/sleepimage. That fella is as big as your RAM.

Like

Posted: 2/19/13 at 2:27 AM by lkerwin

Thanks for the response guys, much appreciated. Has anyone had a play with the Apple restore partition or a Deploy Studio Netboot set?. It would be great to get a tiny footprint of the OS loaded together with the Casper Imaging application to boot over the network.

Regards.

Like

Posted: 2/21/13 at 2:58 PM by jacob_salmela

How did you modify the Recovery HD? I found an interesting article about this. It is a bit older but still a good read:

http://jeffstrauss.com/?p=216

Like

Posted: 2/22/13 at 3:52 AM by lkerwin

Hello,

Thanks for the link, I will give this a read as this looks interesting. I have modified a deploy studio image to allow Casper Imaging to launch but I'm still having issues when trying to image a machine, I'm assuming this is something to do with Casper needing access to /private/tmp but appears be a read only mount point looking at the logs.

I had previously looked at the Apple restore partition alternative but cannot get Casper Imaging to launch at all, has a -4 error probably due to dependencies. I'm thinking of just slimming down a base image of 10.8 then unload as many services as possible just to allow Casper imaging to launch and image a machine. I have managed to get a 10.8.2 image to 3.2gb, my aim is for around 1.5Gb if possible.

Work in progress as this could take some time.

Regards.

Like

Posted: 2/22/13 at 4:22 PM by acdesigntech

Has anyone been able to install a package when booted from the boot drive? I have not tried this, but was wondering. I spent all day chanign my imaging scheme from a nuke and pave to thin imaging. Doesn't use CI at all, just installs a launchdaemon that installs a quick add on reboot and immediately reaches out to the JSS and pulls down its imaging configuration as a series of packages and scripts. WAY easier and keeps apple's OS and restore partition intact.

Like

Posted: 2/22/13 at 6:37 PM by jstrauss

@jacob_salmela and @lkerwin:

The Recovery partition POC I wrote is still basic; haven't had time to work on it, but does work. This is a personal project, not affiliated with JAMF Software, but since it seems to be of interest, I'll continue to develop it. Be aware, however, that it is *unsupported* by anyone \- JAMF Software, Apple, and me, so test! :)

Jeff

Like

Posted: 2/25/13 at 6:01 AM by lkerwin

Hello,

It seems like the boot partition can only launch the apps that are installed on this partition so I basically gave up trying. Casper Imaging also reported a -4 error when trying to launch from the terminal, I decided to totally trim down a 10.8 image then removed any services not needed. The image boots then launches Casper Imaging without the Finder, Dock, Notifications etc. I currently have this at 3.9Gb, that seems to be quicker at booting but needs more work.

Work in progress...

Regards.

Like

Posted: 2/25/13 at 7:02 AM by jacob_salmela

@jstrauss
This kind of "personal project" you are working on are the kinds of things I enjoy; finding a solution to a problem that may not even be on anyone else's radar (JAMF or Apple). Sometimes, all it takes is one person to make a difference or light the spark of ingenuity.

Like

Posted: 2/26/13 at 4:46 AM by lkerwin

Hello,

I decided to have a tinker with the system as I couldn't find much info on the internet regarding this, obviously this will be unsupported from Apple and JAMF. It seems pretty stable but I just need more time to refine what I already have without breaking the image.

Regards.

Like

Posted: 2/26/13 at 6:58 AM by jacob_salmela

I also plan to tinker around. Between the three of us, I am certain we could reach a solution.

Like

Posted: 3/1/13 at 9:37 PM by BaddMann

Anything New? I'm really disappointed in casper's netboot creation features (none), as I was really spoiled with how easily deploy studio made it's locked down and light weight environment.

Has anyone considered reverse engineering Deploy Studio's methods of the wizard creation process and creating a casper centric "revision" of the wizard?

I'd consider it a worthwhile project and would devote what little time I have left to it.

Like

Posted: 3/1/13 at 9:37 PM by BaddMann

Anything New? I'm really disappointed in casper's netboot creation features (none), as I was really spoiled with how easily deploy studio made it's locked down and light weight environment.

Has anyone considered reverse engineering Deploy Studio's methods of the wizard creation process and creating a casper centric "revision" of the wizard?

I'd consider it a worthwhile project and would devote what little time I have left to it.

Like

Posted: 3/1/13 at 9:37 PM by BaddMann

Anything New? I'm really disappointed in casper's netboot creation features (none), as I was really spoiled with how easily deploy studio made it's locked down and light weight environment.

Has anyone considered reverse engineering Deploy Studio's methods of the wizard creation process and creating a casper centric "revision" of the wizard?

I'd consider it a worthwhile project and would devote what little time I have left to it.

Like

Posted: 3/1/13 at 9:37 PM by BaddMann

Anything New? I'm really disappointed in casper's netboot creation features (none), as I was really spoiled with how easily deploy studio made it's locked down and light weight environment.

Has anyone considered reverse engineering Deploy Studio's methods of the wizard creation process and creating a casper centric "revision" of the wizard?

I'd consider it a worthwhile project and would devote what little time I have left to it.

Like

Posted: 3/1/13 at 9:37 PM by BaddMann

Anything New? I'm really disappointed in casper's netboot creation features (none), as I was really spoiled with how easily deploy studio made it's locked down and light weight environment.

Has anyone considered reverse engineering Deploy Studio's methods of the wizard creation process and creating a casper centric "revision" of the wizard?

I'd consider it a worthwhile project and would devote what little time I have left to it.

Like

Posted: 3/1/13 at 9:38 PM by BaddMann

Anything New? I'm really disappointed in casper's netboot creation features (none), as I was really spoiled with how easily deploy studio made it's locked down and light weight environment.

Has anyone considered reverse engineering Deploy Studio's methods of the wizard creation process and creating a casper centric "revision" of the wizard?

I'd consider it a worthwhile project and would devote what little time I have left to it.

Like

Posted: 3/1/13 at 9:39 PM by BaddMann

Um sorry, I guess I'm a little to button pushy.

Like

Posted: 3/15/13 at 10:43 AM by lkerwin

Hello,

Just a quick update, I eventually got the image to just over 3Gb. I am also working on my own version of the NetInstall app using Xcode. Currently I have the interface built with some extras like IP address, System build, Memory, OS version etc..

Work in progress..

Regards.

Like

Posted: 3/18/13 at 7:47 PM by BaddMann

Got a Link or Github?

Like

Posted: 8/9/13 at 3:42 PM by Jpcorzo

How did you get the netboot image to not balloon up to 15GB \+ . I'm currently at that stage right now and it is not going anywhere.

thanks

Like

Posted: 8/13/13 at 2:48 AM by lkerwin

Hello,

I managed to get the 10.8 image to 4.1GB, removing all applications unused extensions, frameworks and various components I thought would not be necessary. Also to note is that 10.8 holds a sleepimage file located in "/var/vm/sleepimage" this is usually the size of your physical memory that can also be safely removed.

Hope this helps..

Like

Posted: 11/25/13 at 11:07 PM by wangl2

Yep, same problem here. I just started creating a 10.9 netboot image using InstallESD.dmg. After I copied all the packages, the image has blow up to 14GB. JAMF should supply a better guide how to create a minimal OS for NetBoot than the current one.

Like

Posted: 9/10/14 at 11:27 AM by jacob_salmela

Nice! I have gotten Casper Imaging into the Utilities menu in the Recovery HD, but I don't think it can launch because it is 32-bit.

Like

Posted: 6/19/15 at 6:50 AM by marklamont

@lkerwin I know this is an old posting but do you have any doc's you could share around what can be removed to shrink the boot image?
Could really do with a bit of guidance.

Like

Posted: 6/19/15 at 5:53 PM by bentoms

@marklamont I can get NBI's down to around 5GB from an AutoDMG OS.dmg in AutoCasperNBI, the relevant part is here.

I also create the image as a sparse image, so i can compact once stuff has been deleted.

Like

Posted: 6/22/15 at 6:34 AM by marklamont

Thanks @bentoms

Like