Jump to content
InsanelyMac Forum
wurst001

How to create a bootable ISO from the Mavericks InstallESD.dmg

Recommended Posts

For some reason, Apple decided that the InstallESD.dmg that comes with the Mavericks Install as downloaded from the App Store shouldn't be a bootable DVD image anymore. In earlier times, all you needed to do was to convert that InstallESD.dmg into an ISO and you could install OS X in VMWare from scratch. Starting with OS X Mavericks, you need to do a more complicated procesdure. Find a shell script below. It's an enhanced version of the script found at

http://forums.appleinsider.com/t/159955/howto-create-bootable-mavericks-iso

 

#!/bin/bash
ESD=$1
TMP=$2

if [ -z "$ESD" ] || [ -z "$TMP" ]; then
	echo usage: "'$0' /path/to/esd /path/to/tmpdir"
	exit 1
fi
if ! [ -e "$ESD" ]; then
	echo "file '$ESD' does not exist"
	exit 1
fi
if ! [ -e "$TMP" ]; then
	echo "dir '$TMP' does not exist"
	exit 1
fi

MPAPP=/Volumes/install_app
MPIMG=/Volumes/install_img
IMGSPARSE=$TMP/install.sparseimage
IMGDVD=$TMP/install.cdr

detach_all() {
  if [ -d "$MPAPP" ]; then hdiutil detach "$MPAPP"; fi
  if [ -d "$MPIMG" ]; then hdiutil detach "$MPIMG"; fi
}
exit_all() {
  echo +++ Command returned with error, aborting ...
  exit 2
}

trap detach_all EXIT
trap exit_all ERR

echo +++ Trying to unmount anything from previous run
detach_all

echo +++ Mount the installer image
hdiutil attach "$ESD" -noverify -nobrowse -readonly -mountpoint "$MPAPP"

echo +++ Convert the boot image to a sparse bundle
rm -f "$IMGSPARSE"
hdiutil convert "$MPAPP"/BaseSystem.dmg -format UDSP -o "$IMGSPARSE"

echo +++ Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 6g "$IMGSPARSE"

echo +++ Mount the sparse bundle for package addition
hdiutil attach "$IMGSPARSE" -noverify -nobrowse -readwrite -mountpoint "$MPIMG"

echo +++ Remove Package link and replace with actual files
rm -f "$MPIMG"/System/Installation/Packages
cp -rp "$MPAPP"/Packages "$MPIMG"/System/Installation/

echo +++ Unmount the installer image
hdiutil detach "$MPAPP"

echo +++ Unmount the sparse bundle
hdiutil detach "$MPIMG"

echo +++ Resize the partition in the sparse bundle to remove any free space
hdiutil resize -sectors min "$IMGSPARSE"

echo +++ Convert the sparse bundle to ISO/CD master
rm -f "$IMGDVD"
hdiutil convert "$IMGSPARSE" -format UDTO -o "$IMGDVD"

echo +++ Remove the sparse bundle
rm "$IMGSPARSE"


echo "Done"
echo "Find your DVD at '$IMGDVD'"
The first parameter to the script is the path to InstallESD.dmg which is part of the Mavericks Installer if you downloaded it from the App Store. The second parameter is the path to a directory (such as /tmp) with at least 16GB space.

Share this post


Link to post
Share on other sites
Advertisement

wurst001,

 

Thanks for the information, the ability to create a bootable DMG was first posted by Donk, see link below:

 

http://www.insanelymac.com/forum/topic/290949-how-to-install-os-x-108-mountain-lion-and-os-x-109-mavericks-in-vmware-workstation-910-or-player-56/?p=1956505

 

The DMG can be used in ESXi 5.5 and also in Workstation 10, and does not need conversion to an ISO as is required for OS X 10.7 or OS X 10.8, even in Workstation 10.

Share this post


Link to post
Share on other sites

OK, Donk's script is very similar. The way Don't script computes the size of the dmg looks a bit funny. However, thanks for the link.

The script comes from VMware, and part of Fusion.

Share this post


Link to post
Share on other sites

They didn't.

 

1. Script here to create DMG

2. VMware Fusion script to create DMG

3. LionMaker

4. Apple have a utility in the Mavericks iunstaller ap itself to make one - createinstallmedia

 

So really no different on making one before.

Share this post


Link to post
Share on other sites

They didn't.

 

1. Script here to create DMG

2. VMware Fusion script to create DMG

3. LionMaker

4. Apple have a utility in the Mavericks iunstaller ap itself to make one - createinstallmedia

 

So really no different on making one before.

 

Thank you for reply. I will try the new Mac OS X on VMWare Workstation soon. I'm having Mac OSX 10.8 on VmWare Workstaion 9 :D

Share this post


Link to post
Share on other sites

I made my Mavericks install USB Flash Drive with this:

http://liondiskmaker.com

The new version doesn't seem to be able to make DVD images anymore, which is a pity.

 

They didn't.

As I wrote, the InstallESD.dmg used to be a bootable dmg. Not anymore. So the question is why they made it more complicated is pretty legitimate! To save space maybe?

 

4. Apple have a utility in the Mavericks iunstaller ap itself to make one - createinstallmedia

I wasn't able to get a copy of that tool, so I couldn't try it. Is it capable of creating bootable DVDs?

Share this post


Link to post
Share on other sites

I have tried the script and all I get under terminal is permission denied for some reason even though I gave it sudo -s

 

Any ideas why it is doing this?

Share this post


Link to post
Share on other sites

The new version doesn't seem to be able to make DVD images anymore, which is a pity.

 

As I wrote, the InstallESD.dmg used to be a bootable dmg. Not anymore. So the question is why they made it more complicated is pretty legitimate! To save space maybe?

 

I wasn't able to get a copy of that tool, so I couldn't try it. Is it capable of creating bootable DVDs?

createinstallmedia is only for USB or a partition. http://support.apple.com/kb/HT5856. Maybe it can be pointed to an empty DMG? Have used it to create an install USB stick but not against a DMG.

 

UPDATE: Yes you can copy to a DMG if you already have created one.

Share this post


Link to post
Share on other sites

Am I missing something obvious?

I can't see your problem. What happens if you chose "Reinstall OS X" from the list and click continue?

I have tried the script and all I get under terminal is permission denied for some reason even though I gave it sudo -s

 

Any ideas why it is doing this?

Can you post a screenshot?

Also, you don't need to do a sudo.

Share this post


Link to post
Share on other sites

It asks to sign in to Apple Store, so it can download Maverick. Kind of pointless, as it booted from Maverick converted image in first place...

I see no need for another 4 Gb download

Share this post


Link to post
Share on other sites

It asks to sign in to Apple Store, so it can download Maverick. Kind of pointless, as it booted from Maverick converted image in first place...

I see no need for another 4 Gb download

And are you sure that the bootable image was created successfully? It sounds like the packages have not been copied over.

Share this post


Link to post
Share on other sites

createinstallmedia is only for USB or a partition. http://support.apple.com/kb/HT5856. Maybe it can be pointed to an empty DMG? Have used it to create an install USB stick but not against a DMG.

 

UPDATE: Yes you can copy to a DMG if you already have created one.

 

Hello, would you please be explicit on how to pass from this command

 

/Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia

 

to a working bootable iso image of Mavericks?

 

Thank you very much indeed,

G

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×