Posted on 08-01-2014 05:28 PM
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.
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:
Solved! Go to Solution.
Posted on 10-25-2014 08:04 AM
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...
Posted on 08-27-2014 08:55 AM
Great! Thanks! I'll test it in the lab the next chance I get.
Posted on 08-27-2014 01:33 PM
Great Work The old version worked great. I'll test this one asap. Thanks for all your hard work on this.
Posted on 08-27-2014 01:54 PM
I tested your simple finder functionality. While it does hide any drive icons, it also stops launch pad showing any apps as well. I would suggest using some managed preferences to hide on screen drive icons instead of simple finder mode.
Posted on 08-27-2014 02:10 PM
@franton yep. It seems to be a odd quirk of enabling simple finder.
I suppose I could remove LaunchPad from the dock?
Or swap the dock.plist if simple finder enabled.
Posted on 08-27-2014 02:26 PM
@bentoms We use Simple Finder and launch Casper Imaging at login. I then have a folder in a hidden dock with the apps you include in LaunchPad. So you can do that, or if you prefer, hide items from the desktop as @franton suggests. My real concern is that I don't want to have a NetBoot image that makes it to easy to goof around. I especially don't want people to run Safari. So it would be nice if you can somehow hide, block, or remove unnecessary apps like that. It is your tool, so I leave it up to you. I hate to be picky when you've been so generous! Thanks!!
Posted on 08-29-2014 01:06 AM
Firstly - Awesome app idea - Love it.
Question - How big of an image does this spit out? Does this delete all the rubbish (apps etc) not required for netboot to get the size down as far as possible?
Posted on 08-29-2014 05:02 AM
The images i've been getting are about the 5Gb size. Perfectly acceptable for my own use case.
@bentoms Sorry Ben. Some want their images locked down, some (like me) need access to a few utilities in case of emergencies.
Posted on 08-29-2014 06:41 AM
Posted on 08-29-2014 06:46 AM
Next commit will have a dock with just the Finder, Casper Imaging & Trash.
Once I get the additional installable pkg's option working (as shown under the advanced tab in the options window).. You can customise the dock as you wish.
@sovereign, as @franton mentioned.. I've added some reduction.. But haven't gone too mad. When NetBooting the client only pulls what it needs, so size is only really a factor when replicating NBI's or using USB sticks.
Posted on 08-29-2014 03:30 PM
@bentoms I've been trying to setup a netboot image for 10.7 for my machines that only support that os, but no matter what image I pull, whether it's from an image I took with disk utility (tried both compressed and uncompressed), or AutoDMG, it always gives me "Cannot read OS Version." Any ideas? (10.7 is reported, right?)
Posted on 08-29-2014 03:34 PM
Actually, just re-read some of this thread - do I need to run AutoCasperNBI on 10.7 in order to create the 10.7 NBI? I've been running AutoCasperNBI on 10.9 and trying to use a create one with a 10.7 image. Same as needing to run SIU on 10.7 to make a 10.7 image?
Thanks!
Posted on 08-29-2014 03:36 PM
@smith.kyle, yep 10.7 - 10.10 NBI creation is supported.
Currently only supports being run on 10.7-10.9.
Is this being run on 10.10?
To get the OS version, AutoCasperNBI is is reading it from the SystemVersion.plist on /System/Library/CoreServices/
Posted on 08-29-2014 03:37 PM
@smith.kyle, you do not need to be on the same OS version. :)
Posted on 08-30-2014 04:11 AM
@smith.kyle, was this with 0.11 or 0.12 btw?
& was the OS.dmg already mounted?
Posted on 08-31-2014 09:36 PM
Thanks! It was on 10.9 that I was trying to create the 10.7 nib with 0.12. I can't look at the server I as doing it on right now, but I believe the dmg was able to mount (think I saw that in the autocaspernbi log). Or do you mean I need to mount it ahead of time?
Posted on 09-01-2014 03:12 AM
@bentoms - Thank you for this, it's great and thanks for your support with the issue regarding spaces in the name and NetSUS. Got a couple of suggestions, just cosmetic really.
Posted on 09-01-2014 07:58 AM
One thing I've noticed is that after imaging, when the system reboots, it hangs for a very long time, nearly an hour from what I've seen, before it actually reboots into the second stage.
This is with a reduced NetBoot Set that has ARD enabled and is using the custom rc.netboot.
I am going to try another without the custom rc.netboot but will leave ARD enabled and go from there...
Regards,
Neil.
Posted on 09-01-2014 09:42 AM
Not sure about the desktop background. Only replace the DefaultDesktop.jpg with what you supply.
Desktop icons.. This has been brought up more than once, on a few commits I'll not set Finders settings so you can do as you need. (Once the optional to install additional packages is working).
As for the hang, is this a 10.9.4 NetBoot? https://jamfnation.jamfsoftware.com/30.0b6/30.0b6/discussion.html?id=11363
Posted on 09-01-2014 11:00 AM
@bentoms][/url ahh so it's likely to be a combination of 10.9.4/ARD. I'll generate a NetBoot set without ARD now and test tomorrow when I get in to work. :)
I've seen this behaviour on 3 different machines today. Interestingly they all eventually rebooted without my intervention but a significant amount of time was added to the imaging process.
Out of interest, do people tend to have the shadow storage in RAM rather than use a chunk of the server for it? Aside from the benefits of using less network bandwidth and server resources, are there any potential issues by doing it that way?
Reason I ask is that I come from a DeployStudio background and never had to deal with this when it came to using DS's own NetBoot sets. Ignorance was bliss. :)
Edit: does anyone know if this happens with VNC enabled rather than ARD?
Cheers,
Neil.
Posted on 09-02-2014 02:40 AM
It's me again!
After trying an NBI with ARD disabled, the system still hangs when trying to reboot just as it did before. This was observed on a late 2012 Mac Mini and Late 2012 iMac. I am going to assume it's something to do with Casper Imaging 9.31 and OS X 10.9.4 (AutoDMG generated). I'll try a 10.9.3 base image (AutoDMG generated).
I also noticed that the machine seems to pause the imaging process if not touched for a while, like it's gone to sleep. But I know it hasn't fully entered sleep, just the display has. If I put my ear to the Mac, I can hear the fan quietly spinning and the occasional hard disk churn. When I press a key the display quickly powers up again and I see Casper Imaging quickly 'rush' through a bunch of packages then it seems to carry on where it left off.
Regards,
Neil.
Posted on 09-02-2014 01:23 PM
@neil.martin83 you're coming to the meet up tomorrow right?
If so, can we test some imaging remotely? To resolve i think we need to enable SSH & tail the system log at logout.
Posted on 09-02-2014 01:31 PM
Updated to 0.13
—Resolved an issue calculating space on non-English language Macs.
—Added checkbox for hosting on NetSUS, this removes spaces from the NetBoot’s Name.
Same link as above
Posted on 09-02-2014 01:34 PM
@smith.kyle Hi, AutoCasperNBI will error if it cannot mount the DMG (error showing as "Cannot Mount DMG", it will also error if it cannot read the OS version from:
set selectedOSdmgVersion to do shell script "/usr/bin/defaults read " & quoted form of selectedOSdmgMountPath & "/System/Library/CoreServices/SystemVersion.plist ProductVersion"
So as long as that plist exists it should be ok.
I've been trying to recreate the issue you're seeing, but am struggling.
Posted on 09-02-2014 11:00 PM
@bentoms Yes, happy to give it a go. Using AnyConnect on the iPad for VPN access and SSH is currently blocked - but can screen share to a second Mac on the network and do it through that. Loving Remotix by the way.
The build I'm testing with takes approx 40 mins to complete the first stage of imaging.
I finish work at 5 and am only down the road in Stratford so can get to St Paul's early if you like.
Will test a reduced 10.9.3 build this morning with ARD and custom rc.netboot enabled and report my findings.
Posted on 09-03-2014 02:07 AM
@bentoms][/url Ok... Tried 10.9.3 and observed:
I'll go back to 10.9.4, image the Mini again, tail the system log and post results.
Posted on 09-03-2014 03:07 AM
@neil.martin83.. right.. I had personally thought that the whole ARD thing was a bit of a red herring, what i've done on OSX server is clear the NetBootClients() folder, restarted the NetInstall service & re-NetBooted.
Not sure if you can do this with NetSUS of if starting the AFP/SMB service is enough.
Posted on 09-03-2014 03:51 AM
@bentoms Can't find any mention of that folder or shadow storage in general in the documentation (haven't SSH'd in yet to have a poke around the directory structure but I'd rather not as I'm not quite sure where to look and what to bash at).
This issue is consistent whether or not the custom rc.netboot is used... Also switching back to our original 10.9.3 NetBoot created the traditional way by @daz_dar works perfectly every time.
I'll have a system log for you shortly... just waiting for it to reboot, been hung a while now but stuff occasionally still appearing in the log. It'll finish soon...
Another observation with every one of AutoCasperNBI's sets is that there is a progress bar every time the system NetBoots, which I think is an fsck running.
Posted on 09-03-2014 03:58 AM
@bentoms][/url][/url here's the system log:
Posted on 09-03-2014 04:03 AM
@neil.martin83, thanks for the link.
It appears to be the system.log from your mac & not the NBI's.
Anyways, the FSCK is not something I've seen.. & I'm wondering if this is all due to a bad upload?
I have seen the hang before, but that has been resolved my end. Possibly by uploading via a gig connection & not 100MB or wireless.
I know others have seen it, but it has also seemingly randomly been resolved.
Perhaps remove the image & re-upload?
Posted on 09-03-2014 04:11 AM
/url">@bentoms][/url Sorry I included some of my own logs by mistake when playing with the tail command, have edited the above post with the correct link now: [http://pastebin.com/2Q9hZ7qr
Have been uploading these via a gigabit link and have seen the same with each one, must have done quite a few by now so I don't think it's the network. Perhaps the NBI needs expanding with more free space? That's the one thing I haven't tried yet...
Posted on 09-03-2014 04:44 AM
@neil.martin83 thanks for the logs, expansion is definitely worth a try.
The issue appears to be with kext's. (according to the system.log) as those were the last messages before the 30 minute delay at restart.
Posted on 09-03-2014 05:56 AM
@neil.martin83 i've posted a fix in 0.14 that may help:
0.14
—?Added?touching?of?/System/Library/Extensions/?to?try?&?resolve?hang
on?reboot
—?Corrected?some?logging
If you have time, please try 0.14 & advise.
Posted on 09-03-2014 06:02 AM
@bentoms Thank you, will try it now.
Posted on 09-03-2014 07:46 AM
@bentoms Whilst waiting for the machine to finish first stage of imaging, I have a question.
Does AutoCasperNBI keep the disk image in the NetBoot Set mounted until you quit the application completely? If so that may be where I was going wrong with what looked like fdisk running at boot. I was copying the NetBoot set across before quitting the app. This time I quit the app completely and didn't see a progress bar when booting into the new set.
Posted on 09-03-2014 07:52 AM
@neil.martin83, it wouldn't be AutoCasperNBI but NetSUS or NetBoot Server.
I'd advise copying the NBI, then restarting the NetBoot service or AFP/SMB then trying to boot.
Posted on 09-03-2014 07:56 AM
@bentoms - hung again :(
Also I think the Energy Saver preferences need tweaking as I had to hit a key to get the Mini to wake up properly again after it had paused during the imaging process.
Will try with a 20GB set next...
Posted on 09-03-2014 08:02 AM
@neil.martin83, i did originally have a more "caffeinated" energy saver settings set, but removed them in favour of Apple's NBI defaults.
Let's have a talk about this later.
Thanks for all the help so far.
Posted on 09-03-2014 08:10 AM
@bentoms No problem, able to generate the NBIs faster now as am doing it on a server with a nice Pegasus R6. I think I've got time to try one more (same settings but expanded to 20GB) before I leave here - will restart SMB, AFP and NetBoot in the NetSUS.
Fingers crossed and looking forward to meeting you later. :)
Posted on 09-03-2014 08:27 AM
@bentoms Last one from me for today - not able to create an expanded NBI, got an error whilst creating dyld caches - here's a snipped from AutoCasperNBI's log:
Wed Sep 3 16:22:53 BST 2014 Trying to expand /Volumes/USS-RAID/Testing/10.9.4AutoCasperNBI.nbi/NetBoot.reduced.dmg to 24.4GB Wed Sep 3 16:22:53 BST 2014 Trying to mount: '/Volumes/USS-RAID/Testing/10.9.4AutoCasperNBI.nbi'/NetBoot.reduced.dmg Wed Sep 3 16:23:31 BST 2014 Mounted to: /Volumes/10.9.4AutoCasperNBI 1 Wed Sep 3 16:23:31 BST 2014 Trying to disable Spotlight Indexing on /Volumes/10.9.4AutoCasperNBI Wed Sep 3 16:23:32 BST 2014 Disabled Spotlight Indexing on /Volumes/10.9.4AutoCasperNBI Wed Sep 3 16:23:32 BST 2014 Creating dyld shared cache files on: /Volumes/10.9.4AutoCasperNBI Wed Sep 3 16:23:45 BST 2014 Error: Creating dyld shared cache files
See you in a while. :)
Posted on 09-04-2014 11:25 AM
Just grabbed it and made a 9.4 NBI, worked great! Nice work