Karlson2k / k2k-OSX-Tools

Various tools for Mac OS X
79 stars 5 forks source link

trying to build a high Sierra iso Image #1

Open zdavatz opened 6 years ago

zdavatz commented 6 years ago

Hi

I am trying build a bootable iso image of high Sierra and I get the following output from your script:

Using "/Applications/Install macOS High Sierra.app".
Detecting macOS name for installation... macOS High Sierra
Creating temporary directory... succeed
Mounting InstallESD.dmg...
/dev/disk2              GUID_partition_scheme
/dev/disk2s1            EFI
/dev/disk2s2            Apple_HFS                       /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pzpR7qtz/InstallESD_dmg_mnt
Mounting succeed
Calculating required image size... hdiutil: imageinfo failed - Es existiert keine Datei und kein Ordner dieser Art
stat: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pzpR7qtz/InstallESD_dmg_mnt/BaseSystem.dmg: stat: No such file or directory
Can't calculate, will use 10737418240 (10240 MiB)
Checking for available disk space... 81762942976 (77975 MiB)
Checking for super user rights... Owned
Choosing creation method... Method 2
Creating installation image from BaseSystem.dmg...
hdiutil: create failed - Es existiert keine Datei und kein Ordner dieser Art
Error: Can't create writable image
Unmounting temporary mounted source image...
"disk2" unmounted.
"disk2" ejected.
Removing temporary files...

Thank you for your Feedback.

zdavatz commented 6 years ago

I am now testing this:

hdiutil create -o /tmp/HighSierra.cdr -size 5130m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso

from here: https://tylermade.net/2017/10/05/how-to-create-a-bootable-iso-image-of-macos-10-13-high-sierra-installer/

Karlson2k commented 6 years ago

I working on brand new version for High Sierra. PoC is functional already. After some polishing new version will be published.

zdavatz commented 6 years ago

Cool! In the mean time the other script worked! Running high Sierra on my Gentoo with qemu ;). Remaining problem: How do I change the screen resolution in qemu to a higher resolution?

Karlson2k commented 6 years ago

I'm using VMware with VMware guest tools. Resolution is changed automatically and clipboard is synced between host and guest.

13.12.2017 22:31, Zeno R.R. Davatz пишет:

Cool! In the mean time the other script worked! Running high Sierra on my Gentoo with qemu ;). Remaining problem: How do I change the screen resolution in qemu to a higher resolution?

zdavatz commented 6 years ago

Vmware on Linux?

Karlson2k commented 6 years ago

On all platforms. :)

Search for vmware unlocker.

13.12.2017 22:35, Zeno R.R. Davatz пишет:

Vmware on Linux?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Karlson2k/k2k-OSX-Tools/issues/1#issuecomment-351498528, or mute the thread https://github.com/notifications/unsubscribe-auth/ABz4xbXkfeA0bCbZM1sPHGeKdK2OCoSNks5tACcbgaJpZM4RAma3.

zdavatz commented 6 years ago

;). Ok but VMware is not really OSS ;)

zdavatz commented 6 years ago

Ah, maybe this: -vga vmware, https://wiki.gentoo.org/wiki/QEMU/Options#Graphics_card

joshenders commented 6 years ago

I encountered the same issue as @zdavatz and used the 6 lines in his post and it worked great

noscript commented 6 years ago

Worked for me as well, but I had to give -size 5200m to overcome this:

Failed to copy kernelcache, “prelinkedkernel” couldn’t be copied to “.IABootFiles”.
levifig commented 6 years ago

I feel terrible for "necro-ing" (though this is still open), but I'm getting this exact error with the latest script version… :(

