Assuming you would go into recovery and format the data carrier on which macOS is installed, where would the DMG be located from which you booted with "CMD + R", because as far as I know it is also on the hard drive and would be like that can be deleted with.

I guess this DMG is loaded into the main memory for a short time, I don't know if it's true. What next?

  • 1
    The short answer is it depends. What part of macOS recovery has you stuck? support.apple.com/guide/mac-help/… The oldest hardware had several methods to boot and the newest has very different options. Knowing the model number of the Mac or the OS version would help us help you. – bmike Feb 15 at 14:43

First of all, the process has evolved as newer versions of OS X and macOS have been released. Basically, you have the right idea. When booting to macOS Recovery, one or more ramdisks are created. The operating system then executes from these ramdisks. The drive (data carrier) where one wishes to install macOS can then be erased and formatted as an APFS container with a single volume. (This step is more complex when two drives are used in a fusion arrangement.) The installation files (which can consist of nested PKG and DMG files) are then downloaded from the internet. Recently, Apple published an article which gives some insight on how this may be accomplished. Here a private/tmp folder is created in the installation volume. The curl command is used to download installation files to this folder. The installation proceeds until the Mac boots to the newly installed Big Sur. Since the the installation files exist in private/tmp, these installation files are automatically erased at this point. The article refers to an installation on Macs with the M1 chip, however the downloaded software is also compatible with Macs with Intel processors.

The use of ramdisks, when either installing or booting to recovery, is not unique to macOS. When installing Linux, Grub executes an initrd command which loads a ramdisk file to memory. Windows loads a ramdisk file which is assigned the drive letter X:.

  • Amazing, thank you so much for this useful information – Darwin OS X Feb 15 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .