Page 2 of 6

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

Posted: 15. Jun 2017, 01:55
by IOOI
socratis wrote:Now, to your error. I need to see the exact command line. Something about your destination directory is not right.
the command line was:

Code: Select all

./InstallerApp2iso.sh -i Install\ macOS\ Sierra.app -o ./

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

Posted: 15. Jun 2017, 02:21
by socratis
Doh! :shock:
I never actually tested for the current directory being the destination. Some routines must be "confused". I'll do some testing and hopefully fix it. Thankfully it's just "cosmetic", because the ISO seems to have been created. Will check tomorrow morning...

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

Posted: 15. Jun 2017, 11:05
by socratis
Hey IOOI,
I was unable to duplicate your problem. The problem seems to be with calculating the amount of free space in your destination directory. The same calculation works just fine for the temporary directory, so something is different about your "working"/destination directory which causes the script to choke.

Please post the output of the following commands, run from/at the same location where you had the problem:

Code: Select all

pwd
df ./
df ./ | awk '/[0-9]%/{print $(NF-5)}'
Thanks in advance...

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

Posted: 16. Jun 2017, 14:04
by david.portabella
Thanks for sharing this script.
Would you please mind publishing the script to github, so that we can know we are downloading the latest version and patches can be proposed?

Cheers,
David

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

Posted: 16. Jun 2017, 14:16
by socratis
What's wrong with this location? I don't really want to have another account. This *is* the latest and greatest version. Patches of course are more than welcomed (if not required)... ;)

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

Posted: 16. Jun 2017, 14:20
by david.portabella
I get two errors when using the script:

Code: Select all

29:60: execution error: Finder got an error: Can’t get window "OS X Install ESD". (-1728)
33:66: execution error: Finder got an error: Can’t get window "OS X Base System". (-1728)
full log:

Code: Select all

$ ./InstallerApp2iso.sh --installer /Volumes/Install\ OS\ X\ El\ Capitan/Install\ OS\ X\ El\ Capitan.app --output /david/Desktop/
================================================================================
Apple OSX Installer Application to ISO creation tool
================================================================================
Version: 2017-05-17
Copyright (C) 2017, socratis @ VirtualBox forums.
All rights reserved.

- OSX version: attempting automatic OSX detection from the InstallerApp...
/dev/disk2          	GUID_partition_scheme
/dev/disk2s1        	EFI
/dev/disk2s2        	Apple_HFS                      	/Volumes/InstallESD
- OSX version detected: 10.11.5 (15F34)
"disk4" unmounted.
"disk4" ejected.
"disk2" unmounted.
"disk2" ejected.
--------------------------------------------------------------------------------
The conversion will use the following parameters:
    - Installer application   : /Volumes/Install OS X El Capitan/Install OS X El Capitan.app
    - Destination directory   : /david/Desktop (59 GiB/61 GB free)
    - Temporary directory     : /tmp (59 GiB/61 GB free)
    - OSX version scripts     : 10.11/10.12 scripts for version 10.11.5 (15F34)
    - Verbosity level         : 1
    - Calculate ISO checksum  : 0
    - Dry-run cmd. output     : 0

************************   I M P O R T A N T   ************************
Please understand that there is feedback for most processes, but not
for all of them, such as copying and moving. They can take up to ten
minutes or more, depending on your HD speed. If you selected a network
location or an external HD, these times can vary a lot.
***********************************************************************

Continue? (Yes/No)
yes


Conversion script started on: 2017-06-16 14:10:50 CEST
--------------------------------------------------------------------------------

Mount the installer image...
--------------------------------------------------------------------------------
/dev/disk2          	GUID_partition_scheme
/dev/disk2s1        	EFI
/dev/disk2s2        	Apple_HFS                      	/Volumes/InstallESD
29:60: execution error: Finder got an error: Can’t get window "OS X Install ESD". (-1728)

Create 10.11.5 blank ISO image with a Single Partition - Apple Partition Map...
--------------------------------------------------------------------------------
created: /tmp/10.11.5.sparseimage

Mount the sparse bundle for package addition...
--------------------------------------------------------------------------------
/dev/disk4          	Apple_partition_scheme
/dev/disk4s1        	Apple_partition_map
/dev/disk4s2        	Apple_HFS                      	/Volumes/OS X Base System

Restore the Base System into the 10.11.5 ISO image...
--------------------------------------------------------------------------------
	Validating target...done
	Validating source...done
	Retrieving scan information...done
	Validating sizes...done
	Restoring  ....10....20....30....40....50....60....70....80....90....100
	Remounting target volume...done
33:66: execution error: Finder got an error: Can’t get window "OS X Base System". (-1728)

Remove Package link and replace with actual files... (go get some coffee)
  *** TIP *** You can press 'Ctrl-T' to watch the copying progress...
--------------------------------------------------------------------------------

Unmount the installer image...
--------------------------------------------------------------------------------
"disk2" unmounted.
"disk2" ejected.

Unmount the sparse bundle...
--------------------------------------------------------------------------------
"disk4" unmounted.
"disk4" ejected.

Convert the sparse bundle to ISO/CD master... (this could take until next year)
--------------------------------------------------------------------------------
Reading Driver Descriptor Map (DDM : 0)…
Reading Apple (Apple_partition_map : 1)…
Reading disk image (Apple_HFS : 2)…
.....................................................................................................................................................................
Elapsed Time: 28.692s
Speed: 285.5Mbytes/sec
Savings: 0.0%
created: /tmp/10.11.5.cdr

Remove the sparse bundle...
--------------------------------------------------------------------------------