$ sudo ./create_osx_install_iso.sh
Looking for downloaded OS upgrades... found
Several OS upgrades were found.
Which one OS upgrade do you want to use?
1) macOS High Sierra
2) macOS Mojave Beta
[1-2, q for quit]: 1
Using "/Applications/Install macOS High Sierra.app".
Detecting macOS name for installation... macOS High Sierra
Creating temporary directory... succeed
Mounting InstallESD.dmg...
/dev/disk5              GUID_partition_scheme
/dev/disk5s1            EFI
/dev/disk5s2            Apple_HFS                       /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir.4duLENrf/InstallESD_dmg_mnt
Mounting succeed
Calculating required image size... hdiutil: imageinfo failed - No such file or directory
stat: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir.4duLENrf/InstallESD_dmg_mnt/BaseSystem.dmg: stat: No such file or directory
Can't calculate, will use 10737418240 (10240 MiB)
Checking for available disk space... 308879454208 (294570 MiB)
Checking for super user rights... Owned
Choosing creation method... Method 2
Creating installation image from BaseSystem.dmg...
hdiutil: create failed - No such file or directory
Error: Can't create writable image
Unmounting temporary mounted source image...
"disk5" unmounted.
"disk5" ejected.
Removing temporary files...
$ 

Same thing with Mojave. FWIW, neither have a BaseSystem.dmg at the root of their mount point, which is probably why it can't find one… 🙄 Did Apple change something recently? Or am I doing something wrong? :)

joshenders commented 6 years ago

Can you rerun this with bash -x And share the output?

On Wed, Jul 18, 2018 at 4:45 PM Levi Figueira notifications@github.com wrote:

I feel terrible for "necro-ing" (though this is still open), but I'm still getting this exact error with the latest script version… :(

$ sudo ./create_osx_install_iso.sh Looking for downloaded OS upgrades... found Several OS upgrades were found. Which one OS upgrade do you want to use? 1) macOS High Sierra 2) macOS Mojave Beta

