You are not logged in.

Announcement

[2017.09.08] DeployStudio build v1.7.8 (checksum, release note).
[2016.08.26] DeployStudio build v1.6.19 (release note).
[2013.02.23] DeployStudio last universal build v1.5.17 (release note).

#1 2018-07-17 20:15:58

janthenat
Member
From: Sugar Grove, IL, USA
Registered: 2009-04-24
Website

High Sierra 10.13 Imaging Install School Manager DEP process theory

Just an idea for your brains to consider as a possible method for an “imaging” workflow for those Macs you still have that are NetBoot capable.

1. Place a copy of the macOS High Sierra installer app at the root of the DeployStudio NetBoot image. (here named “InstallHIghtSierra.app”)

2. Create a DS workflow that does the following steps

3. Partition drive as HFS (or maybe APFS?) and name it “Macintosh HD”

4. Run a script to initiate the install of macOS using startosinstall like this for my example... “/Volumes/DeployStudioRuntime/InstallHighSierra.app/Contents/Resources/startosinstall —applicationpath /Volumes/DeployStudioRuntime/InstallHighSierra.app —volume /Volumes/Macintosh\ HD —agreetolicense —nointeraction”

5. The macOS install gets kicked off and the machine restarts to complete the install

6. If your School Manager/DEP and MDM are configured correctly then after the macOS install completes the setup assistant will do the whole MDM enrollment and configuration process.

Thoughts?

...by the way, this is working for me apart from problems I’m having with my automated enrollment process...

Last edited by janthenat (2018-07-17 20:21:44)

Offline

#2 2018-07-18 01:56:14

dan.kuehling
Member
Registered: 2008-12-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Theoretically, couldn't one put the installer app in the Files subfolder of the DS repo and refer to it there in the script? That way you wouldn't have to bake it into the NBI.

Offline

#3 2018-07-18 18:23:51

janthenat
Member
From: Sugar Grove, IL, USA
Registered: 2009-04-24
Website

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> dan.kuehling wrote:

> Theoretically, couldn't one put the installer app in the Files subfolder of the DS repo and refer to it there in the script? That way you wouldn't have to bake it into the NBI.

Great idea!

Theoretically, yes.  But in practice this doesn't seem to work, at least not for me.  Running the command manually in Terminal while netbooted to DeployStudio, and monitoring 'top', the startosinstall command runs but seems to never progress and the other processes never kick off.  Maybe this is because the installer is not actually on the booted drive?

NOTE:  In my environment my NBI contains a boot disk of the 'sparseimage' variety, which is read/write when mounted on a Mac.  This makes it easy to switch out or add macOS installer apps at the root of the disk image.

Offline

#4 2018-07-18 18:46:32

dan.kuehling
Member
Registered: 2008-12-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

I just made it work on my DS server. Put the installer app into the Files subfolder in the repo, put this script into Scripts and call it from a Generic task. My test machine next to me on the workbench is installing right now.

#!/bin/sh

"/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app/Contents/Resources/startosinstall" --applicationpath "/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app" --volume "/Volumes/Macintosh HD" --agreetolicense --nointeraction

exit 0

Offline

#5 2018-07-19 09:36:01

sebus
Member
Registered: 2011-07-19

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Sorry, probably missing a point, but why not convert the installer to .dmg & just simply apply it with DS?

Offline

#6 2018-07-19 11:35:42

Joon
Member
Registered: 2012-02-15

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> sebus wrote:

> Sorry, probably missing a point, but why not convert the installer to .dmg & just simply apply it with DS?

No data loss, upgrading prior versions, no need to apply "critical updates" for touchbar machines and applying firmware updates automatically without weird workarounds to name a few.

Last edited by Joon (2018-07-19 12:58:03)

Offline

#7 2018-07-20 14:10:45

dan.kuehling
Member
Registered: 2008-12-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Plus the simple fact that, like it or not, Apple is killing off disk imaging. https://support.apple.com/en-us/HT208020

The T2 machines (iMac Pro and 2018 MacBook Pro) don't support NetBoot at all, this is just a stopgap to get NetBootable machines to 10.13. When 10.14 comes and APFS is everywhere, we'll be able to use the "eraseinstall" flag on startosinstall to wipe the drive first.

Offline

#8 2018-07-21 12:15:55

carlocarlo
Member
Registered: 2011-02-04

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

