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

sgorney
New Contributor III

Does the OS.dmg to NetBoot.dmg copy take some time? It seems to be hanging on that process for me.

bentoms
Release Candidate Programs Tester

@neil.martin83 have you been able to test with Casper Imaging 9.4? I've a fix in the next commit for the expand issue.

@sgorney the time is dependent on your OS.dmg's size & whether you're using an SSD or spinning disk.

neilmartin83
Contributor II

@bentoms Just done some testing this morning.

I actually managed to generate an expanded NBI on a freshly installed Mac (no errors) and tried Casper Imaging 9.4. Left ARD enabled. Still hanging on reboot. :(

bentoms
Release Candidate Programs Tester

@neil.martin83 dammit!

I'll need to somehow spin up a NetSUS to test, but I know this has worked on a NetSUS for others.

I wonder if the same NBI works on a NetBoot server.

neilmartin83
Contributor II

@bentoms Yeah it's frustrating. Things are hotting up here, students starting soon etc so my spare time is disappearing. Next time I get a chance I'll disable the NetSUS and try the NBI on our old Mac Mini Server which was used for NetBooting before.

bentoms
Release Candidate Programs Tester

UPDATED

0.15
— Round all the sizing! (yep i missed some, should work on non-english
macs)
— Corrected Admin check behaviour
— Removed a few hundred lines to get over the stack error.
— Changed behaviour so only build process window is shown during build.
— Correct the logging so shouldn’t rollover when writing past 00:00 on
a day, & will start a new line on launch
— Corrected an issue when expanding the NetBoot.dmg

Same link as in OP

wmateo
Contributor

@bentoms how are you addressing FV2 encrypted drives on this? is DiskUtil included? NetInstall Creator is cool, but lacks tools like DiskUtil on the menu & dock.

bentoms
Release Candidate Programs Tester

@wmateo Disk Utility is kept even when reducing the image.

powellbc
Contributor II

I started testing this today with .15 and it worked really well, no observed issues at all. Great work!

bentoms
Release Candidate Programs Tester

Thanks for testing folks!

If you weren't, it'd have been pointless.

dmueller
Contributor

@bentoms, I just wanted to say that this tool is pretty awesome. I have been playing with it since .12 and it has worked out quite well. Thanks for your effort so far.

ega
Contributor III

So this works great. Thanks for all the hard work! Would you consider 2 additional options: a) hide dock and b) hide disks ? We work completely unattended, remotely so I actually edit the info.plist on Casper Imaging.app to add <key>LSUIPresentationMode</key> <real>4</real>
forcing full screen at launch. The problem is that the launch daemon takes several seconds and the desktop is still visible inviting tampering. It would be great if you would add these 2 options in advanced mode! Thanks for consideration.

tsharrison
New Contributor

This is working perfectly in our environment, and has resolved some issues we were having with new machines. Thank you, thank you, thank you!

Bendelaat
New Contributor II

This works perfectly, thanks for sharing. @bentoms will jou be adding a feature to add JDS certificate in the mix so we can get installation files from JDS? (when they get it working).

MikeF
Contributor II

This is a great tool. We were having problems getting the nbi files created and working. Since we have been using this all our issues have gone away. Thanks for all your hard work on this.

bentoms
Release Candidate Programs Tester

@ega, i'll have a look at the full screen. But tbh, once I get the additionals tab working.. you'll be able to customise it as you wish.

