Build a smaller/faster NBI image?

nadams
New Contributor III

I'm new to Casper, and just recently finished my Jumpstart. During the jumpstart, I was shown the process to create a Casper Imaging NBI to replace our current use of DeployStudio. The process that I was shown is to download the full installer of the lastest MacOS, run it through AutoDMG to get a disk image, then use that disk image in AutoCasperNBI to create the NBI easily.

That process works fine, but the resulting NBI is 10gb, and takes forever to boot. Our old DeployStudio NBI is about 4gb, and I can be up to the image selection window in about 1min 10 seconds. Booting into Casper Imaging takes 4mins 30 seconds to get to the JSS login prompt. This just isn't going to be acceptable when we're trying to image 400 laptops this summer.

Does anyone have any tricks to reduce the image size? I saw some previous discussions where the size of the NBI doesn't matter, because the client is only going to pull down the data that it needs to boot. It seems like it's pulling down the whole image though.

18 REPLIES 18

TJ_Edgerly
New Contributor III

Check out MacMule by @bentoms :

my link text

His Tool will basically automate the entire process. You just supply the Full installer from Auto DMG and your current version of Casper Imaging. His blog has a lot of details and Ben is SUPER helpful!!!

Any time there is a OSX update...you can build a new NBI extremely fast. You also have an option to shrink the image. I can boot to my NBI in under 60 seconds.

nadams
New Contributor III

@TJ.Edgerly As per my post, I am already using AutoCasperNBI to build the NBI from a AutoDMG image and the Imaging app.

The issue is that the resulting NBI is 10gb and takes forever to boot. I haven't tried the "Reduce Image Size" option yet, because according to the documentation it should not be needed. I did create a package with it once, but it only reduced the image size from 10gb to about 6.5gb. What is the size of your NBI?

mpermann
Valued Contributor II

@nadams how long does your DeployStudio image take to NetBoot and what is the OS that you are using on that image. Provide the same information for the image you created with AutoCasperNBI. Also, what is the setup (i.e. Mac OS X Server, NetSUS) you're using to deliver the NetBoot image and what are the settings on the server. I've used Ben's tool and never had any trouble with the resulting NBIs booting in a timely fashion. I did run into some slow launching of Casper Imaging under 10.10.5 but that seems to be a known issue.

There are many threads on the topic of NetBoot sets on JAMF Nation. There is some disagreement on whether the size of the NBI has much to do with the time it takes for a system to NetBoot. From what I've read, a system will only pull down from the NetBoot server the pieces it needs to boot the specific hardware that is trying to boot. But I'm no expert on the topic. If you head over to macadmins.org you can join the Slack group and go into the Netboot channel and you'll find some help for sure.

TJ_Edgerly
New Contributor III

@nadams Our NBI is 5.9GB but we also have several Apps installed in the Environment. Our Techs use it as knowing working OS to rule out hardware issues. I also have a few scripts that Techs can run too for Fusion drives.

" I saw some previous discussions where the size of the NBI doesn't matter, because the client is only going to pull down the data that it needs to boot. It seems like it's pulling down the whole image though."

This should be correct. If your clients are taking that long to boot...I would create an NBI with 10.9.X and 10.10.X to check the difference in speed. Should let you know if it is more of a network issue or NBI issue. I had an issue with my first 10.11.3 NBI loading slow (10.9.5 and 10.10.5 worked fine) so I rebuilt the NBI. After that, i was able to to boot in about 60 seconds.

*Note: Are you serving over HTTP or NFS?

nadams
New Contributor III

@mpermann Thanks for the response. Our current DeployStudio image is built on 10.10.5. The Casper image is built on 10.11.2 with CI 9.81. DeployStudio boots in a little over a minute, Casper image takes 4 minutes and 30 seconds, with 4 minutes to get into the OS, and 30 seconds to launch CI.

I did join the slack group last week - I will head over there and see if there's any recommendations.

nadams
New Contributor III

