Jump to content

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


  • Please log in to reply
16 replies to this topic

#1
wurst001

wurst001

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 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.applei...e-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.

#2
MSoK

MSoK

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 984 posts
  • Gender:Male
  • Location:Darlington UK

wurst001,

 

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

 

http://www.insanelym...r-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.



#3
wurst001

wurst001

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
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.

#4
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

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.



#5
flowrider

flowrider

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts
  • Gender:Male
  • Location:Arizona

I made my Mavericks install USB Flash Drive with this:

 

http://liondiskmaker.com

 

I used the previous version with ML to make both a DVD and USB install Drive, but the USB Drive is much faster than a DVD.  It Works like a charm.

 

Lou


  • kup likes this

#6
trungpt

trungpt

    InsanelyMac Protégé

  • Members
  • Pip
  • 38 posts

Why did Apple make it more complicated? :(



#7
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

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.


  • kup likes this

#8
trungpt

trungpt

    InsanelyMac Protégé

  • Members
  • Pip
  • 38 posts

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



#9
wurst001

wurst001

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts

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?

#10
NSCXP2005

NSCXP2005

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 610 posts
  • Location:Manchester UK
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?

#11
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Location:Manchester UK

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.



#12
sebus

sebus

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:UK

OK, I can create bootable .dmg via Donk's Fusion script from legal AS downloaded Maverick copy

 

It boots OK on ESXi (via NFS export)

 

But it will not install, there is not such option, it insists on signing to Apple Store

 

http://img819.images...9/8241/uczo.png

 

Am I missing something obvious?

 

sebus



#13
trungpt

trungpt

    InsanelyMac Protégé

  • Members
  • Pip
  • 38 posts

I don't know why Apple made these changes.



#14
wurst001

wurst001

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts

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.

#15
sebus

sebus

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 276 posts
  • Gender:Male
  • Location:UK

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



#16
wurst001

wurst001

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts

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.

#17
gnappoman

gnappoman

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts

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







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy