I know what happened, but I don't know how to continue from the recovery console after fixing it. Maybe someone knows how to continue the "Apple way".
As As with most of the old installers re-downloaded from the App Store (and apparently in the recovery console too) the InstallESD.dmg
is a XAR
archive rather than a regular compressed DMG
. The DMG
is inside the XAR
archive and has to be extracted. I was installing on the USB labeled Untitled
so the commands for the conversion are:
cd /Volumes/Untitled/macOS\ Install\ Data/
/usr/bin/hdiutil attach InstallESD.dmg -nobrowse
cd /Volumes/OS\ X\ Install\ ESD/Packages/
installer -pkg OSInstall.mpkg -target /Volumes/Sierra/ -verboseR
To create a USB Install disk follow this:
- Attach
InstallESD.dmg
(if not already attached):
/usr/bin/hdiutil attach /Volumes/Untitled/macOS\ Install\ Data/InstallESD.dmg -nobrowse
I
/usr/bin/hdiutil usedattach a/Volumes/OS\ USBX\ stickInstall\ labeledESD/BaseSystem.dmg `Untitled`-nobrowse
- Get the disk name of the BaseSystem.dmg:
diskutil tolist installvirtual `macOS| Sierra`grep from"OS Recovery.X AppleBase createsSystem"
a folder1: named `macOS Install Data` in the root of the USB volume with the required files:
pkgutil --expand /Volumes/Untitled/macOS\ Install\ Data/InstallESD.dmg /Volumes/Untitled/Sierra
mv /Volumes/Untitled/Sierra/InstallOS.pkg/InstallESD.dmg /Volumes/Untitled/macOS\ Install\ Data/InstallESD.dmg
rm -r /Volumes/Untitled/Sierra
After that you canApple_HFS useOS anotherX USBBase toSystem create the installer:
- Attach `InstallESD 2.dmg`:0 GB disk9s1
hdiutil attach /Volumes/Untitled/macOS\ Install\ Data/InstallESD.dmg
- Find the USB number with
diskutil list
- Format the USB:
-diskutil AttachpartitionDisk `BaseSystem.dmg`disk7 HFS+ USBSTICK 100%
hdiutil attach /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg
- Get the details of the USBSTICK:
- Getdiskutil thelist
/dev/disk7 disk(external, namephysical):
of the BaseSystem.dmg#: TYPE NAME SIZE IDENTIFIER
diskutil list virtual | grep "OS X Base System"
1: Apple_HFS OS X Base System 2.0 GB disk9s1
- Find the USB0: number with `diskutil list` GUID_partition_scheme *15.7 GB disk7
- Format the USB1: EFI EFI 209.7 MB disk7s1
diskutil partitionDisk disk7 HFS+ USBSTICK 100%
- Get the details2: of the Apple_HFS USBSTICK: 15.4 GB disk7s2
diskutil list
/dev/disk7 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *15.7 GB disk7
1: EFI EFI 209.7 MB disk7s1
2: Apple_HFS USBSTICK 15.4 GB disk7s2
- Restore "
OS X Base System
" onto Apple_HFS USBSTICK
-asr Restorerestore "`OS--source X/dev/disk9s1 Base--target System`"/dev/rdisk7s2 onto--erase `Apple_HFS--noprompt USBSTICK`--noverify
asr restore --source /dev/disk9s1 --target /dev/rdisk7s2 --erase --noprompt --noverify
- Remove the symlink for
Packages
folder:
- Removerm the-r symlink/Volumes/OS\ forX\ `Packages`Base\ folder:System/System/Installation/Packages
rm -r /Volumes/OS\ X\ Base\ System/System/Installation/Packages
- Copy the
Packages
folder to "OS X Base System
" Volume inside /System/Installation/
subfolder:
- Copy the `Packages`cp folder-rpv to/Volumes/OS\ "`OSX\ XInstall\ BaseESD/Packages System`"/Volumes/OS\ VolumeX\ insideBase\ `System/System/Installation/` subfolder:Packages
cp -rpv /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/Packages
- Copy
BaseSystem.chunklist
and BaseSystem.dmg
to the root of the USB installer:
-cp Copy/Volumes/OS\ `BaseSystem.chunklist`X\ andInstall\ `BaseSystemESD/BaseSystem.dmg`chunklist to"/Volumes/OS theX rootBase ofSystem"
cp the/Volumes/OS\ USBX\ installer:Install\ ESD/BaseSystem.dmg "/Volumes/OS X Base System"
cp /Volumes/OS\ X\ Install\ ESD/BaseSystem.chunklist "/Volumes/OS X Base System"
cp /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg "/Volumes/OS X Base System"
- Detach the mounted images:
-/usr/bin/hdiutil Detachdetach the/Volumes/OS\ mountedX\ images:Install\ ESD
hdiutil detach /Volumes/OS\ X\ Install\ ESD
hdiutil detach /Volumes/OS\ X\ Base\ System
/usr/bin/hdiutil detach /Volumes/OS\ X\ Base\ System