9

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.

  • 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). – Winterflags 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

You must log in to answer this question.

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