Rename the ISO and move it to its destination...
This can take a * really * long time if the destination is on the network...
--------------------------------------------------------------------------------

Conversion script ended at         : 2017-06-16 14:12:09 CEST
Conversion script took a total of  : 1 min, 17 sec (77 s).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
!!!  DONE !!!
--------------------------------------------------------------------------------
You can find the OSX 10.11.5 installation DVD in:
/david/Desktop/10.11.5.iso


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

Posted: 16. Jun 2017, 14:32
by socratis
david.portabella wrote:I get two errors when using the script:

Code: Select all

29:60: execution error: Finder got an error: Can’t get window "OS X Install ESD". (-1728)
33:66: execution error: Finder got an error: Can’t get window "OS X Base System". (-1728)
Thanks for the feedback! However, these aren't "actual" errors, so you can safely ignore them. Here's what happens...

When the disk images get mounted, there is an explicit flag telling the Finder NOT to show a window of the mounted image ("hdiutil attach ... -nobrowse"). For unknown reasons, sometimes the Finder decides not to listen. There were complaints (and naturally) that this left a "phantom" Finder window. So, I decided to tell the Finder to explicitly close that window (osascript -e "tell application \"Finder\" to close window XYZ" > /dev/null). If (for yet unknown reasons) the Finder doesn't open the window in the first place, that error occurs...

I should make a note about that...

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

Posted: 18. Jun 2017, 03:11
by IOOI
socratis wrote:Hey IOOI,
Please post the output of the following commands, run from/at the same location where you had the problem:

Code: Select all

pwd
df ./
df ./ | awk '/[0-9]%/{print $(NF-5)}'
Thanks in advance...

Code: Select all

MBP15:Mac OS X Installer lars$ pwd
/Volumes/BackUp 1/BackUps/Software/Mac OS X Installer
MBP15:Mac OS X Installer lars$ df ./
Filesystem   512-blocks       Used  Available Capacity   iused     ifree %iused  Mounted on
/dev/disk4s2 3906357344 2614868776 1291488568    67% 326858595 161436071   67%   /Volumes/BackUp 1
MBP15:Mac OS X Installer lars$ df ./ | awk '/[0-9]%/{print $(NF-5)}'
67%
MBP15:Mac OS X Installer lars$ 

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

Posted: 18. Jun 2017, 10:38
by socratis
Thank you IOOI. The "space" in the volume name was throwing the script off. The following should print the appropriate number of available blocks, when run from that path:

Code: Select all

df ./ | awk 'NR>1 {print $4}'
I have updated the script.

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

Posted: 23. Jun 2017, 23:34
by justechn
Thank you for a great script
socratis wrote:Yes, I've been following that as well. But that's not a solution, that's a workaround at best. Problem is the VirtualBox is unable to start a VM with a native 10.12.5. But this is not the thread for such a discussion, no? There are at least two more dedicated threads about this.
You should put this in the list of known issues, even though it is not your issue, it is still a known issue. I spent a couple hours trying to figure out why vitrualbox was not booting the iso.

Also you should really move this to github or something similar. It is much better for this kind of project.

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

Posted: 24. Jun 2017, 09:07
by socratis
justechn wrote:Thank you for a great script
Glad you liked/used it ;)
justechn wrote:You should put this in the list of known issues, even though it is not your issue, it is still a known issue.
Already done; #16644: Installation of clean OSX 10.12.4 fails. As soon as 10.12.4 came out...
justechn wrote:Also you should really move this to github or something similar. It is much better for this kind of project.
I'm open to ideas, but I still have not gotten a solid reason. If it's just to move it for the sake of it, that's not good enough. And I really hate opening new accounts, so it has to be a really compelling reason...

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

Posted: 30. Jun 2017, 21:24
by IOOI
Any chance this script will be adapted to work with Install macOS High Sierra Beta.app?

Code: Select all

./InstallerApp2iso.sh -i Install\ macOS\ High\ Sierra\ Beta.app -o ./

================================================================================
Apple OSX Installer Application to ISO creation tool
================================================================================
Version: 2017-07-18
Copyright (C) 2017, socratis @ VirtualBox forums.
All rights reserved.

- OSX version: attempting automatic OSX detection from the InstallerApp...
/dev/disk4          	GUID_partition_scheme          	
/dev/disk4s1        	EFI                            	
/dev/disk4s2        	Apple_HFS                      	/Volumes/InstallESD
hdiutil: attach failed - Es existiert keine Datei und kein Ordner dieser Art
translation: No file or folder of this kind exists

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

Posted: 30. Jun 2017, 21:27
by socratis
I do not have my hands on a 10.13b yet, I'm not a paid Apple developer, just a freeloader ;). Once they go public, I will take a look at it. In the mean time, try to give it the "-x 10.12" parameter. See what happens...

I have a bad feeling about this...

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

Posted: 30. Jun 2017, 21:37
by IOOI
IOOI wrote:

Code: Select all

/dev/disk4s2        	Apple_HFS                      	/Volumes/InstallESD
hdiutil: attach failed - Es existiert keine Datei und kein Ordner dieser Art
BaseSystem's location changed, it is now in

Code: Select all

$MY_INSTAPP/Contents/SharedSupport/BaseSystem.dmg

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

Posted: 30. Jun 2017, 21:40
by IOOI
socratis wrote:I do not have my hands on a 10.13b yet, I'm not a paid Apple developer, just a freeloader ;). Once they go public, I will take a look at it. In the mean time, try to give it the "-x 10.12" parameter. See what happens...

I have a bad feeling about this...
Public Beta was released just yesterday. No paid account required. I am not paying either. Just go to https://beta.apple.com/sp/betaprogram/ and register