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).

#26 2018-08-07 11:53:28

jelockwood
Member
Registered: 2009-11-11

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

Now that I have the basic Dan authored script working, and seem to have established it is not possible to include the erase option I have a suggested enhancement.

The script for downloading a macOS installer written by Greg Neagle and available here https://github.com/munki/macadmin-scripts/blob/master/installinstallmacos.py is the only way to download a full High Sierra installer app for the new MacBook Pro 2018 models. (If/when High Sierra 10.13.7 is released you will be able to download it from the App Store as normal but until then you need the custom build for the new MacBook Pros.)

This script as standard produces a disk image containing the install app.

There is also the related situation that for any other Mac model you still need to use the standard High Sierra 10.13.6 installer. This means that you almost certainly will have a need to at the moment use two different copies of the High Sierra install app.

The original Dan script assumes you are only going to have a single installer with the original standard file name.

My suggested enhancement is a modification of the script to mount a disk image containing the High Sierra installer. The High Sierra installer will still have its standard name but the disk images can be named uniquely to reflect their build number. This is how Greg's download script actually names the disk images.

So I used Greg's script on a new MacBook Pro 2018 model to download its 17G2112 build and make a disk image called - Install_macOS_10.13.6-17G2112.dmg and on an older Mac I used Greg's script to download the standard 17G65 build and make a disk image called - Install_macOS_10.13.6-17G65.dmg

These are both stored in the DeployStudio/Files directory which is where Dan's script looks for the installer.

I then modified Dan's script as follows -

#!/bin/sh

# Location of the image to be mounted
IMAGE="/tmp/DSNetworkRepository/Files/Install_macOS_10.13.6-17G2112.dmg"
#IMAGE="/tmp/DSNetworkRepository/Files/Install_macOS_10.13.6-17G65.dmg"

# Path to an empty folder where the contents of the image can be found
MOUNT="/Volumes/HighSierra"

# Do the magic
# -owners on = Honor file/folder permissions in image
# -nobrowse = Don't show in Finder (-mountpoint is still visible)
# -mountpoint = Attach to a folder.
/usr/bin/hdiutil attach -owners on -nobrowse -mountpoint "$MOUNT" "$IMAGE"

"$MOUNT/Install macOS High Sierra.app/Contents/Resources/startosinstall" --applicationpath "$MOUNT/Install macOS High Sierra.app" --volume "/Volumes/Macintosh HD" --agreetolicense --nointeraction

exit 0

This script could potentially be further enhanced as follows -

#!/bin/sh
# Find Mac model number
model=`system_profiler SPHardwareDataType | grep "Model Identifier" | awk '{print $3}'`
# Location of the image to be mounted
if [ "$model" == "MacBookPro15,1" ]; then
    IMAGE="/tmp/DSNetworkRepository/Files/Install_macOS_10.13.6-17G2112.dmg"
else
    IMAGE="/tmp/DSNetworkRepository/Files/Install_macOS_10.13.6-17G65.dmg"
fi

# Path to an empty folder where the contents of the image can be found
MOUNT="/Volumes/HighSierra"

# Do the magic
# -owners on = Honor file/folder permissions in image
# -nobrowse = Don't show in Finder (-mountpoint is still visible)
# -mountpoint = Attach to a folder.
/usr/bin/hdiutil attach -owners on -nobrowse -mountpoint "$MOUNT" "$IMAGE"

"$MOUNT/Install macOS High Sierra.app/Contents/Resources/startosinstall" --applicationpath "$MOUNT/Install macOS High Sierra.app" --volume "/Volumes/Macintosh HD" --agreetolicense --nointeraction

exit 0

If more models and disk images need to be considered you could use a case statement instead.

Offline

#27 2018-08-07 20:20:46

Peteo
Member
Registered: 2012-03-22

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

Looks good, but you could also just have the 2 different OS installers in their own folders and 2 scripts that are called from 2 different workflows until 10.13.7+ comes out.

Anyways would be nice for DS to be updated to handle using the official macOS installer now that these and probably future macs want signed OS's.

Last edited by Peteo (2018-08-07 20:21:08)

Offline

#28 2018-09-25 11:16:42

jelockwood
Member
Registered: 2009-11-11

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

For what it's worth a modified version of this script worked to install Mojave 10.14.

As per a different thread I have started I am not able to create either a Mojave NetBoot set or a Mojave USB boot set so I am having to use a High Sierra based runtime to install the Mojave OS.

Offline

#29 2018-09-26 16:50:09