@Bendelaat][/url, thank you! AutoCasperNBI will try & grab the JSS's cert if you enter the JSS url.. it's then set as a trusted root cert on booting the NBI.

@dmueller][/url, @tsharrison][/url & @MikeF, Thank you too! Glad it's helped.

sgorney
New Contributor III

This is honest-to-god one of the best tools I've ever used. Well done, sir.

sgorney
New Contributor III

@bentoms Have you tested this with Yosemite yet?

activitymonitor
New Contributor III

Anybody else having trouble getting Diskless Mode to work? I needed to make the change suggested here to my rc.netboot file for 10.9.4: https://jamfnation.jamfsoftware.com/discussion.html?id=6443#responseChild33353

justinrummel
Contributor III

/url">@activitymonitor][/url If you look at Options => Advanced there is a checkbox for rc.netboot. it works perfectly the last tim I needed NetBoot to use RAM for the user cache data. see: [http://cl.rummel.co/image/38132p3B0A3D

Also, if you are dealing with an OS X Server that has been upgraded in the past years, review http://support.apple.com/kb/TS4316 to see if your netboot users have the correct FileSharing permissions. This was the root cause to need the rc.netboot checkbox.

- Justin

activitymonitor
New Contributor III

@justinrummel The modified file gets installed, but it is the 10.6/10.7 era file, which does not work (for me at least) on 10.9. I changed both instances of kextutil to kextload and it worked great.

mfcfadmin
Contributor II

@bentoms][/url Very new to Casper but tools like this make the transition infinitely easier and a more joyful experience. In testing this in our lab I have seen at least one issue mentioned in this thread, namely the Mac not rebooting or hanging on the gray screen for a long period of time after the reboot command is conceivably given. However another issue I have been seeing and I have not seen mentioned in this thread is one where after the netboot occurs and Casper Imaging is supposed to launch automatically, I see it bounce in the dock, the light (or dot indicating the application is launched) underneath the app appears, the menubar for Casper Imaging will even sometimes briefly appear, but then the app just seems to quit with no interaction whatsoever. Casper Imaging can then manually be relaunched and all works fine but it would be nice to have it work as expected. Have you seen this behaviour in any of your testing?

Another anomaly I have noticed and have not been able to reproduce at will is the password obscuring characters will sometimes randomly change. Sometimes it will be black bullets as I expect it should always be, but other times it is a series of e's that are used when typing the password into the Casper Admin password field.

bentoms
Release Candidate Programs Tester

Hi all,

Just to say i've been quiet as have been beavering away at adding the options to install additional pkgs, so you guys can customise as you want. There should be another version this week.

@sgorney it can create YoYo NBI's on 10.7 - 10.9. It won't run on YoYo, yet.. that's the next next thing to fix.

@activitymonitor, that's interesting.. I've had people net boot 40 clients & image from one server.. so that would presume that the rc.netboot works (was a 10.9 NBI). What were you seeing that made you look into diskless?

@mfcfadmin, that al sounds wrong tbh. BUT, with the hanging issue.. i keep thinking it's the permissions on the NBI or the method used to copy to the server. I have seen it hang, but no longer do. I think the difference is copying over 1GB instead of say wireless. But I'll need to look into it more. Can you answer the below please?

  1. What OS version NBI?
  2. What server is hosting the NBI? (& version)
  3. Which protocol used? (http or nfs)
  4. What are the permissions on the NBI once inplace on the server?

activitymonitor
New Contributor III

@bentoms][/url

Using your rc.netboot file on 10.9, I could not erase a disk with Casper or Disk Utility when netbooted. Tried it on several machines and got could not unmount disk errors.

mfcfadmin
Contributor II

@bentoms][/url

  1. The NBI OS version is 10.9.1
  2. Late 2013 Mac Pro 2.7 GHz 12 Core Intel Xeon E5, 64 Gig 1867 MHz DDR3 RAM running Server 3.1.2
  3. HTTP
  4. Permissions rwxrwxr-x or by my figuring 775.

The image was created on the computer that would eventually host it and therefore it loaded/saved it into the NetBootSP0 folder itself upon successful creation of image.

Again, thanks for this tool and assistance.

donmontalvo
Esteemed Contributor III

@mfcfadmin wrote:

1. The NBI OS version is 10.9.1

Sorry for butting in, but just curious, why not 10.9.5 (agnostic)?

--
https://donmontalvo.com

mfcfadmin
Contributor II

@donmontalvo

Trying to keep things consistent.

We are deploying 10.9.1 images because in our environment we have found that if we upgrade beyond 10.9.1, Apple native apps do not work with our network accounts. Without going into too much detail we are using network home directories hosted on a NetAPP and authenticated via Kerberized NFS. However if we go beyond 10.9.1 the apps break.

donmontalvo
Esteemed Contributor III

@mfcfadmin So 10.9.1 should be fine since Apple KB HT1159 shows the Late 2013 Mac Pro shipped with 10.9.

I thought you meant your NBI is at 10.9.1, we usually make that the latest agnostic OS version, currently 10.9.5.

Do

--
https://donmontalvo.com

mfcfadmin
Contributor II

If it makes a difference the NBI is based on/created from 10.9.1 (version 1.3.37 build 13C64) never booted AutoDMG image. The actual OS on the Mac Pro is 10.9.4.

musat
Contributor III

I just tested this out on our systems here and everything went very smoothly. About the only thing I would like to be able to change is the dock. We always put Disk Utility into the dock to make it a little quicker to access in case the local drive needs to be erased or renamed prior to imaging.

We also sometimes use the netboot image for recovery / repair, making easy access to disk utility handy.

bentoms
Release Candidate Programs Tester

@activitymonitor that's odd & definitely not something i've seen. There have been plenty of people advising it's worked for them as diskless using the rc.netboot fix for 30+ Macs or without form up to 10.

@mfcfadmin what models of Macs are you netbooting? I'm wondering if they do not support 10.9.1 hence the oddities your seeing.

@musat, thanks! Next commit will allow you to install PKG's with which you can customise the root user account.

mfcfadmin
Contributor II

@bentoms

So far the bulk of them have been Late 2012 or beyond Mac Mini's. Core i5's or better all with 16 GB RAM.

bentoms
Release Candidate Programs Tester

@mfcfadmin, hmmm.

Have your tried a variety of aged models? Same result?

Was the AutoDMG image created from the install OS X.app?

Can you try & stop the NetInstall service, then restart? If that fails, can you empty NetBootClients() & then try?

Lastly, can you try with a 10.9.5 NBI?

mfcfadmin
Contributor II

@bentoms

Have not yet tried on older equipment as I had a new shipment of Minis to deploy. I can eventually get around to testing on older hardware and post results.

Yes the AutoDMG was created from the Install OS X. app 10.9.1 (version 1.3.37 build 13C64)

NetInstall service was stopped and and restarted upon creation of the new NBI image I even went so far as to reboot the Mac. The NetBootClients() folder was also emptied.

I will try with 10.9.5 and see if results vary.

Thank you!

mfcfadmin
Contributor II

@bentoms

The more I play, the more I see. One of the other things I have noticed about it "hanging" or remaining on the grey screen is that sometimes it works completely as expected and other times it just does seemingly "hang" there on the grey screen. I have not yet been afforded the luxury to just let it sit for a period of time to actually see if the "hung" grey screen actually does ever reboot given some time. However when I do get a chance I will be patient and see this happens. This was just an aside to let you know that without any changes whatsoever I am sometimes seeing the expected behaviour.

bentoms
Release Candidate Programs Tester

Hi All,

New release.. same link as above.

0.16
— Enabled adding additional pkgs & certs.
— Amended kernel cache generation to see try & stop the hang on restart.
— Changed root user environment back to Apple defaultsish. (Dock is stripped to Finder, Casper Imaging & Trash). Use PKGs to customise

jwojda
Valued Contributor II

it's probably me, but I get the beachball o death every time I launch .15 or .16. It prompts for the admin credentials but doesn't let me type, gotta force quit.

bentoms
Release Candidate Programs Tester

@jwojda are your launching it on 10.10?

fritz_schlapbac
Contributor

Thank you for your work @bentoms][/url. AutoCasperNBI is a great tool and I really appreciate it.

The only issue I see (with all versions I tried, including the new .16) is, that the keyboard is not set to the one I choosed while creating the NetBoot image.

I always choose the keyboard "SwissGerman", but after booting a machine with the created NetBoot image the keyboard seems to be US (or UK, not sure).

The server is running OS X 10.9.5 as well as the created NetBoot image. The same problem existed with OS X 10.9.4.

jwojda
Valued Contributor II

@bentoms theoretically, though I cannot confirm nor deny based on NDA :)