myspaghetti / macos-virtualbox

Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
GNU General Public License v2.0
13.46k stars 1.11k forks source link

Stuck on the very last script stage after partitioning. #571

Closed Dustylab closed 2 years ago

Dustylab commented 2 years ago

Hi magician,

I'm running : elementary OS 6.1 Jólnir (Ubuntu 20.04.3 LTS) AMD Ryzen 7 4800h 16Go RAM Plenty of free ssd Virtualbox 6.1.26

My script tweaks are: 4 cpu 6Go RAM Intel Xeon CPU profil

I've ran several times the script but always end on the very last action with two bash windows, after partitioning, with no progress bar, whatever the passing time. See the pic.

Thanks for your help!

Catalina VM no final boot

myspaghetti commented 2 years ago

Hi, thanks for the bug report, and sorry the script didn't conclude the installation.

Something went wrong with startosinstall.sh, apparently /Install*.app (for example /Install macOS Mojave.app) which was supposed to be populated in one of the previous stages is missing, possibly the stage failed silently.

If you run find /Install*.app you should see a bunch of installation files (importantly, /Install*.app/Contents/Resources/startosinstall) and if they're not there, the stage populate_bootable_installer_virtual_disk must have failed silently.

If startosinstall is there, you can just run it manually, for example /Install*.app/Contents/Resources/startosinstall --agreetolicense --volume "/Volumes/macOS"

If startosinstall is not there, further information about what happens in populate_bootable_installer_virtual_disk would be useful in troubleshooting this bug.

If startosinstall is there we can assume populate_bootable_installer_virtual_disk succeeds in populating /Install*.app, and further troubleshooting would be needed for populate_bootable_installer_virtual_disk. Cancel (with CTRL-C) /Volumes/target-sh/startosinstall.sh just before it runs or stop the script right before the script asks to run Terminal, then run Terminal and run the script-within-the-script verbosely from the guest Terminal with bash -x /Volumes/target-sh/startosinstall.sh

Dustylab commented 2 years ago

Hi, no there is no such thing as startoinstall folder, but lot of stuff there anyway.

Canceled /Volumes/target-sh/startosinstall.sh then re run it and something more happend:

bolognese-1

For the sake of the sake, my populate_bootable_installer_virtual_disk is like this: --iprt-iso-maker-file-marker-bourne-sh be9f6d42-0540-2b8c-7a2d-575f3d9a045f --volume-id=bootinst-sh /bootinst.sh="macOS_bootinst.txt"

And bootinst.txt: # this script is executed on the macOS virtual machine disks="$(diskutil list | grep -o "\*[0-9][^ ]* [GTP]B *disk[0-9]$" | grep -o "[0-9].*")" && \ disks="$(echo "${disks}" | sed -e "s/\.[0-9] T/000.0 G/" -e "s/\.[0-9] P/000000.0 G/" | sort -gr | grep -o disk[0-9] )" && \ disks=(${disks[@]}) && \ if [ -z "${disks}" ]; then echo "Could not find disks"; fi && \ [ -n "${disks[0]}" ] && \ diskutil partitionDisk "/dev/${disks[0]}" 1 GPT JHFS+ "Install" R && \ asr restore --source "/Volumes/Catal-files/BaseSystem.dmg" --target /Volumes/Install --erase --noprompt && \ app_path="$(ls -d "/Volumes/"*"Base System 1/Install"*.app)" && \ install_path="${app_path}/Contents/SharedSupport/" && \ mkdir -p "${install_path}" && cd "/Volumes/Catal-files/" && \ cp *.chunklist *.plist *.dmg "${install_path}" && \ echo "" && echo "Copying the several-GB InstallESD.dmg to the installer app directory" && echo "Please wait" && \ if [ -s "${install_path}/InstallESD.dmg" ]; then \ rm -f "${install_path}/InstallESD.dmg" ; fi && \ for part in InstallESD.part*; do echo "Concatenating ${part}"; cat "${part}" >> "${install_path}/InstallESD.dmg"; done && \ sed -i.bak -e "s/InstallESDDmg\.pkg/InstallESD.dmg/" -e "s/pkg\.InstallESDDmg/dmg.InstallESD/" "${install_path}InstallInfo.plist" && \ sed -i.bak2 -e "/InstallESD\.dmg/{n;N;N;N;d;}" "${install_path}InstallInfo.plist" && \ shutdown -h now

How can I have more info about what happen in populate_bootable_installer_virtual_disk phase?

The content of the host folder :

bolognese 3 bolognese 4

Thanks and happy 22 bolognese!

myspaghetti commented 2 years ago

Happy 2022, may StackOverflow answer all our questions.

Looks like populate_bootable_installer_virtual_disk failed, since startosinstall does not exist. It means that the command asr restore ... that executes on the guest during that stage did not successfully restore all the files to the virtual disk.

If you don't mind, please run on the host ./macos-virtualbox-install.sh troubleshoot and post the resulting macOS-troubleshoot.txt file here.