0

I've been searching for a clear method to create a custom Netinstall image of Sierra for a while without success.

My goal is to have two administrator accounts by default and some packages (e.g. Slack, Firefox, iTerm2 ...) incorporated with the installation.

I've tried different methods.


AutoDMG - Automator method:

I successfully create the dmg image with autoDMG (I mounted it and effectively I have Firefox and stuff in the Application folder). Then I create a custom Netinstall image with Automator (adding the users in the workflow) and install it on another mac, but finally the packages are not in the OS and not even the users, I have a simple OSX installation.


Packages - Automator method:

I create a package including Slack, Firefox, iTerm with Packages App (by Apple) and include it with Automator in the Netinstall image. But this way the installation fails because the package is not signed by a verified Apple developer (obviously ...).


So, I admit I'm pretty desperate. I spent a lot of hours trying to figure it out.

Any help would be appreciated! Thanks

UPDATE

I was wondering if it is possible to include a script in the installation that will be lauched at the first boot to perform some actions like enabling ssh and/or enabling and configuring filevault. This will prevent me of shaping an image with packages included as I would install Munki (github.com/munki/munki) and then allow users to get packages easily.

Hope I was clear enough.

1

Check out DeployStudio. It allows you to create a master image, and then create a workflow to push individual packages and install them. You can also set groups that will have different workflows so you can customize which group gets which image and packages.

http://www.deploystudio.com/

  • 2
    Welcome to Server Fault! I'm not sure if you are linked with this product, but just in case, if you want to promote your own product/blog you must disclose your affiliation in the answer, otherwise, your answer may be flagged as spam. Please read How to not be a spammer – CalvT Jun 15 '17 at 16:12
  • DeployStudio is nice, rather particular on verision matching up, etc.... I think also what OP is referring to can just all be achieved with the standard NetInstall suite included with OSX. – bourneN5years Jul 1 '17 at 15:54
1

I found two solutions.

The first is installing OS X on a external HD, configure the system as I needed (create multiple accounts, install software, ...) and then attach the disk on a Mac and create from this disk a NetRestore image with 'System Image Utility' to deploy.

The other solution is far more complicated.

You'll need: AutoDMG, CreateUserPkg, first-boot-pkg (git clone) and Packages. You also need a macOS installer downloaded on the Apple Store.

These are the steps in detail:

  1. Write a configuration script (or more) which fit your needs and a launchd daemon's .plist file which will launch your script. (you can find some examples here)

  2. Package them with 'Packages': Open 'Packages' application and select "Raw Package" then click "Next". Choose a name for your package (ex: your-osxconfig-pkg) and a Project Directory (ex: ~/Desktop/your-osxconfig-pkg), then click "Finish". Click on the tab named "Payload" in the top bar of the window. You should see a filesystem, here you can drag and drop the files in the location you want them to be installed by your package. Drag and drop the script you created into the folder /Library/Scripts and the daemon's .plist file into /Library/LaunchDaemons. Build the package using the shortcut 'cmd⌘ - B' (click 'Save' if asked). If everything went well you should see a green thick and "Build Succeeded" on the screen. Close the application.

  3. Create an "Add User Account" package with 'CreateUserAccount':

    Open 'CreateUserAccount' application, configure the user as you need (be careful if you modify the 'Home directory'), then "Save Package" (Use desktop as the output folder).

  4. Create a first-boot package. Launch a terminal, then:

    $ sudo ~/path/to/first-boot-pkg
        --pkg=~/Desktop/your-osxconfig/build/your-osxconfig.pkg --pkg=~/Desktop/create-user.pkg  \
         --identifier=com.your.firstboot   
         --launchd=com.your.firstboot --name=your-daemon-firstboot.pkg
    

    The option --pkg let you include a package, --identifier option is to choose the identifier of the built package, --launchd to choose the name of the launchd daemon, --name to choose the name of the built package. You can include as many packages as you want, for example you can include the Munki installation packages. Those will be executed the first time you boot on the machine.

  5. Open 'AutoDMG' application, drag and drop the macOS installer and the first-boot package. Click "Build" and choose the path for the newly created image.

Now that we have a valid macOS image we can proceed to create a Netboot/Netinstall/Netrestore image.

0

Looking at the System Image Utility help file, it looks like what you want to do is to create a NetRestore image, which allows you to take an already set up system with the accounts, applications, and settings and restore it over the network to multiple Macs.

You can find the utility in /System/Library/CoreServices/Applications/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.