Hi All, and welcome back to our series on configuring Imagr. Last time, we ran through the setup of the Web service to use as the Imagr Repo.
This part 3 looks to cover the creation of the client NetBoot set. Part 4 will cover populating the Imagr repo with content and building a workflow. Part 5 will look at some possible use cases for Imagr with the current popular management tools.
OS Used: OS X El Capitan (10.11.1)
Server App Used: 5.0.15
Imagr Used: 0.0.4
Recommended knowledge (but not required):
- Apple NetBoot server configuration
- Auto[X]NBI (such as AutoCasperNBI or AutoImagrNBI)
- Editing XML files (or OS X plist files)
I will often be using Repo as shorthand for Repository throughout this series.
Please Note: You will also need a clean, unbooted OS image. I would strongly recommend using AutoDMG to produce this. See here for more information.
Lets deal with this question first; why use AutoImagrNBI? Well it is a project that Ben Toms (Mac Mule) has been working on for a while under the AutoCasperNBI banner, to help semi-automate the creation of new NetBoot images.
It isn’t fully automated, but does utilise some nice, user-friendly GUI buttons, as well as being very intuitive in use. Much like these blogs, it tries to make a repetitive, time consuming, and easy to get wrong task, into something that can be produced with a few simple clicks.
As a long-time user of the Casper version, it felt appropriate to just use the Imagr fork!
Step-By-Step: Getting a Copy of AutoImagrNBI
First things first, we’ve gotta grab a copy of AutoImagrNBI.
1. Fire up Safari and navigate to https://macmule.com/projects/autoimagrnbi/
2. Scroll down until you can the big ‘Download now’ button. Click this.
3. This will take you to the main GitHub page. Yes I could have directed you straight to here, but then you wouldn’t get to see all the information on Ben’s main site!
4. Scroll down again until you see the ‘Downloads’ section. Click the ‘.zip’ link and grab yourself a copy of the app.
5. Once this downloads, go find it in your Downloads folder and launch it. Optionally, move it to your Applications folder as you’re likely to use this a lot in the future.
6. As this is an administration app (as appose to an end-user app), it hasn’t been code signed and so, if you have Gatekeeper enabled, it’ll stop you launching the app.
7. Right click the app, select ‘Open’ to get the Gatekeeper approval popup.
8. Click ‘Open’ to automatically add a Gatekeeper exception and to launch this app.
9. You’ll be greeted by a pretty empty looking AutoImagrNBI app. Lets start filling these boxes in!
Step-By-Step: Creating the NetBoot Image (NBI)
Now we’ve got AutoImagrNBI, lets start using it!
10. Under the ‘Select OS.dmg’, click the ‘Select..’ button.
11. In the new pop-up window, find your clean, unbooted OS image. Select this and click ‘Choose’. In this example, I am using an AutoDMG produced, El Capitan (10.11.1) disk image.
12. This will examine the disk image for suitability. This can take between 10 and 60 seconds, depending on the speed of your storage and how busy your Mac is currently.
13. Once complete, this will change to show the OS version and build number.
14. Next we need to add a local copy of the Imagr app. This is the source of all the clever-ness that takes what’s on the Imagr server and carries out the work.
15. We’ve got two options, we can both manually download and select the app or, and this is my preferred method, get the AutoImagrNBI app to do this for us. Click the ‘Download’ button.
16. AutoImagrNBI will now go off and grab the latest version of the Imagr app from the GitHub pages.
17. Once complete, the version downloaded will be added to the main page.
18. Now we need to fill in the URL of our Imagr Configuration Plist file. I would recommend sticking to a common convention as suggested below:
For this blog, the example I have used is:
19. If you’re not sure you’ve typed the address correctly, highlight and copy all the text and paste it into a text file.
20. Once complete, hit the ‘Enter’ or ‘Return’ keys to store the URL.
21. Hit ‘Tab’ and AutoImagrNBI will auto-populate the name of the Net Boot Image.
22. If you’ll be serving this via a JAMF NetSUS or BSDPy NetBoot server, ensure the tick box is ticked for this. If in doubt, tick it anyway! This option removes any spaces from the NetBoot Image name.
23. The ‘NetBoot Image Index’ number is randomly generated. If this will be the only NetBoot image you use, then this shouldn’t be an issue. If you serve other NetBoot images that will remain live, you need to ensure that this number is different to any other NetBoot image index numbers. Simply change this as required.
Please Note: If this same identical image is going to be used on multiple NetBoot Servers (and so load balanced), tick the ‘Will be served from more than one server’ box. This will change the number to a random value over 4095. The same rules apply here, except that the number needs to remain above 4095 and each identical NetBoot image should have the same number.
24. Finally, choose if you host your NetBoot Images on HTTP or NFS. This will be specific to your site, but for this demo, I have left this on the default of HTTP.
25. Now, lets check (and set) some of the more advanced options. Click the ‘Options’ button in the lower left corner.
26. In case you didn’t guess, this will show you all the advanced options for the NetBoot image that will be created. Tick the ‘Set NetBoot Description’ option to auto-populate the description box that will be visible on the server.
27. Feel free to add / edit / remove information as desired.
28. If you will only be using this NetBoot image for Imagr (and not say, for troubleshooting Macs) then tick the ‘Reduce Image Size’ box. This will remove a number of items that Imagr doesn’t require, but you may find you need them for troubleshooting. If in doubt, leave this unticked.
29. If you wish to be able to log into a NetBoot’d Mac over ARD, tick the ‘Enable ARD’ option and fill in the ‘ARD Username’ and ‘ARD Password’ boxes.
30. Alternatively, if you wish to use VNC, tick this option and enter the VNC password.
31. If you want to use a specific custom background image, tick the option, and use the ‘Select’ button to choose a specific .png file.
32. Once you’re happy with these options, click the ‘Advanced’ tab.
33. ‘Time Server’. If you want to specify an internal NTP / time server, enter this in the ‘Time Server’ box. Also use the ‘Time Zone’ drop down menu to select your time zone, based on the nearest city in your actual time zone.
34. ‘Localisation’. Use the ‘NetBoot Language’ dropdown menu to select the language of the NetBoot set (our example will remain on ‘English’). Use the ‘Input Language’ dropdown menu to select the language of the keyboard to be used (I have set the example one to ‘British’).
35. ‘Create A Restorable DMG’. Enabling this option will create the NetBoot image, plus a disk image that can be restored to an external Hard Drive for non-NetBoot deployments. We won’t be using this with this example so leave this unticked.
36. ‘rc.netboot’. This installs a modified script that will create a 2GB RAM disk locally on boot. This is used to store any cache files that would normally be written back to the server, therefore allowing a single NetBoot server to serve more clients at once, and the ensure the best possible speed whilst NetBoot’d. If you are unsure, I’d suggest leaving this enabled.
37. ‘Finder’. This tick box will enable a ‘simple’ Finder view, reducing the amount of Finder options available to the user. We will leave this disabled for this example.
38. Once you’re happy with these options, click the ‘Additionals’ tab.
39. This last tab will show you options for adding additional certificates to be trusted by the NetBoot image, and the option to install any further packages into the NetBoot image.
40. In the last blog (step 37), we grabbed a copy of the Imagr server’s self-signed SSL certificate. We need to add this to the NetBoot image. Click the ‘+’ symbol in the Certificates section.
41. In the new pop-up box, find and select the certificate we exported previously. Click ‘Choose’.
42. The certificate should now show up on the main ‘Additionals’ tab.
43. The last section is used to run installers on the NetBoot image. We won’t be using this as part of these examples. Click ‘Close’.
44. You should end up back at the main AutoImagrNBI screen. Give everything a once over to ensure it’s correct, then click the ‘Build’ button.
45. Don’t go anywhere yet! Enter the local administrator username and password in the relevant boxes and click ‘Enter’.
46. Last step till you can rest. AutoImagrNBI will ask where you’d like to save the new NetBoot image. I suggest using the local user’s Desktop. Pick a location and click ‘Choose’ to start the process.
47. AutoImagrNBI will now go off and start working on a new NetBoot image as per your choices. This can take anything from 20 minutes to 1.5 hours, depending largely on the speed of your storage and how much your build Mac is doing in the meantime (such as AV scans or backups). It will also let you know where you can find a log file of what is happening.
48. Open Console (from /Applications/Utilities/) and navigate to this file to keep an eye on the progress.
49. Now is a good time for a cup of tea / coffee and to read up some more on AutoImagrNBI (see step 1).
50. Once complete, you’ll see the below message. Click ‘OK’ then quit AutoImagrNBI.
That’s your NetBoot image fully created and ready to be uploaded to the server.
Step-By-Step: Uploading the NBI to the Server
Lets get that NBI folder added to the server and operating!
51. Copy the entire .nbi folder, and it’s contents, to the NetBoot server.
52. Open a Finder window and navigate to the NetBootSP0 folder we configured in the first blog for step 5. In my example this is at:
53. Drag the entire .nbi folder into this location.
54. Once finished, launch the Server.app and navigate to the NetInstall section.
55. The new NetBoot image should appear in the ‘Images’ list. Select the image by clicking once on it.
56. Optional: Use the action cog symbol to set the new image as the default by clicking on ‘Use as Default Boot Image’.
57. Enable the NetBoot service by clicking the ‘Off’ switch.
58. Wait for the service to complete the initialisation.
59. Grab a test Mac, plug in a network cable and boot the device to the new NetBoot image.
60. Once booted, leave this for up to 5 minutes and eventually the Imagr app should launch. If this happens then you have a working Imagr NetBoot image!
61. You’ll almost certainly see an error message complaining that the Imagr app cannot get the configuration plist from the server. This is normal at this stage and something we will fix in the next part!
And that’s pretty much it. Congratulations you now have your Imagr NetBoot image up and running and ready to be fed some workflows!
Next time, we look at configuring the Imagr workflow plist and adding some content to our repo!
As always, if you have any questions, queries or comments, let us know below and I’ll try to respond to and delve into as many as I can. I’m especially eager to hear any feedback on this new series.
The usual Disclaimer:
While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.