ksalak
Member
Registered: 2017-11-30

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

> jelockwood wrote:

> For what it's worth a modified version of this script worked to install Mojave 10.14.

>As per a different thread I have started I am not able to create either a Mojave NetBoot set or a Mojave USB boot set so I am having to use a High Sierra based runtime to install the Mojave OS.


Would you mind sharing that script?
Thanks

Offline

#30 2018-09-26 17:17:06

jelockwood
Member
Registered: 2009-11-11

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

As requested here is the script to install Mojave.

• First you need to use a High Sierra boot image to run the DeployStudio Runtime. This could be a NetBoot image for older Macs or a USB boot drive for e.g. the MacBook Pro mid 2018
• Second you should start off by erasing the drive you intent to install Mojave on to as Mac Extended aka HFS+ (the Mojave installer will convert it to APFS if it is an SSD)
• Then you run via a DeployStudio workflow the following script

Currently it is not possible to use DeployStudio 1.7.8 to build a working Mojave NetBoot or USB boot image, hence the need to use a High Sierra one instead.

The Mojave installer is in a sparsebundle disk image downloaded/created using Greg Neagle's installinstallmacos.py script

The type of disk image is different to the High Sierra one and the location of the Mojave installer on it is also different.

#!/bin/sh

IMAGE="/tmp/DSNetworkRepository/Files/Install_macOS_10.14-18A391.sparseimage"

# Path to an empty folder where the contents of the image can be found
MOUNT="/Volumes/Mojave"

# Do the magic
# -owners on = Honor file/folder permissions in image
# -nobrowse = Don't show in Finder (-mountpoint is still visible)
# -mountpoint = Attach to a folder.
/usr/bin/hdiutil attach -owners on -nobrowse -mountpoint "$MOUNT" "$IMAGE"

"$MOUNT/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall" --applicationpath "$MOUNT/Applications/Install macOS Mojave.app" --volume "/Volumes/Macintosh HD" --agreetolicense --nointeraction

exit 0

Last edited by jelockwood (2018-09-26 17:19:33)

Offline

#31 2018-11-05 16:41:05

carlocarlo
Member
Registered: 2011-02-04

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

Hello jelockwood, I have tried creating an USB boot drive with Mojave using a standard MacOS installation and running the DS Runtime application on its own but the workflow for High Sierra fails (I would assume also thescript for Mojave your recently posted here would fail as well)
This is the error I get, it seems to refer to startosinstall missing parameters. Your script for High Sierra works perfectly when booted from Netboot with High Sierra (I would assume it would also run with an USB drive with High Sierra)

2018-11-05 16:27:42.609 DeployStudio Runtime.bin[314:4266] /dev/disk1s2        	Apple_HFS                      	/Volumes/HighSierra
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] Usage: startosinstall
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] Arguments
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --applicationpath, a path to copy of the OS installer application to start the install with.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --license, prints the user license agreement only.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --agreetolicense, agree to license the license you printed with --license.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --rebootdelay, how long to delay the reboot at the end of preparing. This delay is in seconds and has a maximum of 300 (5 minutes).
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --pidtosignal, Specify a PID to which to send SIGUSR1 upon completion of the prepare phase. To bypass "rebootdelay" send SIGUSR1 back to startosinstall.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --converttoapfs, specify either YES or NO on if you wish to convert to APFS.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --installpackage, the path of a package (built with productbuild(1)) to install after the OS installation is complete; this option can be specified multiple times.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --eraseinstall, Erase all volumes and install to a new one. Optionally specify the name of the new volume with --newvolumename.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --newvolumename, the name of the volume to be created with --eraseinstall.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] --usage, prints this message.
2018-11-05 16:27:42.653 DeployStudio Runtime.bin[314:4266] Example: startosinstall --converttoapfs YES 
2018-11-05 16:27:42.655 DeployStudio Runtime.bin[314:4266] -> Generic task action completed.
2018-11-05 16:27:42.655 DeployStudio Runtime.bin[314:4266] Task successful (elapsed time: 0.01 minutes)

When you say  it is not possible to use DeployStudio 1.7.8 to build a working Mojave NetBoot or USB boot image, do you refer to automating disk creation or using any disk with Mojave and DS Runtime?
Many thanks for your help!
Carlo

Offline

#32 2018-11-05 17:29:02

jelockwood
Member
Registered: 2009-11-11

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

@carlocarlo

