8

I am creating an El Capitan Virtual Box on my Mac. This is the process I take. I pressed some keys (it says any) as shown in second image, but I get nowhere. What should I do to move from here?

  1. I double click the "El Capitan" option

    enter image description here

  2. This is the screen that opens next.

    enter image description here

  3. This is how I specified the elcap.dmg. This is the dmg file of Install OS X El Capitan.app

    enter image description here

Nothing is happening. What am I doing wrong?

11

The dmg file (Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg) is no bootable image.

To create a bootable file use the following script. You may have to modify some paths (i.e. the user name in the last line and the path to Install OS X El Capitan.app (and the inner InstallESD.dmg file) in the 6th line):

#!/bin/bash  

# Create bootable El Capitan ISO

# Mount the installer image  
hdiutil attach "/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/esd

# Create empty cdr image  
hdiutil create -o ElCapitan.cdr -size 8000m -layout SPUD -fs HFS+J

# Mount the cdr image  
hdiutil attach ElCapitan.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/iso

# Restore Base System to the cdr image 
asr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/iso -noprompt -noverify -erase

# Remove Package link and replace with actual files  
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages

# Copy Base System  
cp -rp /Volumes/esd/Packages /Volumes/OS\ X\ Base\ System/System/Installation
cp -rp /Volumes/esd/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/
cp -rp /Volumes/esd/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/

# Unmount the installer image  
hdiutil detach /Volumes/esd

# Unmount the cdr image  
hdiutil detach /Volumes/OS\ X\ Base\ System

# Convert the cdr to ISO/CD master 
hdiutil convert ElCapitan.cdr.dmg -format UDTO -o ElCapitan.iso

# Rename the ISO and move it to the desktop  
mv ElCapitan.iso.cdr $HOME/Desktop/ElCapitan.iso

# Clean up temporary file
rm ElCapitan.cdr.dmg

Paste the content in a text editor to a new document as plain text and save it as prepare_elcapitan_cdr.sh on your desktop.

Open Terminal, chmod the script and execute it:

chmod +x ~/Desktop/prepare_elcapitan_cdr.sh
cd ~/Desktop
./prepare_elcapitan_cdr.sh

Detach elcap.dmg from the VM. Use the final ElCapitan.iso as installer iso and attach it to the virtual SATA Port 1. You can delete the ElCapitan.cdr.dmg file.

| improve this answer | |
  • Great stuff! Thank you! Do you happen to know what is the appropriate storage space to reserve for this VB? According to support.apple.com/kb/SP728?locale=en_US it's 8.8GB. I reserved 30GB and I am still getting an error "There is not enough free space on OS X Base System to install" – sanjihan Apr 5 '16 at 7:09
  • 1
    I opened a new question apple.stackexchange.com/questions/233823/… – sanjihan Apr 5 '16 at 8:11
  • @sanjihan Thanks – this question and your other question link above helped me with installing El Capitan in VirtualBox on OS X. Also, this page was of help with some problems along the way, including if conversion fails (force eject and run that hdutil convert line again) and black screen on boot (change the motherboard chipset to PIIX3 if you have increased RAM from 2 Gb). – PAN Sep 8 '16 at 8:14
  • Don't thank me. @klanomath is the real MVP – sanjihan Sep 9 '16 at 20:42
  • That first line in the script fails for me with Sierra. Error is: hdiutil: attach failed - No such file or directory. I know the path to the InstallESD.dmg is correct because I dragged-and-dropped from the Finder to the Terminal. What is /Volumes/esd? Should I have created a volume? My line: hdiutil attach "/Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/esd – Basil Bourque Oct 31 '16 at 0:08
0

I tested klanomoath's accepted answer to this question using a Mac mini (2018) running macOS Catalina Version 10.15.4. I needed to make the following changes.

  • I downloaded InstallMacOSX.dmg from the Apple website How to upgrade to OS X El Capitan. The file was placed in my Downloads folder. After downloading, the file needs to be opened with the Finder Application.
  • The first command in klanomoath's answer is given below.

    # Create bootable El Capitan ISO
    
    # Mount the installer image  
    hdiutil attach "/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/esd
    

     
    This above command needs to be replaced with the commands given below. A temporary folder named El Capitan will be created in your Downloads folder.

    # Create bootable El Capitan ISO
    
    # Extract the files from the downloaded file
    hdiutil attach "$HOME"/Downloads/InstallMacOSX.dmg
    rm -rf /tmp/El\ Capitan
    pkgutil --expand /Volumes/Install\ OS\ X/InstallMacOSX.pkg /tmp/El\ Capitan
    diskutil eject Install\ OS\ X
    cd /tmp/El\ Capitan
    
    # Mount the installer image  
    hdiutil attach InstallMacOSX.pkg/InstallESD.dmg  -noverify -nobrowse -mountpoint /Volumes/esd
    

     

  • The last two commands in klanomoath's answer are given below.

    # Rename the ISO and move it to the desktop  
    mv ElCapitan.iso.cdr $HOME/Desktop/ElCapitan.iso
    
    # Clean up temporary file
    rm ElCapitan.cdr.dmg
    

     
    These above commands need to be replaced with the commands given below.

    # Rename the ISO and move it to the Downloads folder  
    mv ElCapitan.iso.cdr "$HOME"/Downloads/ElCapitan.iso
    
    # Clean up temporary folder
    cd "$HOME"
    rm -r /tmp/El\ Capitan
    

     

  • When executing the command, you may an error message similar to the one given below. The question System hangs when creating bootable disk drive addresses this error.

    asr: Couldn't personalize volume /Volumes/OS X Base System
    

     

  • I needed to enter the following command before starting the the virtual machine named El Capitan.

    Note: I needed to enter these commands, because El Capitan can not be installed on a 2018 Mac mini. If El Capitan can be installed on your Mac, then you probably do not need to enter these commands.

    VBoxManage setextradata "El Capitan" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "Macmini6,2"
    VBoxManage setextradata "El Capitan" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
    VBoxManage setextradata "El Capitan" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-F65AE981FFA204ED"
    VBoxManage setextradata "El Capitan" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
    VBoxManage setextradata "El Capitan" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
    VBoxManage modifyvm "El Capitan" --cpuidset 00000001 000106e5 06100800 0098e3fd bfebfbff
    

     

References

forums.virtualbox.org

| improve this answer | |

You must log in to answer this question.

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