Jump to content

Making a bootable High Sierra USB Installer Entirely From Scratch in Windows or Linux Mint (without access to Mac or App Store Installer.app)

High Sierra Vanilla Installer Windows Boot Disk Utility TransMac Paragon Partition Manager Linux Mint No access to Mac Bootable USB Installer

  • Please log in to reply
7 replies to this topic

#1
fusion71au

fusion71au

    InsanelyMac Legend

  • Gurus
  • 877 posts
  • Gender:Male

Making a High Sierra USB Installer Entirely From Scratch in Windows

This is a proof of concept tutorial, to show it's possible to create a vanilla High Sierra installer, entirely from scratch, in Windows (even without App Store downloaded "Install macOS High Sierra.app" from a real Mac :whistle:).  @PikeRAlpha's link to Apple's Software Catalog provides us with all the URLs necessary to download the needed files directly from Apple instead of some dubious source from the internet...

 

Attached File  Apple SW Catalog URLs Pike's Universum.png   170.48KB   12 downloads

Pre-Requisites

  1. 8GB or larger USB drive
  2. Boot Disk Utility v2.1.2017rev021b from @CVAD
  3. TransMac (free 15 day trial)
  4. Paragon Hard Disk Manager Free

 

Download Installer Files Directly from Apple

1)  Browse Apple's Regular Software Catalog and find the URLs to download the following 6 installer files...

  1. BaseSystem.dmg
  2. BaseSystem.chunklist
  3. InstallInfo.plist
  4. InstallESDDmg.pkg
  5. AppleDiagnostics.dmg
  6. AppleDiagnostics.chunklist

(Hint - search page for "InstallESD" to find its URL and others nearby)

Attached File  Apple SW Catalog Find InstallESD in browser.png   567.33KB   20 downloads

 

to a folder named "SharedSupport" on your Windows NTFS drive.  A browser download manager (eg Chrono for Chrome, dTA for FireFox) is handy since InstallESD is >4GB ---> allows you to pause/resume interrupted download...

 

Attached File  Apple SW Catalog List of Download Manager Downloads.png   412.5KB   14 downloads

2)  Rename InstallESDDmg.pkg to InstallESD.dmg

Spoiler

 

3)  Edit InstallInfo.plist with WordPad/text editor to remove the chunklistURL and chunklistid keys for InstallESD, and renaming it from InstallESDDmg.pkg to InstallESD.dmg (example of edited file attached to this post)...

 

Spoiler

 

 

Boot Disk Utility to format the Installer USB and Restore OS X Base System HFS partition
1.  Format USB with BDU & latest Clover ---> creates boot files in CLOVER partition + second FAT partition

 

Spoiler

2.  Extract 4.hfs from \SharedSupport\BaseSystem.dmg with BDU --> save to it's local folder

 

Spoiler

3.  Restore 4.hfs to USB second partition with BDU --->  2nd partition becomes bootable "OS X Base System"

Spoiler

 

 

 

Paragon Hard Disk Manager to extend HFS Partition to its Full Extent
Open Paragon Partition Manager Free and resize the second partition of the USB drive to the full size allowed.  Don't forget to apply the changes at the end...

Spoiler

 

 

Transmac to Copy "SharedSupport" folder to OS X Base System

1.  Open the TransMac program and navigate to the HFS+ Volume/Install macOS High Sierra.app/Contents folder.  Right click anywhere in the empty space on the RHS pane and select "Copy Here"...

Spoiler

 

2.  In the next stage, select the "SharedSupport" folder we created above as the "Files and Folders to be copied to the Mac Volume"...

Spoiler

 

 

 

 

Clover Settings

Clover configuration is required now.  The default config.plist (in the Clover FAT32 partition of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with Wordpad or Notepad.

 

The location of the important configuration files for Clover are summarized below

  • config.plist--->EFI/CLOVER folder
  • DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist)
  • Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other. NB BootDiskUtility by default already has FakeSMC.kext installed here.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work.
  • If UEFI booting, you will most likely need one of the OsxAptioFixDrv-64 drivers copied from /EFI/CLOVER/drivers-off/drivers64UEFI to /EFI/CLOVER/drivers64UEFI.

 

