[HowTo] Create OSX ISO from the OSX Install app

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

IOOI wrote:Any chance this script will be adapted to work with Install macOS High Sierra Beta.app?
Not an easy one. This is not a complete installer, this is a stub. The installation files are not included, they're downloaded on the fly. Investigating, but don't keep your hopes too high.

I would suggest cloning and updating an existing VM.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
IOOI
Posts: 74
Joined: 14. Nov 2014, 18:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OPENSTEP, Mac OS X, FreeBSD, Windows

Re: [Howto] Create OSX ISO from the OSX Install app

Post by IOOI »

socratis wrote:I would suggest cloning and updating an existing VM.
I tried this and it did not work. It just rebooted. Somebody having success?
IOOI
Posts: 74
Joined: 14. Nov 2014, 18:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OPENSTEP, Mac OS X, FreeBSD, Windows

Re: [Howto] Create OSX ISO from the OSX Install app

Post by IOOI »

Today I moved a minor step forward:

Thanks to user granada29 I found this tip, it includes doing changes in the EFI during reboot:

https://raimue.blog/2017/06/09/upgradin ... ent-118682

Basically you start upgrading an existing 10.12 VM: download the updater app, launch it, start the installation. When the VM reboots, break into EFI (here I had to press fn-F8, the article talks about F12 (fn-F12 is mapped to show the macOS dashboard here), once in EFI you launch the EFI-Shell and enter the following commands:

Code: Select all

Shell> fs1:
FS1:\> cd "macOS Install Data"
FS1:\macOS Install Data\> cd "Locked Files"
FS1:\macOS Install Data\Locked Files\> cd "Boot Files"
FS1:\macOS Install Data\Locked Files\Boot Files\> boot.efi
I did this but ended up with this error:

Code: Select all

Read error 0xe
Error loading kernel cache (0xe)
is anyone having any ideas?

thanks,

IOOI
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

@IOOI
You're starting to deviate seriously from the title of the thread. This has nothing to do with creating an ISO.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

New version out.

2017-07-25
  • When using the dry-run it doesn't check for anything anymore. Not the existence of the installer nor the available free space.
  • Trimming of the free space from the sparsebundle is back.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
joseluisbz
Posts: 57
Joined: 26. Jan 2017, 19:18
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, macOS, CentOS

Re: [Howto] Create OSX ISO from the OSX Install app

Post by joseluisbz »

Hi Socratis, Before with macOs Sierra 10.12.3 this method and was working perfectly. Infortunatelly I deleted the Install macOS Sierra.app (10.12.3 version) now with 10.12.6 is not working anymore...
The problem is identified:
IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0, now 0, sm 0x0
on https://www.virtualbox.org/ticket/16644...
NOTE: I renamed Install macOS Sierra.app to Install macOS Sierra 10.12.6.app

My method with 10.12.3 and I tryed to use with 10.12.6 was:

Code: Select all

		hdiutil attach "/Volumes/ADATAHD/SoftwareDownloads/MAC/Install macOS Sierra 10.12.6.app/Contents/SharedSupport/InstallESD.dmg" -nobrowse -noverify -mountpoint /Volumes/esd

		hdiutil create -o "macOS Sierra 10.12.6 Installer.cdr" -size 7.5g -layout SPUD -fs HFS+J

		hdiutil attach "macOS Sierra 10.12.6 Installer.cdr.dmg" -nobrowse -noverify -mountpoint /Volumes/iso

		asr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/iso -noprompt -noverify -erase
		rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages 

		cp -rp /Volumes/esd/Packages /Volumes/OS\ X\ Base\ System/System/Installation
		cp -rp /Volumes/esd/BaseSystem.* /Volumes/OS\ X\ Base\ System/

		hdiutil detach /Volumes/esd
		hdiutil detach /Volumes/OS\ X\ Base\ System
		mv macOS\ Sierra\ 10.12.6\ Installer.cdr.dmg /Volumes/ADATAHD/SoftwareDownloads/MAC/macOS\ Sierra\ 10.12.6\ Installer.iso
The next sentence is not used by me because I discover that using cmp commands the files are the same.

Code: Select all

		hdiutil convert OSXInstaller.cdr.dmg -format UDTO -o OSXInstaller.iso
		cmp OSXInstaller.iso OSXInstaller.cdr.dmg
I want to know if its possible introducing new sentences to fix the problem:
IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0, now 0, sm 0x0
I was reading your script named InstallerApp2ISO.sh.
and
https://github.com/jonanh/osx-vm-templa ... are_vdi.sh
But my level is not enough to discover how to fix it.

Please help me.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

joseluisbz wrote:I deleted the Install macOS Sierra.app (10.12.3 version) now with 10.12.6 is not working anymore...
Yes. I know. I have a big notice with bold red letters at the beginning of the thread, did you read it? I was also the one that opened ticket #16644, for that same reason. Do you believe that if there was a solution, I wouldn't have posted it?

There is no solution yet...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
joseluisbz
Posts: 57
Joined: 26. Jan 2017, 19:18
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, macOS, CentOS

Re: [Howto] Create OSX ISO from the OSX Install app

Post by joseluisbz »

Sorry, I understand all contrary, your post works with >= 10.12.4... Sorry.

Have you a 10.12.3 original app? I can't download again from apple.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

The ISO creation works fine. VirtualBox will not boot from it. It's due to the EFI implementation that VirtualBox has. And here is a response I received directly from a developer:
  • socratis: Speaking of EFI, have you guys had a chance to look at why 10.12.4 and greater do not boot in VirtualBox?
  • Developer: No. Given that there is zero customer interest in OS X guests, it has very low priority.
I hope that this clears it...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
joseluisbz
Posts: 57
Joined: 26. Jan 2017, 19:18
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, macOS, CentOS

Re: [Howto] Create OSX ISO from the OSX Install app

Post by joseluisbz »

Sorry, but Have you a celan copy of macOS Sierrra 10.12.3?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

You could ask Apple to make the installers available (yeah, right). I'm not allowed to give it out. Neither are you allowed to ask ;)

There is an article out there which uses the information from the AppStore to perform a direct download of macOS Sierra, so you could use that to download the installer. I have not tried it, and the article doesn't mention which 10.12 version that is. But, if that doesn't work, there is also an El Capitan article, so you could create a VM with 10.11 and upgrade that to 10.12. Again, I have not tried either of them, I'm just doing you a favor and use Google when you could/should...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, OSX
Location: U S of A

Re: [Howto] Create OSX ISO from the OSX Install app

Post by ChipMcK »

ChipMcK wrote:Most people are lazy.
untmdsprt
Posts: 16
Joined: 14. Apr 2010, 18:47
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS X
Location: Kansas City, MO

Re: [Howto] Create OSX ISO from the OSX Install app

Post by untmdsprt »

Darn, I was hoping this would cover Lion as I have the install app from the app store and wish to install it in Virtualbox. If I have to, I can find my DVD of Snow Leopard I believe and make an ISO and go about it that way.

Going from Lion on an old 2007 Macbook to Sierra on a 2017 imac is quite a jump. :)
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Howto] Create OSX ISO from the OSX Install app

Post by socratis »

You have a Lion installer? That's a first. Where did you get it from? What format is it? And can you do an "ls -alR" on that installer?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
joseluisbz
Posts: 57
Joined: 26. Jan 2017, 19:18
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, macOS, CentOS

Re: [Howto] Create OSX ISO from the OSX Install app

Post by joseluisbz »

joseluisbz wrote:Sorry, but Have you a celan copy of macOS Sierrra 10.12.3?
Reply to my self.

I found a 10.12.3 version, In the future I can Found in my own link [Mod edit: Link removed]

until the problem for version >= 10.12.4 is fixed in VirtualBox.
Last edited by socratis on 16. Oct 2017, 02:06, edited 1 time in total.
Reason: Removed URL.
Post Reply