LoginSignup
3
3

More than 5 years have passed since last update.

YosemiteのISOイメージを作成

Posted at

手順

インストーラーが存在しない場合は、App Storeで事前にダウンロードしておいてください。

1.インストール用イメージをマウント

$ hdiutil attach /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

2.インストールイメージ内のBaseSystem.dmgをスパースイメージに変換

$ hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite

3.スパースイメージのディスクサイズを8GBまで拡張

$ hdiutil resize -size 8g /tmp/Yosemite.sparseimage

4.スパースイメージをマウント

$ hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

5.パッケージ一覧をYosemiteのものに差し替え

$ rm /Volumes/install_build/System/Installation/Packages
$ cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

6.ブータブルイメージにするため、BaseSystem.dmgとBaseSystem.chunklistをスパースイメージのルートにコピー

$ cp /Volumes/install_app/BaseSystem.dmg /Volumes/install_build/
$ cp /Volumes/install_app/Basesystem.chunklist /Volumes/install_build/

7.インストール用イメージとスパースイメージをアンマウント

$ hdiutil detach /Volumes/install_app
$ hdiutil detach /Volumes/install_build

8.イメージサイズを、8GB固定から実サイズまでストレッチ

$ hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage

9.スパースイメージをISOイメージへ変換

$ hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite

10.スパースイメージを削除

$ rm /tmp/Yosemite.sparseimage

以上です。

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