If you want to use the installer to run High Sierra in Windows on VMware, you can follow my guide to set up the Virtual Machine and replace Clover's default config with EFI_Clover for VMware (which is compatible to run in VMware).  In the screenshots below, I have attached the USB Installer (in this case PhysicalDrive7) to my macOS Virtual Machine.  Reboot the system to the USB installer to install High Sierra :)...

Spoiler

 

 

 

What happens if we don't have access to TransMac or Paragon Hard Disk Manager?

Not a problem, as long as we get "OS X Base System" bootable, we can launch terminal from the Utilities Menu to copy the SharedSupport folder over to the Installer app.  In essence, we will build the full installer app = 5GB+ on the target HD eg "Macintosh HD", by copying both the "small" installer app = 15MB (on "OS X Base System") and the SharedSupport folder from the NTFS volume (mounted in this example on /Volumes/DATA)...

-bash-3.2# cd /
-bash-3.2# cp -R Install\ macOS\ High\ Sierra.app /Volumes/Macintosh\ HD/
-bash-3.2# cp -R /Volumes/DATA/SharedSupport /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app/Contents/
Spoiler

 

...then start installation with the startosinstall utility...

-bash-3.2# /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/Macintosh\ HD --converttoapfs NO --applicationpath /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app
Spoiler

 

The above steps can be automated with the attached "startosinstall.command" script, which will assemble "Install macOS High Sierra.app" on "Macintosh HD" and launch the startosinstall utility targeting the "Macintosh HD" volume.  Copy/download to "Macintosh HD", then run in terminal (after attaching DATA USB with /Shared Support folder)...

cd "/Volumes/Macintosh HD"
chmod +x startosinstall.command
./startosinstall.command

Attached Files



#2
Allan

Allan

    V.I.P. Member

  • Supervisors
  • 11,553 posts
  • Gender:Male

Amazing!

Thank you fusion  :)



#3
fusion71au

fusion71au

    InsanelyMac Legend

  • Gurus
  • 877 posts
  • Gender:Male

Making a High Sierra USB Installer Entirely From Scratch in Linux Mint

 

Prerequisites

  1. 8GB or larger USB drive
  2. Linux Mint (virtualized is also OK, tested with Mint 17.3 & 18.1) and the following installed packages:  hfsplus, hfsprogs, gparted, gdisk, p7zip and dmg2img...

 

Spoiler

 

 

Download Installer Files Directly from Apple and Clover from SourceForge
 
1)  Open terminal, create SharedSupport folder in ~/Downloads

mkdir ~/Downloads/SharedSupport

 
2)  Browse Apple's Regular Software Catalog and find the URLs to download the following 6 installer files...

  1. BaseSystem.dmg
  2. BaseSystem.chunklist
  3. InstallInfo.plist
  4. InstallESDDmg.pkg
  5. AppleDiagnostics.dmg
  6. AppleDiagnostics.chunklist

(Hint - search page for "InstallESD" to find its URL and others nearby)
 
into ~/Downloads/SharedSupport.  A browser download manager (eg Chrono for Chrome, dTA for FireFox) is handy since InstallESD is >4GB ---> allows you to pause/resume interrupted download...
 
3) Rename InstallESDDmg.pkg to InstallESD.dmg

mv ~/Downloads/SharedSupport/InstallESDDmg.pkg ~/Downloads/SharedSupport/InstallESD.dmg

4)  Edit InstallInfo.plist with a text editor to remove the chunklistURL and chunklistid keys for InstallESD, and renaming it from InstallESDDmg.pkg to InstallESD.dmg (example of edited file attached to post#1)...

 

Attached File  Edit InstallInfo.plist0.png   446.79KB   2 downloads

Attached File  Edit InstallInfo.plist.png   482.47KB   4 downloads

 

5)  If you don't already have Clover installed, download the latest Clover.iso from SourceForge.  Extract the EFI folder to ~/Downloads...
 