I wonder if T2 machines would netboot if you disable secure boot...
https://support.apple.com/en-us/HT208330

Offline

#9 2018-07-21 15:48:46

janthenat
Member
From: Sugar Grove, IL, USA
Registered: 2009-04-24
Website

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Hmmm, still can’t get this to work from /tmp/DSNetworkRepository/Files/...  The startosinstall command starts but then nothing.  It doesn’t fail, just sits there and no errors.

Offline

#10 2018-07-22 01:46:48

longgegeno1
Member
Registered: 2018-01-29

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> carlocarlo wrote:

> I wonder if T2 machines would netboot if you disable secure boot...
https://support.apple.com/en-us/HT208330

https://twitter.com/tperfitt/status/946895178438266880

Offline

#11 2018-07-23 11:59:35

Joon
Member
Registered: 2012-02-15

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> janthenat wrote:

> Hmmm, still can’t get this to work from /tmp/DSNetworkRepository/Files/...  The startosinstall command starts but then nothing.  It doesn’t fail, just sits there and no errors.

Run the startosinstall command from the terminal instead, you'll get the errors/output you want for troubleshooting.

Last edited by Joon (2018-07-23 12:27:26)

Offline

#12 2018-07-25 09:39:24

carlocarlo
Member
Registered: 2011-02-04

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Hello, the upgrade command dan.kuehling posted here works just fine for me!
Thank you!

I am now wondering how to erase and install the OS (limited to APFS) instead of upgrading

Taking some info from here
https://www.jamf.com/blog/reinstall-a-clean-macos-with-one-button/
I tried modifying the original script

#!/bin/sh

"/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense

exit 0

But I get an error in DS log

"By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms"

It seems the --agreetolicense does not work as intended
Any help would be very much appreciated!
Ciao
Carlo

Offline

#13 2018-07-25 23:52:36

chrisb42
Member
Registered: 2014-03-14

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

You're missing the "--nointeraction" part, then it should work.

-Christian

Offline

#14 2018-07-30 14:59:22

carlocarlo
Member
Registered: 2011-02-04

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Hello and thanks for your reply...
Tried several times with the below script but it does not seem to work... keeps getting the "By using the agreetolicense option, you are agreeing that you have run this tool with the license only option..." message in DS log
(I skipped the -newvolumename since its optional with  --eraseinstall and deafult is  Macintosh HD)

Any help would be very much appreciated, as it seems I am missign something obvious here
Already verified the target disk is  APFS and 10.13.6 has been manually installed before on the same computer...
Ciao
Carlo

#!/bin/sh
"/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app/Contents/Resources/startosinstall" --applicationpath "/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app" --agreetolicense --eraseinstall --nointeraction
exit 0

Offline

#15 2018-07-31 19:06:15

chrisb42
Member
Registered: 2014-03-14

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

You should just use the script the way Dan had it, that worked for me when I tried it. In your posting above you're missing the parameter for the volume that you want to install to, in his example that's this part: --volume "/Volumes/Macintosh HD"

You can find problems with commands like this by trying to run them from the Terminal. When I did that, I noticed that it had to be via "sudo" to run without interaction in Terminal Uwhich is not needed as a script within a workflow, it's already having the right permissions).

-Christian

Offline

#16 2018-07-31 20:10:37

carlocarlo
Member
Registered: 2011-02-04

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Hello Christian, thanks for your message
The script Dan posted works perfectly for me
Sorry I should have explained my goal better
I was just trying to add and use the —eraseinstall option to first erase (nuke&pave) the destination drive without using Disk Utility (since the script would update a previous OS if existing)
I could not find a way to format the destination drive as APFS in DeployStudio (at the beginning of a workflow)
Maybe I am missing something!
Thanks again
Carlo

Last edited by carlocarlo (2018-07-31 20:13:31)

Offline

#17 2018-08-03 15:46:21

Peteo
Member
Registered: 2012-03-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> dan.kuehling wrote:

> I just made it work on my DS server. Put the installer app into the Files subfolder in the repo, put this script into Scripts and call it from a Generic task. My test machine next to me on the workbench is installing right now.

#!/bin/sh

"/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app/Contents/Resources/startosinstall" --applicationpath "/tmp/DSNetworkRepository/Files/Install macOS High Sierra.app" --volume "/Volumes/Macintosh HD" --agreetolicense --nointeraction

exit 0

Cant seem to get this to work. When running from a workflow I get the error: not suitable image found

When I try to run it in the terminal (booted into DS, changed to the correct directory) I get command not found even though the file is there

Edit: I tried a 10.13.5 macos installer on an older system and it does not work either. Same error message

Last edited by Peteo (2018-08-03 16:15:09)

Offline

#18 2018-08-06 14:55:04

jelockwood
Member
Registered: 2009-11-11

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

Ok, using the script suggested by @dan.kuehling I was able to get a new MacBook Pro 2018 booted from an external USB drive using DeployStudio Runtime and to run the script from the DeployStudio repo and to run the High Sierra installer. I used the python script to download and build the custom build for the 2018 model.

I did try various permutations to try and automate erasing the drive. All failed in various ways, the modification to Dan's script failed with an error 801 or something similar, I tried typing the command manually in Terminal. (Don't have the number in front of me.) I tried using DeployStudio partition workflow but this did not create an APFS volume. I tried making an empty APFS disk image and restoring that but that did not work either. So to do an erase I am booting from the DeployStudio Runtime and using Disk Utility. I then run the Dan script. This works as far as it goes.

Has anyone been able to automate then running the rest of a standard DeployStudio workflow? I have managed to reboot and run a second workflow but would like it to be automatic as part of a single workflow.

Last edited by jelockwood (2018-08-06 15:14:41)

Offline

#19 2018-08-06 15:00:50

Peteo
Member
Registered: 2012-03-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> jelockwood wrote:

> Ok, using the script suggested by @dan.kuehling I was able to get a new MacBook Pro 2018 booted from an external USB drive using DeployStudio Runtime and to run the script from the DeployStudio repo and to run the High Sierra installer. I used the python script to download and build the >custom build for the 2018 model.

>I did try various permutations to try and automate erasing the drive. All failed in various ways, the modification to Dan's script failed with an error 801 or something similar. (Don't have the number in front of me.) I tried using DeployStudio partition workflow but this did not create an APFS >volume. I tried making an empty APFS disk image and restoring that but that did not work either. So to do an erase I am booting from the DeployStudio Runtime and using Disk Utility. I then run the Dan script. This works as far as it goes.

>Has anyone been able to automate then running the rest of a standard DeployStudio workflow? I have managed to reboot and run a second workflow but would like it to be automatic as part of a single workflow.


How did you get the installer to work? did you run the install script as a post install? This does not work for me. It might be because I delete the apfs container, create a new one and a new Macintosh HD APFS volume using these commands:

diskutil apfs deleteContainer disk0s2
diskutil apfs createContainer /dev/disk0s2
diskutil apfs addVolume disk1 APFS "Macintosh HD"

That works fine but then when I run the startosinstall app in the same script it says no valid image found
I cant not run this post install since there is no macOS on the volume for DS to modify

Last edited by Peteo (2018-08-06 15:03:27)

Offline

#20 2018-08-06 15:19:34

jelockwood
Member
Registered: 2009-11-11

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> > Peteo wrote:
>
> > > jelockwood wrote:
>
> > Ok, using the script suggested by @dan.kuehling I was able to get a new MacBook Pro 2018 booted from an external USB drive using DeployStudio Runtime and to run the script from the DeployStudio repo and to run the High Sierra installer. I used the python script to download and build the >custom build for the 2018 model.
>
> >I did try various permutations to try and automate erasing the drive. All failed in various ways, the modification to Dan's script failed with an error 801 or something similar. (Don't have the number in front of me.) I tried using DeployStudio partition workflow but this did not create an APFS >volume. I tried making an empty APFS disk image and restoring that but that did not work either. So to do an erase I am booting from the DeployStudio Runtime and using Disk Utility. I then run the Dan script. This works as far as it goes.
>
> >Has anyone been able to automate then running the rest of a standard DeployStudio workflow? I have managed to reboot and run a second workflow but would like it to be automatic as part of a single workflow.
>
>
> How did you get the installer to work? did you run the install script as a post install? This does not work for me. It might be because I delete the apfs container, create a new one and a new Macintosh HD APFS volume using these commands:
>
> diskutil apfs deleteContainer disk0s2
> diskutil apfs createContainer /dev/disk0s2
> diskutil apfs addVolume disk1 APFS "Macintosh HD"
>
> That works fine but then when I run the startosinstall app in the same script it says no valid image found
> I cant not run this post install since there is no macOS on the volume for DS to modify

