1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macOS Mojaveのインストール用ISOイメージを作成する方法

Posted at

macOS Mojaveのインストール用ISOイメージを作成する方法

macOS MojaveをDVDのイメージを使用してインストールする必要が出たので、インストール用DVDの作するためのメモ

macOS High Sierraのインストール用ISOイメージを作成する方法」が参考にしていた、highsierra_bootable.shを参考にMojaveのイメージを作成する。

参考

手順

2層DVD-Rに焼くためにサイズを7316m→6500m、8965m→7800mに変更しているが、DVD-Rなので、Disk fullにならなければOKとしている。

# Mojave
# Generate a BaseSystem.dmg with 10.14 Install Packages
hdiutil attach '/Applications/Install macOS Mojave.app/Contents/SharedSupport/InstallESD.dmg' -noverify -mountpoint /Volumes/mojave
###hdiutil create -o /tmp/MojaveBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil create -o /tmp/MojaveBase.cdr -size 6500m -layout SPUD -fs HFS+J
hdiutil attach /tmp/MojaveBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source '/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.dmg' -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/macOS\ Base\ System/System/Installation/Packages
cp -R /Volumes/mojave/Packages '/Volumes/macOS Base System/System/Installation/.'
df -m '/Volumes/macOS Base System'
hdiutil detach '/Volumes/macOS Base System/'
hdiutil detach /Volumes/mojave/
mv /tmp/MojaveBase.cdr.dmg /tmp/BaseSystem.dmg


# Restore the 10.14 Installer's BaseSystem.dmg into file system and place custom BaseSystem.dmg into the root
###hdiutil create -o /tmp/Mojave.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil create -o /tmp/Mojave.cdr -size 7800m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source '/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.dmg' -target /Volumes/install_build -noprompt -noverify -erase
cp /tmp/BaseSystem.dmg '/Volumes/macOS Base System/.'
df -m '/Volumes/macOS Base System/.'


hdiutil detach '/Volumes/macOS Base System/'
hdiutil convert /tmp/Mojave.cdr.dmg -format UDTO -o /tmp/Mojave.iso
mv /tmp/Mojave.iso.cdr $PWD/Mojave.iso
rm /tmp/Mojave.cdr.dmg

実行した時のログ

$ sh -x mojave_bootable.sh 
+ hdiutil attach '/Applications/Install macOS Mojave.app/Contents/SharedSupport/InstallESD.dmg' -noverify -mountpoint /Volumes/mojave
/dev/disk3          	GUID_partition_scheme          	
/dev/disk3s1        	EFI                            	
/dev/disk3s2        	Apple_HFS                      	/Volumes/mojave
+ hdiutil create -o /tmp/MojaveBase.cdr -size 6500m -layout SPUD -fs HFS+J
created: /tmp/MojaveBase.cdr.dmg
+ hdiutil attach /tmp/MojaveBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
/dev/disk4          	Apple_partition_scheme         	
/dev/disk4s1        	Apple_partition_map            	
/dev/disk4s2        	Apple_HFS                      	/Volumes/install_build
+ asr restore -source '/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.dmg' -target /Volumes/install_build -noprompt -noverify -erase
	Validating target...done
	Validating source...done
	Retrieving scan information...done
	Validating sizes...done
	Restoring  ....10....20....30....40....50....60....70....80....90....100
	Restored target device is /dev/disk4s2.
	Remounting target volume...done
+ rm '/Volumes/macOS Base System/System/Installation/Packages'
+ cp -R /Volumes/mojave/Packages '/Volumes/macOS Base System/System/Installation/.'
+ df -m '/Volumes/macOS Base System'
Filesystem   1M-blocks Used Available Capacity iused      ifree %iused  Mounted on
/dev/disk4s2      6499 6490         9   100%   50317 4294916962    0%   /Volumes/macOS Base System
+ hdiutil detach '/Volumes/macOS Base System/'
"disk4" ejected.
+ hdiutil detach /Volumes/mojave/
"disk3" ejected.
+ mv /tmp/MojaveBase.cdr.dmg /tmp/BaseSystem.dmg
+ hdiutil create -o /tmp/Mojave.cdr -size 7800m -layout SPUD -fs HFS+J
created: /tmp/Mojave.cdr.dmg
+ hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
/dev/disk3          	Apple_partition_scheme         	
/dev/disk3s1        	Apple_partition_map            	
/dev/disk3s2        	Apple_HFS                      	/Volumes/install_build
+ asr restore -source '/Applications/Install macOS Mojave.app/Contents/SharedSupport/BaseSystem.dmg' -target /Volumes/install_build -noprompt -noverify -erase
	Validating target...done
	Validating source...done
	Retrieving scan information...done
	Validating sizes...done
	Restoring  ....10....20....30....40....50....60....70....80....90....100
	Restored target device is /dev/disk3s2.
	Remounting target volume...done
+ cp /tmp/BaseSystem.dmg '/Volumes/macOS Base System/.'
+ df -m '/Volumes/macOS Base System/.'
Filesystem   1M-blocks Used Available Capacity iused      ifree %iused  Mounted on
/dev/disk3s2      7799 7702        97    99%   50313 4294916966    0%   /Volumes/macOS Base System
+ hdiutil detach '/Volumes/macOS Base System/'
"disk3" ejected.
+ hdiutil convert /tmp/Mojave.cdr.dmg -format UDTO -o /tmp/Mojave.iso
Driver Descriptor Map(DDM: 0)を読み込み中…
Apple(Apple_partition_map: 1)を読み込み中…
disk image(Apple_HFS: 2)を読み込み中…
.................................................................................................................................................................................................................
経過時間: 58.685s
速度: 132.9Mバイト/秒
節約率: 0.0%
created: /tmp/Mojave.iso.cdr
+ mv /tmp/Mojave.iso.cdr /tmp/mkISO/Mojave.iso
+ rm /tmp/Mojave.cdr.dmg
$

出来上がった Mojave.iso を使用してVMWareで起動したから、おそらく2層DVD-Rでも行けるかも。。。。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?