Spoiler

 

6)  Determine the size of the "OS X Base System" HFS partition by listing contents of BaseSystem.dmg with 7z l command.  Here, 4.hfs=2008506368 bytes=1915.5 MB (1024x1024 bytes per MB) or 3922864 sectors (512 bytes per sector)...

Spoiler

 

 

Prepare USB with GParted and Restore OS X Base System with dmg2img
 
1)  Open GParted.  In this example, I have an 8GB installer disk, /dev/sdb, initialized as GPT from Device Menu... 

 

2)  Create the following 2 new partitions
 
Part 1 200MB FAT32 labelled EFI
Part 2 5817MB HFS+ labelled Installer_App
Leave 2174MB free for OS X Base System restore (=1916+129+129 MB of loader space before and after to keep Apple's Disk Utility happy)

 

Spoiler

3)  Use gdisk to set correct partition type, name and attributes for the EFI System Partition and create new sdb3 for OS X Base System...

 

Spoiler

 

4)  Open Terminal, type lsblk to show the system's attached disks, partitions and their mount points...
 

Spoiler

5)  Change directory to access the SharedSupport files in ~/Downloads

cd ~/Downloads/SharedSupport

6)  Type dmg2img -l BaseSystem.dmg to list the "partitions" in the compressed disk image file "BaseSystem.dmg"...

Spoiler

7)  Use the command sudo dmg2img -v -i BaseSystem.dmg -p 4 -o /dev/sdb3 to write the 4.hfs image to your "OS X Base System" volume ie sdb3 partition.

 

Spoiler

8)  Create mounting folders in /media/your_username 

sudo mkdir /media/fusion71au/EFI
sudo mkdir /media/fusion71au/Installer_App  

9)  Mount the Installer_App volume (corresponding to sdb2) and copy the SharedSupport folder to its root ...

sudo mount /dev/sdb2 /media/fusion71au/Installer_App  
sudo cp -R ~/Downloads/SharedSupport /media/fusion71au/Installer_App/

 
10)  Mount the EFI partition, sdb1, and copy the EFI folder containing Clover into it...

sudo mount /dev/sdb1 /media/fusion71au/EFI
sudo cp -R ~/Downloads/EFI /media/fusion71au/EFI/

Clover Settings

Clover configuration is required now.  The default config.plist (in the EFI partition, /EFI/Clover folder of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with a text editor.

 

The location of the important configuration files for Clover are summarized below

  • config.plist--->EFI/CLOVER folder
  • DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist)
  • Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work.
  • If legacy booting, you need to install legacy boot sectors on the drive (boot0af, boot1f32 and boot6).  There is an automated install for this here by @StarBrilliant
  • If UEFI booting, you will most likely need one of the OsxAptioFixDrv-64 drivers copied from /EFI/CLOVER/drivers-off/drivers64UEFI to /EFI/CLOVER/drivers64UEFI.

Hint:  For newbs, you don't necessarily need Clover to boot the installer in a VMware virtual machine.  Just attach the installer (without Clover) to a macOS guest running on a VMware Windows host (patched with @Donk's unlocker program - to create the VM guest, see my VMware guide).

 

 

 

Boot to OS X Base System, build "Install macOS High Sierra.app" then startosinstall in Terminal

 

1)  Unmount sdb1 & sdb2,

 sudo umount /dev/sdb1
 sudo umount /dev/sdb2

     then reboot your system to the USB Installer using the system's boot device selection key eg F12 for Gigabyte motherboards, F8 for ASUS motherboards, F11 for ASrock motherboards ...

Spoiler

 

2)  Launch Disk Utility from the macOS Utilities main screen and prepare the target hard disk to install High Sierra eg "Macintosh HD", erase/formatted as HFS+j.  Hint - click View Menu to Show All Devices...

 

Spoiler

 

3)  Launch terminal from the macOS Utilities main screen, Utilities Menu...

 

Spoiler

 

4)  Type the following commands to assemble the full "Install macOS High Sierra.app" on the Installer_App volume...

