Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

High Sierra Notes

Elliot Jordan edited this page Apr 12, 2018 · 14 revisions

These notes were based on an imaging workflow that is not officially supported by Apple. Please see the startosinstall notes page for an Apple approved method of installing High Sierra.

The current release of Imagr supports running in macOS 10.13 High Sierra and restoring APFS volumes. However, the following should be noted when testing.

Important! When you restore an APFS disk image it will wipe the entire device, not just the partition you specify. For most users, this won't be an issue, but you should be aware of this if you use Imagr with multiple partitions.

What needs testing?

The following still needs extensive testing on macOS High Sierra (10.13):

  • Restoring both HFS and APFS images
  • Running scripts at both during the Imagr run and during first boot
  • Installing packages at both during the Imagr run and during first boot
  • Partitioning and formatting disks

Your nbi

Currently, only AutoNBI images support booting into 10.13. This is the tool that is used during make nbi.

Firmware

To be able to boot from a APFS formatted disk on a Mac that has never had APFS before, the target Mac's firmware needs to be updated. An update package can be generated using the following script (thanks to Greg Neagle & Pepijn Bruienne for their work on this).

The script requires a copy of High Sierra in your /Applications folder. A full .app is required (not a stub installer)

#!/bin/sh
# Based on investigations and work by Pepijn Bruienne
# Expects a single /Applications/Install macOS High Sierra*.app on disk

IDENTIFIER="com.foo.FirmwareUpdateStandalone"
VERSION=1.0

# find the Install macOS High Sierra.app and mount the embedded InstallESD disk image
echo "Mounting High Sierra ESD disk image..."
/usr/bin/hdiutil mount /Applications/Install\ macOS\ High\ Sierra*.app/Contents/SharedSupport/InstallESD.dmg

# expand the FirmwareUpdate.pkg so we can copy resources from it
echo "Expanding FirmwareUpdate.pkg"
/usr/sbin/pkgutil --expand /Volumes/InstallESD/Packages/FirmwareUpdate.pkg /tmp/FirmwareUpdate

# we don't need the disk image any more
echo "Ejecting disk image..."
/usr/bin/hdiutil eject /Volumes/InstallESD

# make a place to stage our pkg resources
/bin/mkdir -p /tmp/FirmwareUpdateStandalone/scripts

# copy the needed resources
echo "Copying package resources..."
/bin/cp /tmp/FirmwareUpdate/Scripts/postinstall_actions/update /tmp/FirmwareUpdateStandalone/scripts/postinstall
# add an exit 0 at the end of the script
echo "" >> /tmp/FirmwareUpdateStandalone/scripts/postinstall
echo "" >> /tmp/FirmwareUpdateStandalone/scripts/postinstall
echo "exit 0" >> /tmp/FirmwareUpdateStandalone/scripts/postinstall
/bin/cp -R /tmp/FirmwareUpdate/Scripts/Tools /tmp/FirmwareUpdateStandalone/scripts/

# build the package
echo "Building standalone package..."
/usr/bin/pkgbuild --nopayload --scripts /tmp/FirmwareUpdateStandalone/scripts --identifier "$IDENTIFIER" --version "$VERSION" /tmp/FirmwareUpdateStandalone/FirmwareUpdateStandalone.pkg

# clean up
/bin/rm -r /tmp/FirmwareUpdate
/bin/rm -r /tmp/FirmwareUpdateStandalone/scripts

The resulting package (located at /tmp/FirmwareUpdateStandalone/FirmwareUpdateStandalone.pkg) should be used in a package component that is installed during the Imagr run (so first_boot should be <false/>).

<dict>
    <key>first_boot</key>
    <false/>
    <key>type</key>
    <string>package</string>
    <key>url</key>
    <string>http://imagr/pkgs/FirmwareUpdateStandalone.pkg</string>
</dict>
<dict>
    <key>type</key>
    <string>image</string>
    <key>url</key>
    <string>http://imagr/dmgs/macOS_10.13.apfs.dmg</string>
</dict>

Disk format

You should format any existing HFS disks as APFS using Disk Utility before restoring an APFS disk image into it.