As per http://www.deploystudio.com/Forums/viewtopic.php?id=8132 it is currently not possible to create either a Mojave NetBoot image or a Mojave USB DeployStudio Runtime drive.

As of today all Macs still can boot from High Sierra - although the MacBook Pro 2018 requires a custom build. (This custom build works on old models.)

A workaround for presumably the new MacBook Air 2018 and the Mac mini 2018 which ship later this week will be to make a normal full blown bootable Mojave drive (not a DeployStudio Runtime drive) and then install the DeployStudio software on that and manually run the Runtime.

If you boot from some sort of drive and run the DeployStudio runtime you can then use it to format the internal drive and to run the workflow which runs my script.

Offline

#33 2018-11-06 17:30:59

carlocarlo
Member
Registered: 2011-02-04

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

Hello and many thanks again
Yes indeed, something must have changed in Mojave…

I am trying to replicate the result I achieve with a 10.13.6 High Sierra Netboot image from server and DeployStudio and your script
The same workflow works if I use an external USB drive with 10.13.6 High Sierra

If I use Mojave on the external drive, DS Runtime works but the script fails and I can’t find the right option to use startoinstall

I would rather use Mojave on the external USB boot disk ideally to be able to install both 10.13.6 High Sierra (any version) and Mojave itself, so that it will be a sort of universal disk to use with DS server
Maybe the new MacMini will have a custom version of Mojave (or standard 10.14.1 build who knows)…

Anyway, I would be very grateful if you could keep me updated on your future tests
Have a great day and thank you
Carlo

Last edited by carlocarlo (2018-11-06 17:37:57)

Offline

#34 2018-11-09 16:11:45

jelockwood
Member
Registered: 2009-11-11

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

@carlocarlo

Ok, I received my Mac mini 2018 which only supports using Mojave. I created a standard external Mojave boot drive and installed DeployStudio Runtime on it. I was able to run then the DeployStudioRuntime and try various permutations of my previous script to use the startosinstall command.

My results and comments can be viewed here - https://jelockwood.blogspot.com/2018/11/apple-really-dont-want-you-to-use.html

To summarise. Apple supposedly removed the --volume option in High Sierra, for some reason it still works in a DeployStudio created High Sierra Runtime image. Since DeployStudio has not been fixed to allow successfully creating a Mojave DeployStudioRuntime image and instead you have to use a full Mojave boot drive the --volume parameter definitely does not work on a normal Mojave boot drive. Without the --volume parameter you have to run the installer targeting the drive you are booted from.

It is my feeling that Apple removed the --volume parameter specifically in order to try and kill off imaging approaches. :(

However AutoDMG has been updated to successfully create a Mojave thin image. It is possible to therefore go back to the previous approach of using DeployStudio to restore a thin image in APFS format for Mojave. Historically this approach - at least for High Sierra did not trigger installing firmware updates, so far the only Mac models that require booting from a Mojave drive do not yet need firmware updates so this is not yet a problem.

On a related topic in yet another case of Apple seemingly going out of their way to break things the EFIgy tool no longer works on Mojave or T2 equipped Mac models. As such it is no longer possible to check whether a Mac has the right version of EFI firmware. Apple have also changed the format of the version number returned for EFI firmware. :(

(In theory I can see a new approach EFIgy could use but this would require a relatively simple change to the software and a more significant update to the online database the authors maintained. So far there has been no response from the authors.)

I have now successfully made a Mojave 10.4.1 AutoDMG APFS image, used DeployStudio to restore it to a Mac mini 2018, and then run my normal post-restore tasks  as another DeployStudio workflow resulting in a fully built Mac. Hurrah!

Offline

#35 2018-11-09 16:40:33

carlocarlo
Member
Registered: 2011-02-04

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

@jelockwood
Many thanks for your time, detailed report and directions. This does explain why I could not install Mojave from my external USB boot drive with Mojave targeting the internal!
Also good to know we can still have some room for workarounds....
As far as firmware updates, usually they come with security updates, so I've just added a task to check for Apple's software updates within my second DS workflow (eg: after using startosinstall with HighSierra 10.13.6 - build 17G65 the OS is automatically updated to 17G3025 during my second workflow)
It would take one of those brand new MacBook air to see if macOS Mojave 10.14.1 Supplemental Update does change its firmware.
Interesting article here about firmware versions: https://eclecticlight.co/2018/10/31/which-efi-firmware-should-your-mac-be-using-version-3/

Last edited by carlocarlo (2018-11-09 16:43:39)

Offline

Board footer

Powered by FluxBB