@TJ.Edgerly I had a thought that maybe it was an issue trying to boot 10.11.3 instead of 10.10.5, which is what our old DeployStudio is running on. Maybe El Cap is just too big to build an NBI off of.

nadams
New Contributor III

I got it down to 3 minutes by running through the process again, creating a fresh OSX 10.11.3 DMG, and using the flag Reduce Image size. The other change with this is that I used a FRESH OSX DMG, whereas before I was using one where I had slipstreamed a Auto User Creation PKG in with it. Maybe that added package was causing it to pull down more than it needed to to boot, or maybe the reduction in image size was what made it faster. Still, I'd like to get it down to a minute, so I may have to use 10.10 instead of 10.11.

mjsanders
New Contributor III

El Cap is not too big, DeployStudio managed to reduce the boot times to 40% with DS 1.7.1 on 10.11.2
see DS forum, so it can be done...

bentoms
Release Candidate Programs Tester

Hi all,

The latter DS NBI's disable some items to speed up the boot process, I've no got around to testing them in AutoCasperNBI yet.. but logged myself an issue to remind me.

They are:

/System/Library/LaunchDaemons/com.apple.locationd.plist
/System/Library/LaunchDaemons/com.apple.lsd.plist
/System/Library/LaunchDaemons/com.apple.ocspd.plist
/System/Library/LaunchDaemons/com.apple.tccd.system.plist
/System/Library/LaunchDaemons/org.ntp.sntp.plist

Perhaps @nadams, you can delete those form your NBI & report back improved?

This might help too delete those off the NBI.

nadams
New Contributor III

@bentoms - Removing those plist files knocked a little more time off. I was able to boot in 2 mins 24 secs to the JSS Login. The only one I didn't remove was org.ntp.sntp.plist, because there wasn't an exact match. Should it be org.ntp.ntpd.plist? Either way, I don't think that'll knock another minute off the boot time.

bentoms
Release Candidate Programs Tester

@nadams Ok. Thanks.

I'll dig through the DS diffs & see if they remove anything else.

BUT

In deleting these files, somethings will not launch & if installing other apps.. They may have dependencies on those & might not run.

Which is why I've not put this into ACNBI yet, it may have a large impact.

nadams
New Contributor III

@bentoms - Understood completely. I don't use any other packages in the NBI, so I'm just looking for the leanest NBI possible that can still kick off an image :).

I did notice that the icons for Casper imaging are no longer showing properly, but I'm not sure if that's because of the plist removal or because I used Casper Imaging 9.82 when I built this NBI.

bentoms
Release Candidate Programs Tester

@nadams "leanest" might not be NetBoot.

Have you tried Casper NetInstall Creator?

bentoms
Release Candidate Programs Tester

@mjsanders One massive difference between DS's NBI & AutoCasperNBI's ones are that DS creates a NetInstall, this is a stripped down OS.

They then add stuff to that to, you can see that in this script here.

With AutoCasperNBI (& AutoImagrNBI), I create a NetBoot. This is a full OS that you can boot from, allowing other apps to be installed & other things set.

Hence the above comment, for a lean Casper Imaging only solution.. try Casper NetInstall Creator

bentoms
Release Candidate Programs Tester

@nadams Just tested & saw the same issue with the icons & had issues opening apps after the LaunchDaemon removals, so.. er... not going down that route.

nadams
New Contributor III

@bentoms I know you're not the maintainer of Casper Netinstall Creator - is this an official JAMF product? I'm having trouble getting a working image created. The one I made starts to boot but then just hangs as the progress bar ever so slowly advances. I've left it sit for nearly 15 minutes and it didn't finish booting. The troublshooting steps say to try using verbose mode with cmd + v, but that doesn't seem to do anything.

bentoms
Release Candidate Programs Tester

@nadams It's maintained by @nick.

Hope he can help, might be worth opening an issue on the GitHub page too.

nadams
New Contributor III

Thanks, I opened a GitHub issue.