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.51k stars 1.12k forks source link

Recovering Catalina_InstallESD.part files #449

Closed arnaud-roland closed 3 years ago

arnaud-roland commented 3 years ago

Hi, First thanks for the script, installation process worked perfectly.

The thing is I was running out of space and by mistake (not really a mistake actually ...) I've deleted the Catalina_InstallESD.part files. I thought it was just some installation files not needed anymore...

Is there a way to recover or extract them (like from Catalina_InstallESDDMG.pkg ) while keeping the state of the virtual machine ? Or I need to re-create a vm from scratch ?

Thanks

myspaghetti commented 3 years ago

Thank you!

I thought it was just some installation files not needed anymore...

They aren't needed! They are an exact copy of the file Catalina_InstallESDDMG.pkg and they're split so they can be delivered into the virtual machine through a virtual ISO. The script uses the VirtualBox VISO format, which presents itself as an ISO 9660 file system, and macOS does not support ISO 9660 file system files that are larger than 2GB like InstallESDDmg.pkg, so InstallESDDMG.pkg has to be split, and the script splits it into 1,000,000,000 byte files.

You can split it with the following command:

split --verbose -a 2 -d -b 1000000000 "Catalina_InstallESDDmg.pkg" "Catalina_InstallESD.part"

However, in the interest of saving space, you can delete all the files on the script directory except the Catalina_bootable_installer.vdi file which is the only file necessary to create new macOS virtual machines. Simply create an empty .vdi file that's large enough for macOS (25GB or more), boot the bootable installer, run Disk Utility and erase/format the empty virtual disk to HFS+ or APFS, then run the command-line installer (or the graphical installer, but it tends to crash in the VM).

arnaud-roland commented 3 years ago

This is just perfect, so many thanks !!!