Using "/Applications/Install macOS High Sierra.app". Detecting macOS name for installation... macOS High Sierra Creating temporary directory... succeed Mounting InstallESD.dmg... /dev/disk5 GUID_partition_scheme /dev/disk5s1 EFI /dev/disk5s2 Apple_HFS /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir.4duLENrf/InstallESD_dmg_mnt Mounting succeed Calculating required image size... hdiutil: imageinfo failed - No such file or directory stat: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir.4duLENrf/InstallESD_dmg_mnt/BaseSystem.dmg: stat: No such file or directory Can't calculate, will use 10737418240 (10240 MiB) Checking for available disk space... 308879454208 (294570 MiB) Checking for super user rights... Owned Choosing creation method... Method 2 Creating installation image from BaseSystem.dmg... hdiutil: create failed - No such file or directory Error: Can't create writable image Unmounting temporary mounted source image... "disk5" unmounted. "disk5" ejected. Removing temporary files... $ ```

Same thing with Mojave. FWIW, neither have a BaseSystem.dmg at the root of their mount point, which is probably why it can't find one… 🙄 Did Apple change something recently? Or am I doing something wrong? :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Karlson2k/k2k-OSX-Tools/issues/1#issuecomment-406108182, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGrYMI3uiLwz8VAAvLMqGrgcm5SirgAks5uH8iggaJpZM4RAma3 .

levifig commented 6 years ago
$ sudo bash -x ./create_install_iso.sh
+ readonly script_org_name=create_install_iso.sh
+ script_org_name=create_install_iso.sh
+ unset work_dir script_name tmp_dir OSX_inst_name OSX_inst_inst_dmg_mnt OSX_inst_img_rw_mnt OSX_inst_img_rw_dev
+ work_dir=/[redacted]/OSX-KVM
+++ myreadlink ./create_install_iso.sh
++++ dirname ./create_install_iso.sh
+++ cd .
+++ [[ -L ./create_install_iso.sh ]]
++++ dirname ./create_install_iso.sh
+++ cd .
++++ basename ./create_install_iso.sh
+++ echo /[redacted]/OSX-KVM/create_install_iso.sh
++ dirname /[redacted]/OSX-KVM/create_install_iso.sh
+ script_dir=/[redacted]/OSX-KVM
+ cd /[redacted]/OSX-KVM
+ save_IFS='
'
+ export LANG=en_US.UTF-8
+ LANG=en_US.UTF-8
++ ps -o comm -p 10042
++ tail -n1
+ [[ bash =~ bash$ ]]
++ uname -s
+ [[ Darwin == Darwin ]]
+ trap '{ exit_code="$?"; cleanup; exit $exit_code; }' EXIT
+ trap '{ exit_with_error "unexpected interrupt at line $LINENO"; exit 255; }' SIGHUP SIGTERM SIGQUIT SIGINT SIGSTOP SIGTSTP
++ basename ./create_install_iso.sh
+ script_name=create_install_iso.sh
+ [[ -n create_install_iso.sh ]]
+ [[ -n create_install_iso.sh ]]
++ sed -n -e '\|^# Version| {s|^# Version \(.*$\)|\1|p; q;}' ./create_install_iso.sh
+ script_version='1.0.6 + local changes'
+ [[ -n 1.0.6 + local changes ]]
+ unset cmd_par_app cmd_par_iso test_name ver_opt cr_method
+ ver_opt=--noverify
+ inject_kexts=no
+ [[ -n '' ]]
+ [[ notset == \n\o\t\s\e\t ]]
+ [[ -z '' ]]
+ stage_start 'Looking for downloaded OS upgrades'
+ echo_enh_n 'Looking for downloaded OS upgrades... '
+ echo_term_ansi_m -n '1;97' 'Looking for downloaded OS upgrades... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Looking for downloaded OS upgrades... '
Looking for downloaded OS upgrades... + unset test_name
+ IFS='
'
+ dirlist=(`find /Applications -maxdepth 1 -mindepth 1 \( -name 'Install OS X *.app' -or -name 'Install macOS *.app' \)`)
++ find /Applications -maxdepth 1 -mindepth 1 '(' -name 'Install OS X *.app' -or -name 'Install macOS *.app' ')'
+ IFS='
'
+ [[ 2 -eq 0 ]]
+ stage_end_ok found
+ [[ -z found ]]
+ echo_positive found
+ echo_term_ansi_m '1;92' found
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo 'found'
found
+ [[ 2 -gt 1 ]]
+ echo 'Several OS upgrades were found.'
Several OS upgrades were found.
+ echo 'Which one OS upgrade do you want to use?'
Which one OS upgrade do you want to use?
+ valid_answers=()
+ unset test_name
+ (( i=0 ))
+ (( i<2 ))
+ test_name='macOS High Sierra.app'
+ echo '1) macOS High Sierra'
1) macOS High Sierra
+ valid_answers[$i]=1
+ (( i++ ))
+ (( i<2 ))
+ test_name='macOS Mojave Beta.app'
+ echo '2) macOS Mojave Beta'
2) macOS Mojave Beta
+ valid_answers[$i]=2
+ (( i++ ))
+ (( i<2 ))
+ read -n 1 -p '[1-2, q for quit]: ' answer
[1-2, q for quit]: 1+ echo ''

+ is_answer_valid 1 1 2 q
+ local answ=1
+ shift
+ [[ -n 1 ]]
+ [[ 1 == \1 ]]
+ return 0
+ [[ 1 == \q ]]
+ OSX_inst_app='/Applications/Install macOS High Sierra.app'
+ echo_enh 'Using "/Applications/Install macOS High Sierra.app".'
+ echo_term_ansi_m '1;97' 'Using "/Applications/Install macOS High Sierra.app".'
+ local n_param=
+ [[ 1;97 == \-\n ]]
+ [[ -z 1;97 ]]
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo 'Using "/Applications/Install macOS High Sierra.app".'
Using "/Applications/Install macOS High Sierra.app".
+ stage_start 'Detecting macOS name for installation'
+ echo_enh_n 'Detecting macOS name for installation... '
+ echo_term_ansi_m -n '1;97' 'Detecting macOS name for installation... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Detecting macOS name for installation... '
Detecting macOS name for installation... + unset test_name OSX_inst_prt_name
++ sed -n -e '\|<key>CFBundleDisplayName</key>| { N; s|^.*<string>\(.\{1,\}\)</string>.*$|\1|p; q; }' '/Applications/Install macOS High Sierra.app/Contents/Info.plist'
+ test_name='Install macOS High Sierra'
+ [[ -n Install macOS High Sierra ]]
+ OSX_inst_name='macOS High Sierra'
+ OSX_inst_prt_name='Install macOS High Sierra'
+ stage_end_ok 'macOS High Sierra'
+ [[ -z macOS High Sierra ]]
+ echo_positive 'macOS High Sierra'
+ echo_term_ansi_m '1;92' 'macOS High Sierra'
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo 'macOS High Sierra'
macOS High Sierra
+ stage_start 'Creating temporary directory'
+ echo_enh_n 'Creating temporary directory... '
+ echo_term_ansi_m -n '1;97' 'Creating temporary directory... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Creating temporary directory... '
Creating temporary directory... ++ mktemp -d -t osx_iso_tmpdir_XXX
+ tmp_dir=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1
+ stage_end_ok succeed
+ [[ -z succeed ]]
+ echo_positive succeed
+ echo_term_ansi_m '1;92' succeed
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo 'succeed'
succeed
+ stage_start_nl 'Mounting InstallESD.dmg'
+ stage_start 'Mounting InstallESD.dmg'
+ echo_enh_n 'Mounting InstallESD.dmg... '
+ echo_term_ansi_m -n '1;97' 'Mounting InstallESD.dmg... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Mounting InstallESD.dmg... '
Mounting InstallESD.dmg... + echo ''

+ OSX_inst_inst_dmg='/Applications/Install macOS High Sierra.app/Contents/SharedSupport/InstallESD.dmg'
+ OSX_inst_inst_dmg_mnt=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt
+ hdiutil attach '/Applications/Install macOS High Sierra.app/Contents/SharedSupport/InstallESD.dmg' -kernel -readonly -nobrowse -noverify -mountpoint /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt
/dev/disk4              GUID_partition_scheme
/dev/disk4s1            EFI
/dev/disk4s2            Apple_HFS                       /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt
+ OSX_inst_base_dmg=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt/BaseSystem.dmg
+ stage_end_ok 'Mounting succeed'
+ [[ -z Mounting succeed ]]
+ echo_positive 'Mounting succeed'
+ echo_term_ansi_m '1;92' 'Mounting succeed'
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo 'Mounting succeed'
Mounting succeed
+ stage_start 'Calculating required image size'
+ echo_enh_n 'Calculating required image size... '
+ echo_term_ansi_m -n '1;97' 'Calculating required image size... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Calculating required image size... '
Calculating required image size... + unset OSX_inst_inst_dmg_used_size OSX_inst_base_dmg_real_size OSX_inst_base_dmg_size
++ hdiutil imageinfo '/Applications/Install macOS High Sierra.app/Contents/SharedSupport/InstallESD.dmg' -plist
++ sed -En -e '\|<key>Total Non-Empty Bytes</key>| { N; s|^.*<integer>(.+)</integer>.*$|\1|p; q; }'
+ OSX_inst_inst_dmg_used_size=4961056768
++ hdiutil imageinfo /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt/BaseSystem.dmg -plist
++ sed -En -e '\|<key>Total Bytes</key>| { N; s|^.*<integer>(.+)</integer>.*$|\1|p; q; }'
hdiutil: imageinfo failed - No such file or directory
+ OSX_inst_base_dmg_real_size=
++ stat -f %z /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt/BaseSystem.dmg
stat: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt/BaseSystem.dmg: stat: No such file or directory
+ OSX_inst_base_dmg_size=
+ unset OSX_inst_base_dmg_size
+ (( OSX_inst_base_dmg_size=(OSX_inst_base_dmg_size/512)*512 ))
+ (( OSX_inst_inst_dmg_used_size ))
+ (( OSX_inst_base_dmg_real_size ))
+ (( OSX_inst_img_rw_size=10*1024*1024*1024 ))
+ stage_end_warn 'Can'\''t calculate, will use 10737418240 (10240 MiB)'
+ [[ -z Can't calculate, will use 10737418240 (10240 MiB) ]]
+ echo_warning 'Can'\''t calculate, will use 10737418240 (10240 MiB)'
+ echo_term_ansi_m '1;93' 'Can'\''t calculate, will use 10737418240 (10240 MiB)'
+ local n_param=
+ [[ 1;93 == \-\n ]]
+ [[ -z 1;93 ]]
+ local 'm_code=1;93'
+ shift
+ [[ -t 1 ]]
+ echo 'Can'\''t calculate, will use 10737418240 (10240 MiB)'
Can't calculate, will use 10737418240 (10240 MiB)
+ stage_start 'Checking for available disk space'
+ echo_enh_n 'Checking for available disk space... '
+ echo_term_ansi_m -n '1;97' 'Checking for available disk space... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Checking for available disk space... '
Checking for available disk space... + unset tmp_dir_free_space
++ df -bi /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1
++ sed -nE -e 's|^.+[[:space:]]+[0-9]+[[:space:]]+[0-9]+[[:space:]]+([0-9]+)[[:space:]]+[0-9]{1,3}%[[:space:]]+[0-9]+[[:space:]]+[0-9]+[[:space:]]+[0-9]{1,3}%[[:space:]]+/.*$|\1|p'
+ tmp_dir_free_space=602979416
+ [[ 602979416 == \n\o\t\s\e\t ]]
+ [[ -n 602979416 ]]
+ (( tmp_dir_free_space ))
+ (( tmp_dir_free_space*=512 ))
+ (( tmp_dir_free_space < OSX_inst_img_rw_size ))
+ stage_end_ok '308725460992 (294423 MiB)'
+ [[ -z 308725460992 (294423 MiB) ]]
+ echo_positive '308725460992 (294423 MiB)'
+ echo_term_ansi_m '1;92' '308725460992 (294423 MiB)'
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo '308725460992 (294423 MiB)'
308725460992 (294423 MiB)
+ stage_start 'Checking for super user rights'
+ echo_enh_n 'Checking for super user rights... '
+ echo_term_ansi_m -n '1;97' 'Checking for super user rights... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Checking for super user rights... '
Checking for super user rights... + unset have_su_rights use_sudo sudo_prf
++ id -u
+ [[ 0 != \0 ]]
+ have_su_rights=yes
+ [[ yes == \y\e\s ]]
+ use_sudo=no
+ sudo_prf=
+ [[ yes == \y\e\s ]]
+ stage_end_ok Owned
+ [[ -z Owned ]]
+ echo_positive Owned
+ echo_term_ansi_m '1;92' Owned
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo 'Owned'
Owned
+ stage_start 'Choosing creation method'
+ echo_enh_n 'Choosing creation method... '
+ echo_term_ansi_m -n '1;97' 'Choosing creation method... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Choosing creation method... '
Choosing creation method... + [[ -n '' ]]
+ [[ yes != \y\e\s ]]
+ (( tmp_dir_free_space < OSX_inst_img_rw_size*3 ))
+ cr_method=method2
+ stage_end_ok 'Method 2'
+ [[ -z Method 2 ]]
+ echo_positive 'Method 2'
+ echo_term_ansi_m '1;92' 'Method 2'
+ local n_param=
+ [[ 1;92 == \-\n ]]
+ [[ -z 1;92 ]]
+ local 'm_code=1;92'
+ shift
+ [[ -t 1 ]]
+ echo 'Method 2'
Method 2
+ unset img_bootable
+ [[ method2 == \m\e\t\h\o\d\1 ]]
+ [[ method2 == \m\e\t\h\o\d\2 ]]
+ [[ method2 == \m\e\t\h\o\d\1 ]]
+ [[ method2 == \m\e\t\h\o\d\2 ]]
+ stage_start_nl 'Creating installation image from BaseSystem.dmg'
+ stage_start 'Creating installation image from BaseSystem.dmg'
+ echo_enh_n 'Creating installation image from BaseSystem.dmg... '
+ echo_term_ansi_m -n '1;97' 'Creating installation image from BaseSystem.dmg... '
+ local n_param=
+ [[ -n == \-\n ]]
+ n_param=-n
+ shift
+ local 'm_code=1;97'
+ shift
+ [[ -t 1 ]]
+ echo -n 'Creating installation image from BaseSystem.dmg... '
Creating installation image from BaseSystem.dmg... + echo ''

+ OSX_inst_img_dmg_tmp=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/OS_X_Install.dmg
+ hdiutil create /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/OS_X_Install.dmg -srcdevice /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt/BaseSystem.dmg -layout ISOCD
hdiutil: create failed - No such file or directory
+ exit_with_error 'Can'\''t create writable image'
+ trap - SIGHUP SIGTERM SIGQUIT SIGINT SIGSTOP SIGTSTP EXIT
+ [[ -n Can't create writable image ]]
+ echo_error 'Error: Can'\''t create writable image'
+ echo_term_ansi_m '1;91' 'Error: Can'\''t create writable image'
+ local n_param=
+ [[ 1;91 == \-\n ]]
+ [[ -z 1;91 ]]
+ local 'm_code=1;91'
+ shift
+ [[ -t 1 ]]
+ echo 'Error: Can'\''t create writable image'
Error: Can't create writable image
+ cleanup
+ trap - SIGHUP SIGTERM SIGQUIT SIGINT SIGSTOP SIGTSTP EXIT
+ [[ -n /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1 ]]
+ [[ -e /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1 ]]
+ [[ -e '' ]]
+ [[ -e '' ]]
+ [[ -e /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt ]]
+ echo 'Unmounting temporary mounted source image...'
Unmounting temporary mounted source image...
+ hdiutil detach /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1/InstallESD_dmg_mnt -force
"disk4" unmounted.
"disk4" ejected.
+ echo 'Removing temporary files...'
Removing temporary files...
+ rm -fdR /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/osx_iso_tmpdir_XXX.pOwxm0w1
+ [[ '' > 0 ]]
+ exit 1

FWIW, inside the mount point for the InstallESD.dmg, all I have is a directory named Packages. Here's the layout:

/Volumes/InstallESD $ ls -Rlah
total 0
drwxr-xr-x   3 username  staff   170B Jul  4 04:41 .
drwxr-xr-x@ 11 root     wheel   374B Jul 18 21:43 ..
drwxr-xr-x   7 username  staff   238B Jul  4 14:41 Packages

./Packages:
total 9223320
drwxr-xr-x  7 username  staff   238B Jul  4 14:41 .
drwxr-xr-x  3 username  staff   170B Jul  4 04:41 ..
-rw-r--r--  1 username  staff   4.2G Jul  4 14:42 Core.pkg
-rw-r--r--  1 username  staff    57M Jul  4 14:42 EmbeddedOSFirmware.pkg
-rw-r--r--  1 username  staff   192M Jul  4 14:42 FirmwareUpdate.pkg
-rw-r--r--  1 username  staff   658K Jul  4 14:42 OSInstall.mpkg
-rw-r--r--  1 username  staff    11K Jul  4 14:42 SecureBoot.pkg

BaseSystem.dmg is inside the installer app bundle, in the same directory as InstallESD.dmg:

/Applications/Install macOS High Sierra.app/Contents/SharedSupport $ ls -lah
total 10177504
drwxr-xr-x   8 root  wheel   272B Jul 18 18:35 .
drwxr-xr-x  11 root  wheel   374B Jul  4 05:16 ..
-rw-r--r--   1 root  wheel   328B Jul 18 18:35 AppleDiagnostics.chunklist
-rw-r--r--   1 root  wheel   2.7M Jul 18 18:35 AppleDiagnostics.dmg
-rw-r--r--   1 root  wheel   1.9K Jul 18 18:35 BaseSystem.chunklist
-rw-r--r--   1 root  wheel   464M Jul 18 18:35 BaseSystem.dmg
-rw-r--r--   2 root  wheel   4.4G Jul 18 18:35 InstallESD.dmg
-rw-r--r--   1 root  wheel   1.4K Jun 29 00:55 InstallInfo.plist

Hope this helps! 👍

levifig commented 6 years ago

Just to be clear: I found another way to make these (mostly manually), but since this repo is basically the canonical one for this script (which I've used–and loved–in the past), I thought to post it here… :)

warent commented 5 years ago

Hey all, I encountered the same problem and found some ways around it.

First of all you'll probably want to update your install script since it hasn't been updated in ages. You can get the newest verison here https://github.com/kholia/OSX-KVM/blob/ab17ed4a38eb177c98d58e46cc791060e7528dbc/create_install_iso.sh

Then you'll want to change line 341 to OSX_inst_base_dmg="$OSX_inst_app"'/Contents/SharedSupport/BaseSystem.dmg' || exit_with_error

Finally, update line 530: tar -xOf "$OSX_inst_inst_dmg_mnt/Packages/Core.pkg" Payload | python "$script_dir/parse_pbzx.py" | cpio -idmu ./System/Library/Kernels || exit_with_error "Extraction of kernel failed"

No idea if this works with High Sierra but it seems happy with Mojave. BTW the reason why this works seems to be that Apple changed the locations and names of certain files.

twodice commented 5 years ago

Thanks - that worked fine for me.