-bash-3.2# cd /
-bash-3.2# cp -R Install\ macOS\ High\ Sierra.app /Volumes/Installer_App/
-bash-3.2# mv /Volumes/Installer_App/SharedSupport /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app/Contents/

Terminal Hints:

  • Type the first few characters of a path, then press <Tab> key ---> rest of the path will autocomplete.
  • Pressing the <up> arrow key will duplicate the previous command entered into terminal.

5)  Start installation with the startosinstall utility in Terminal...

-bash-3.2# /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/Macintosh\ HD --converttoapfs NO --applicationpath /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app

where "Macintosh HD" is the target volume to install High Sierra in this example...

 

Spoiler

 

Steps 4 and 5 can be automated with the attached "startosinstall.command" script, which will assemble "Install macOS High Sierra.app" on the "Installer_App" partition of the USB and launch the startosinstall utility targeting the "Macintosh HD" volume.  Copy/download to Installer_App volume, then run in terminal...

cd /Volumes/Installer_App
chmod +x startosinstall.command
./startosinstall.command

Attached Files



#4
SiddRamesh

SiddRamesh

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 184 posts
  • Gender:Male
  • Location:Mumbai
  • Interests:Developing

Sir how can i get AMD Radeon HD on 10.13.1 !



#5
Badruzeus

Badruzeus

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 634 posts
  • Gender:Male
  • Location:Indonesia
  • Interests:Graphics Design.
Spoiler

 

Interesting, thanks @fusion72au.. :)



#6
ice_pdb

ice_pdb

    InsanelyMac Protégé

  • Members
  • PipPip
  • 75 posts

Is there any way to make the usb installer drive GPT? from windows



#7
fusion71au

fusion71au

    InsanelyMac Legend

  • Gurus
  • 877 posts
  • Gender:Male

@ice_pdb,

 

Yes, its possible to create a GPT formatted installer disk with dmg2img for Windows, Win32 Disk Imager, Paragon Partition Manager and gdisk instead of MBR using @CVAD's Boot Disk Utility.

 

 

Procedure
1) Convert BaseSystem.dmg to BaseSystem.img with dmg2img.exe:
       In command prompt, type

dmg2img BaseSystem.dmg BaseSystem.img

Spoiler

 

2) Open BaseSystem.img in Win32 Disk Imager ---> write to USB drive

Spoiler

3) Launch Paragon PM and

  • move HFS+ OS X Base System volume to the right so 200MB free space created at the start of the drive
  • create new 200MB FAT32 partition at the start of the drive, labelled EFI
  • extend HFS+ OS X Base System volume to right (but leave approx 130MB free space at end)
Spoiler

 

4) Set correct name, type and partition attribute for EFI System Partition with gdisk in command prompt window.

Spoiler

 

Final result ...

Attached File  Paragon10 Final Partition Layout.png   465.35KB   1 downloads

5) Open TransMac to copy downloaded files in /SharedSupport folder from NTFS Windows drive to /Install macOS High Sierra.app/Contents on "OS X Base System" HFS volume

6) Install Clover in Windows - see guide here :).  

 

Post#1 is for UEFI systems  ---> only need to copy CLOVER folder into /EFI on the EFI System Partition + replace /EFI/BOOT/BOOTX64.efi with Clover's BOOTX64.efi.  

 

Post#3 for legacy BIOS systems ---> need to also install boot sectors (boot0af, boot1f32 in MBR/PBR with Bootice Program) and boot6 or boot7 in the root / of the EFI partition.

 

Note: the MBR installer made with @CVAD's Boot Disk Utility already has legacy boot sectors for Clover installed ---> should work with BOTH legacy and UEFI systems.



#8
ice_pdb

ice_pdb

    InsanelyMac Protégé

  • Members
  • PipPip
  • 75 posts
@fusion71au thank you very much, I'll try it as soon as I get home.





Also tagged with one or more of these keywords: High Sierra, Vanilla Installer, Windows, Boot Disk Utility, TransMac, Paragon Partition Manager, Linux Mint, No access to Mac, Bootable USB Installer


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy