AutoCasperNBI - open beta

bentoms
Release Candidate Programs Tester
Update: AutoCaspeNBI has been released, for more information see: https://macmule.com/autocaspernbi/

Hi All,

Over the past couple of months I've been working on an app that with streamline NetBoot creation for use with Casper Imaging (as well as creation of Read-Only DMGs to restore to USB sticks.. if that's your thing).

The basic idea is that you start with an clean never booted OS.dmg either from AutoDMG https://github.com/MagerValp/AutoDMG, Casper Admin http://macmule.com/2014/03/06/how-to-create-an-never-booted-os-dmg-using-casper-admin/ or a Composer captured OS.dmg from a never booted Mac (as in with forked builds).

Then add a copy of Casper Imaging, from there you can click build or amend the options on the first window or click the options button for more.

All the options should have popovers that explain their functions in a bit more detail. Most of the options set will be written to a plist (~/Library/Preferences/com.macmule.AutoCasperNBI.plist) will allows for AutoCasperNBI to be re-run when needed with the settings you haves used before.

external image link

You should see some blanks in the GUI & parts i've not added yet (due to the fact that I'm not sure how yet). These should be added at some point.

Then there will be a full 1.0 release & include:

  • Calculate space needed & alert if we do not have enough
  • Enable the "Additionals" tab. This will allow you to install pkgs to customise the .nbi further as well as additional JSS certs
  • Add some sort of sparkle updater
  • Add .jamfTarget creation
1 ACCEPTED SOLUTION

bentoms
Release Candidate Programs Tester

Hi All,

Thanks for the testing & thanks again to those whom attended my talk @ JNUC.

Slides & Links can be found at the following: https://macmule.com/2014/10/25/jnuc-2014-autocaspernbi-and-the-casper-netinstall-creator-session-sli...

View solution in original post

290 REPLIES 290

HempfieldTech
New Contributor

@bentoms

Hmmmm .... well, before I do that, let me re-visit creating an 10.7.5 OS.dmg with AutoDMG first. I'm guessing if I can get that to work, AutoCasperNBI will work fine. One of those things where I was doing so much fiddling around with different variations, I may have missed something simple. I'll report back ....

andyinindy
Contributor II

@bentoms

Apologies if this has already been asked, but is it possible to feed settings to AutoCasperNBI directly versus letting it reach out and pull them dynamically from the JSS? We have a JSS that is on a restricted access network, so this would be very helpful for us.

Cheers,

--Andy

calumhunter
Valued Contributor

@anyinindy

If there are any extra settings you need to make you could package those settings files up and add them as a install package.

bentoms
Release Candidate Programs Tester

@andyinindy, I'm not sure what you mean. Have you given AutoCasperNBI a go & found something amiss?

andyinindy
Contributor II

@bentoms, unfortunately we do not have an easy way to run autocaspernbi on the same network as our JSS (it is on a highly restricted network), so the tool cannot contact the JSS as usual. That is why I am interested in the possibility of feeding these settings to the app manually via a config file, versus letting the app reach out and grab them from the JSS.

Does this help to clarify?

russeller
Contributor III

Thank you @bentoms for an amazing product. This is going to save me hours of pain in the future. I have a quick question and I apologize if I missed something obvious here. I see under the "Always Set" section all the options you are enabling. Is there a way to allow us to modify these checkboxes? I find the LaunchAgent in 10.10.1 takes awhile to load Casper Imaging. I'm not sure if this is a behavior of launchd being slow in Yosemite, or if we need to add the LimitLoadToSessionType to Aqua in the LaunchAgent plist?
I ended up using the com.apple.loginitems.plist for root and adding Casper Imaging to that which loads Casper Imaging quick. The only reason I'm doing this is because I work for a K-12 and I can already see Campus Techs thinking its not launching Casper Imaging and launching it themselves then have two copies of Casper Imaging running. Just want to avoid future phone calls. Thanks!

bentoms
Release Candidate Programs Tester

@andyinindy, sorry for not replying sooner, but yea AutoCasperNBI will work with the JSS url specified but not available.

Unless i've missed what you mean & you're talking about the NBI?

@ssrussell, cool.. that should work pre-10.10.x too.. Can you log an enhancement: https://github.com/macmule/AutoCasperNbi/issues with an example of the com.apple.loginitems.plist?

Sounds like something I should add.

bentoms
Release Candidate Programs Tester

@HempfieldTech, just to close off your issue with 10.7 NBI's.. if i remember correctly.. a new 10.7 OS.dmg created via AutoDMG worked?

sgoetz
Contributor

@bentoms I was wondering if there is a way you can add in the Options menu maybe under advance to add start up scripts. For example when I make netboots to deal with the encryption I add a script to the netboot image that will run with a login hook. The scripts checks the drive and removes Apple CoreStorage. The command I use to make this login hook is: sudo defaults write com.apple.loginwindow LoginHook /path/to/script. If you would like to see the script that I use let me know.

calumhunter
Valued Contributor

@sgoetz You could create a launchagent to do this, then create a package to install your launch agent and script. Then add this package to the additional packages section in AutoCasper. I do a similar thing.

glopez1
New Contributor II

Running the NetSUS appliance provided from JAMF as the netboot server (centos), I can't netboot images (its autoDMG'd from 10.10.1 installer) that were build with the rc.netboot advanced option. That was for putting shadow into ram right?

I can boot the netboot image if it was build without the rc.netboot option, but it does utilize shadow space via AFP on my netboot server. I'd like to avoid that if I could. Is this possible?

Does the rc.netboot option not support 10.10.1?

calumhunter
Valued Contributor

I've created a 10.10.1 image from AutoDMG, fed that into AutoCasper, enabled rc.netboot option. No problems booting. What errors are you seeing on the client if you put it in verbose mode? How much RAM does your client have? The rc.netboot file creates a 2Gb RAM disk, you'll need another 2gb for yoyo to play ball.

bentoms
Release Candidate Programs Tester

bentoms
Release Candidate Programs Tester

@gtucker, i've booted into 10.10.x NBI's with & without the rc.netboot change. Difference is they have been hosted on OSX server.. So not if or how the NetSUS changes things,

rhs615
New Contributor III

First, taking a fresh OS.dmg file (actually got it from a JAMF CCA course), I get the error of Could Not Find OS Version. If I mount the DMG before opening AutoCasperNBI, it gives me the green light, however it sees the version of my OS, not the mounted DMG. I then get green lights on everything and go to build to my desktop and it fails everytime with Error: Cannot copy contents of to '/Volumes/AutoCasperNBI'. I see it make the .nbi folder, and mount the NetBoot.dmg within it, but then cannot copy anything.

I've even tried having the DMG mounted when opening CasperNBI to get the version check green light, and then unmounting before hitting build to see if it needs to mount it fresh for the copy.

bentoms
Release Candidate Programs Tester

@rhs615, weird.

You shouldn't mount the OS.dmg, instead let AutoCasperNBI do it.

rhs615
New Contributor III

Thank you @bentoms, but that is what I am trying. I have the OS.dmg on my desktop, I open AutoCasperNBI, choose that DMG from the desktop and get the spinning wheel and the message Could not Find OS

bentoms
Release Candidate Programs Tester

@rhs615, please open an issue at: https://github.com/macmule/AutoCasperNBI/issues & post your log.

rhs615
New Contributor III

@bentoms - thank you for any help!

bmarks
Contributor II

I'm having an issue that I can't seem to resolve. The NetBoot image that I created with this app doesn't appear to be allowing a block copy of my base OS (create with AutoDMG.) The same base OS will block copy with my older hand-built NetBoot image. I'm going to toggle some of the various options (modified rc.netboot, etc.) but if anyone might know the specific setting I might've selected to cause this, that'd be great.

jyoung
New Contributor

I have been seeing the same issue recently. Any suggestions would be greatly welcomed.

rhs615
New Contributor III

I had the same issue, where Casper Imaging would show Macintosh HD at /var/netboot/, and not at /Volumes. I checked the modify rc.netboot button and haven't had a problem since.

bmarks
Contributor II

I have that option selected and am experiencing the issue. I just toggled it and am building a test image right now.

bentoms
Release Candidate Programs Tester

@bmarks & @jyoung, does both the AutoCasperNBI & the older NBI's have the same version of Casper Imaging? Are the Macs your trying to images running yosemite? What version of Casper Imaging?

bmarks
Contributor II

Yes, there are some variables between my older image that works and my new image:

Old image = 10.9.2 + Casper Imaging 9.32
Attempted new image: 10.10.2 + Casper Imaging 9.63

bmarks
Contributor II

Additionally, I toggled very one of the optional settings and created a bunch of one-off NetBoot images, but they all exhibit the same behavior.

bmarks
Contributor II

And, in the name of thoroughness, I'll mention that I am creating these images on a current model Mac Pro also running 10.10.2 and the current version of AutoCasperNBI. I am also using the current version of AutoDMG to create my base OS images (with not additional packages, updates, etc. added to them.)

calumhunter
Valued Contributor

@bmarks What netboot server are you using?

MeagerGnome
New Contributor

I am seeing this too.

10.10.2 AutoCasperNBI + Casper Imaging 9.63 + AutoDMG 10.10.2 image = No Block Copy
10.10.1 AutoCasperNBI + Casper Imaging 9.61 + AutoDMG 10.10.2 image (same as above) = Works fine.

jyoung
New Contributor

New image: 10.10.2 (from AutoDMG) + Casper Imaging 9.63 made with AutoCasper NBI. My old netboots got destroyed by a drive failure a few weeks ago. We have been putting the pieces back in. We haven't had any new machines come in lately to image so I am just running into this. Today I imaged two Mid 2009 MBP laptops and two 27" Retina iMacs and NO block copy. That is what prompted me to rebuild netboots as we were getting kernel panics when booting to 10.10.1 netboot. Our server is a Mac Mini running 10.9.5 Server. JSS version is 9.63. All machines I imaged today were Yosemite. I have not tried to image from a netboot created with Casper Netinstall Image Creator.

bmarks
Contributor II

For me, everything is current:

Mac mini Server running 10.10.2 and Server.app 4.03 (for the NetInstall service.)

I hadn't tried any previous Yosemite builds. I was waiting for 10.10.2 before updating our imaging setup which is currently based on a hand built 10.9.2 NetBoot image + Casper 9.32. That NetBoot image (and block copy) works on 10.8.5, 10.9.5 and 10.10.2 imaging servers (we have 34 globally.)

calumhunter
Valued Contributor

I have no issues with a 10.10.2 NBI created with AutoDMG and AutoCasperNBI
I am however not using casper imaging, i'm using deploystudio.

I'm also not using NetSUS or OS X server as a netboot server - I'm using BSDPy which if you are not using it, you should be.

I would suggest attempting to use diskutility from your netbooted client and try to format the internal hard disk. If you can do that then it is likely not a netboot image issue but rather a 10.10.2 + Casper Imaging 9.63 issue.
You could also try to boot a client from a 10.10.2 bootable OS on an external hard disk and use casper imaging 9.63 to rule out AutoCasperNBI as the problem.

Also try using the 9.61 version of casper imaging. sometimes (often) i've found that updated versions of casper imaging screw things up. Hence my love of deploystudio for imaging rather than CI

bmarks
Contributor II

Apparently, there's another thread too:

https://jamfnation.jamfsoftware.com/discussion.html?id=13184

Apparently, it might be specific to the combo of 10.10.2-based NetBoot image + Casper Imaging 9.63?

Of course, this happens when I try to update my NetBoot image for the first time in over a year ;)

bentoms
Release Candidate Programs Tester

@bmarks, cheers for linking to the other discussion.

Bad timing as I'm out of the office for a few weeks with a broken ankle.. So testing will be hard.

I'll keep an eye on things though.

bmarks
Contributor II

I'm re-creating one based on 10.10.1 + Casper Imaging 9.63 and since 10.10.1 is a universal build, this should work for me for the time being. There was nothing I needed from a 10.10.2 NetBoot image, it just felt like the time was right to upgrade. But, assuming this 10.10.1 image works, that's enough for me for now. Thanks for the assistance.

bentoms
Release Candidate Programs Tester

@bmarks, sounds like a plan.

Can you report your findings to this thread & the one you linked?

dmueller
Contributor

I just tested this with an external boot disk, and sure enough 10.10.1 block copies fine with v9.6.3 of Casper Imaging, 10.10.2 will try and install the disk image. Time to raise a ticket.

Regards,

MeagerGnome
New Contributor

Does Casper Imaging still use /usr/sbin/asr to copy the OS image? It does look like Apple updated this app in 10.10.2.

calumhunter
Valued Contributor

asr works fine in 10.10.2.

deploystudio restores images just fine using block copy from a 10.10.2 netboot image created via autodmg and autocaspernbi

also repeatable using CLI:

/usr/sbin/asr -source /path/to/my/autodmg.hfs.dmg -target /Volumes/Macintosh HD -erase -noverify

jyoung
New Contributor

Just tried netboot created with Casper Netinstall Image Creator and Casper Imaging 9.63 and no block copy.