0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

macOSインストールAPP から ISOファイルを作成する方法

Posted at

macOS インストールAPPからISOファイルを作成する方法

macOS Sonoma を例に説明する。
他のOSバージョンでも基本的には同じである。その場合は、パス名の違いに注意すること。

1. App StoreからmacOS Sonomaをダウンロード

ただし、インストールはしない。もしもインストーラが起動されたらkillする。

ダウンロードが完了すると、アプリケーションフォルダにmacOS Sonomaインストール.appが作成される。

2. ターミナルからコマンドを実行

以下のコマンドを順に実行すると、デスクトップにSonoma.isoが作成される。

#空のディスクを作成
hdiutil create -o /tmp/Sonoma -size 16384m -volname Sonoma -layout SPUD -fs HFS+J

#作成したディスクをマウント
hdiutil attach /tmp/Sonoma.dmg -noverify -mountpoint /Volumes/Sonoma

#インストールメディアを作成
sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/Sonoma --nointeraction

#ディスクイメージをアンマウント
hdiutil eject -force /Volumes/Install\ macOS\ Sonoma

#CDRファイル作成
hdiutil convert /tmp/Sonoma.dmg -format UDTO -o ~/Desktop/Sonoma

#ISOファイルに変更
mv -v ~/Desktop/Sonoma.cdr ~/Desktop/Sonoma.iso

#不要になったDMGファイルを削除する
rm -fv /tmp/Sonoma.dmg

#不要ならインストールAppも削除する
rm -fv /Applications/Install\ macOS\ Sonoma.app

実施例

~ % hdiutil create -o /tmp/Sonoma -size 16384m -volname Sonoma -layout SPUD -fs HFS+J
created: /tmp/Sonoma.dmg

~ % hdiutil attach /tmp/Sonoma.dmg -noverify -mountpoint /Volumes/Sonoma
/dev/disk6          	Apple_partition_scheme         	
/dev/disk6s1        	Apple_partition_map            	
/dev/disk6s2        	Apple_HFS                      	/Volumes/Sonoma

~ % sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/Sonoma --nointeraction
Password:
Erasing disk: 0%... 10%... 20%... 30%... 100%
Copying essential files...
Copying the macOS RecoveryOS...
Making disk bootable...
Copying to disk: 0%... 10%... 20%... 100%
Install media now available at "/Volumes/Install macOS Sonoma"

~ % hdiutil eject -force /Volumes/Install\ macOS\ Sonoma
"disk6" ejected.

~ % hdiutil convert /tmp/Sonoma.dmg -format UDTO -o ~/Desktop/Sonoma
Driver Descriptor Map(DDM: 0)を読み込み中…
Apple(Apple_partition_map: 1)を読み込み中…
(Apple_Free: 2)を読み込み中…
disk image(Apple_HFS: 3)を読み込み中…
..............................................................................
経過時間: 28.419s
速度: 576.5Mバイト/秒
節約率: 0.0%
created: /Users/USERNAME/Desktop/Sonoma.cdr

~ % mv -v ~/Desktop/Sonoma.cdr ~/Desktop/Sonoma.iso
/Users/USERNAME/Desktop/Sonoma.cdr -> /Users/USERNAME/Desktop/Sonoma.iso

~ % rm -fv /tmp/Sonoma.dmg
/tmp/Sonoma.dmg

ほんの数分で完了する。

以上

0
3
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
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?