It worked as a workflow containing just a single script as written by Dan. It ran the Apple installer and found the "Macintosh HD" volume I created using Disk Utility in the DeployStudio Runtime.

I was hoping to then get it run subsequent workflow steps but not been able to do this so far.

Offline

#21 2018-08-06 15:22:49

Peteo
Member
Registered: 2012-03-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> jelockwood wrote:

>It worked as a workflow containing just a single script as written by Dan. It ran the Apple installer and found the "Macintosh HD" volume I created using Disk Utility in the DeployStudio Runtime.
>I was hoping to then get it run subsequent workflow steps but not been able to do this so far.

So you did not run it as a "postponed execution" ?

not sure why the heck this is not working for me. what version of macOS did you make the DS boot drive on 10.13.6?

Offline

#22 2018-08-06 15:56:11

jelockwood
Member
Registered: 2009-11-11

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

I made the DS Runtime boot drive from the MacBook Pro 2018 before I wiped it.

No, the install script is not postponed.

My steps are as follows -

1. Boot from DS Runtime boot drive
2. Run Disk Utility - wipe entire drive as APFS, I show hidden volumes and select the parent device to erase not the Macintosh HD volume
3. Run workflow containing only Dan's script
4. Let it run and reboot and then install
5. When it gets to the normal brand new Mac wizard I reboot from the DS Runtime drive again
6. I then run a second workflow which does not do a format or install but only runs my normal workflow tasks e.g. renaming Mac, installing packages and settings

Last edited by jelockwood (2018-08-06 15:59:14)

Offline

#23 2018-08-06 17:52:12

Peteo
Member
Registered: 2012-03-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> jelockwood wrote:

> I made the DS Runtime boot drive from the MacBook Pro 2018 before I wiped it.

>No, the install script is not postponed.

>My steps are as follows -

>1. Boot from DS Runtime boot drive
>2. Run Disk Utility - wipe entire drive as APFS, I show hidden volumes and select the parent device to erase not the Macintosh HD volume
>3. Run workflow containing only Dan's script
>4. Let it run and reboot and then install
>5. When it gets to the normal brand new Mac wizard I reboot from the DS Runtime drive again
>6. I then run a second workflow which does not do a format or install but only runs my normal workflow tasks e.g. renaming Mac, installing packages and settings


is this with the full installer (5 gigs) or the small 22mb one?

Edit: I finally got this to work by re downloading the installer. Something most have been up with the one I download earlier. This is working fine on older macs, but the T2 Macbook pro 2018 I have does not work because the version of 10.13.6 in the app store is not the newest version (When i try to download it on the T2 Macbook Pro 2018 it tells me the OS installed is newer) Guess i have to wait for 10.13.7.

also i was able to add to the script remove an existing APFS container (if there was one) create a new one and a new Macintosh HD volume using these commands before startosinstaller:

diskutil apfs deleteContainer disk0s2
diskutil apfs createContainer /dev/disk0s2
diskutil apfs addVolume disk1 APFS "Macintosh HD"

Last edited by Peteo (2018-08-06 20:11:09)

Offline

#24 2018-08-06 20:16:45

jelockwood
Member
Registered: 2009-11-11

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

@Peteo

The new MacBookPro15,1 uses a build that is specific to this model. As you said when 10.13.7 comes out that will include the drivers you need.

What I did and I presumed you had, was to use a script to download the correct installer and create a disk image with it. The script is here https://github.com/munki/macadmin-scripts/blob/master/installinstallmacos.py

You _must_ run this on the MacBookPro 2018 model. The build number to select was the first in the list for me. I don't have the MacBook at home to look up the number.

Offline

#25 2018-08-06 21:29:35

Peteo
Member
Registered: 2012-03-22

Re: High Sierra 10.13 Imaging Install School Manager DEP process theory

> jelockwood wrote:

> @Peteo

>The new MacBookPro15,1 uses a build that is specific to this model. As you said when 10.13.7 comes out that will include the drivers you need.

>What I did and I presumed you had, was to use a script to download the correct installer and create a disk image with it. The script is here https://github.com/munki/macadmin-scripts/blob/master/installinstallmacos.py

>You _must_ run this on the MacBookPro 2018 model. The build number to select was the first in the list for me. I don't have the MacBook at home to look up the number.

Thanks that script worked great and i was able to download the latest installer for that model

Offline

Board footer

Powered by FluxBB