Jump to content
Sign in to follow this  
Followers 0
plasticworld

[Guide] Creating High Sierra bootable HDD Partition or USB and Fixing Disk IO Error for SATA/HDD

1 post in this topic

Recommended Posts

In this guide I will go through some steps to prepare a bootable partition or USB installer to upgrade existing macOS Sierra or install new macOS High Sierra. I used and tested this method to upgrade an existing Sierra 10.12.6 and to install a new macOS High sierra in an empty partition.

 

Before anything make sure you backed up your data, from your SSD/HDD/USB or any-kind of storage you use.

 

- Why this guide?

 

  1. Do you have a problem upgrading existing Sierra, a problem like a cross circle sign when you directly upgrade from sierra to High Sierra  using Apple installer ?

  2. Do you have a problem with your HDD driver or old SATA driver not loaded while using the official CreatInstaller method, and you do not need to buy a new SSD and stick with your old HDD ?

  3. Do you have a problem with OSInstall.mpkg not found and you want to find an easy way to solve it ?

 

While I was trying to upgrade my existence 5 series motherboard with both of my old HDD drivers (1 TB WD Blue and 500 GB WD Green) to  macOS High Sierra I faced the cross circle problem when I tried to directly upgrade using the Apple Installer, So the next thing I did is to create a USB installer using CreatInstaller method and start fresh but it did not work and again a suffering point but with more hope as I successfully reached the installer but disk utility unable to detect both of my HDD, So what is the problem ???

The problem was for number (1) that the installer unable to detect the filesystem to start upgrading, for number (2) the new AppleAHCIPort kext is unable to detect my old HDD drivers.

 

So What do we need to solve these problems ? we need another way of creating an Installer to be able to inject or replace AppleAHCIPort, so Why CreateInstaller method is useless in that case ? because the installer process loads from BaseSystem.dmg a read-only image which can not be injected or replaced in the CreatInstaller method without breaking it's checksum which will corrupt your installer. so now we have a lead and that lead is BaseSystem.dmg in this method I will follow HowToInstall method from http://www.insanelymac.com/forum/files/file/762-high-sierra-mbr-and-firmware-check-patch/ but with special tweaks without mbr patch or firmrware patch(no need). A special thanks to  crazybirdy for such a method that will give us the ability to directly deal with BaseSystem.dmg without breaking it's checksum and with using it as magic tool to build a bootable partition or USB.

 

- What we need:

  • You need to have a running macOS.

  • You need to download macOS High Sierra Installer from Apple Store.

  • You need at least 3 GB partition or USB.

  • An EFI partition ready with clover will be amazing.

- Critical and important points:

 

1) From Disk Utility make sure there are no dmg or disk images mounted in your system.

2) ShowHidden Files

defaults write com.apple.finder AppleShowAllFiles TRUE;\killall Finder

2) If you already clicked on and proceed till restart using "Install macOS High Sierra.app" Check the volume that you selected during this process and delete any folder named "macOS Install Data" and a hidden file named ".IAProductInfo".also Check and Delete if they exist in all of your Volumes before moving to Lets Start, this is a ver important step. Or you can run this line from Terminal.app will output if any of your "/Volumes" has one of them or both of them so you can go and check yourself.

for i in /Volumes/*;do if [[ -d $i/macOS\ Install\ Data || -f $i/.IAProductInfo ]];then echo "folder macOS Install Data and/Or file .IAProductInfo exists in: \"$i"\";fi; done

- Hard Disk or USB preparation:

 

From First point in What we need assuming that you already in a running macOS or OSX.

1) If you want to upgrade from Sierra to High Sierra you just need a bootable-helper partition/OR USB and your existence Sierra partition:

  • If you want to use a bootable HDD partition using your current HDD shrink/resize an existence partition with Disk Utility and format as Mac OS Extended (Journaled) with a  minimum 3 GB size  name it BootablePartition.

  • Rename your current Sierra Partition to HighSierra.

  • If you want to use a bootable USB just erase it using Disk Utility with GUID Partition Table and HFS+ Partition name it BootablePartition check (2.2) bellow.

 

2) If you want to Install a new High Sierra in a new or cleaned HDD or SSD you just need a bootable-helper partition/OR USB and a cleaned HFS+ partition to install High Sierra.

 

2.1) A bootable partition and installation partition USING HDD

  • From Disk Utility Erase the HDD with Name: HighSierra, Format: Mac OS Extended (Journaled), Scheme: GUID Partition Map

  • If you do not want to create a bootable partition in your HDD proceed to (2.2) and cancel the next point

  • After creating the HighSierra partition click on it and select Partition next to first Aid then click on the Plus in the bottom to add a new partition resize it till it will be 3 GB name it BootablePartition.

2.2) Preferable: A bootable USB partition:

  • From Disk Utility Erase the USB Name: BootablePartition, Format: Mac OS Extended (Journaled), Scheme: GUID Partition Map.

- Lets Burn the BaseSystem and Start The Fun:

 

This point assumes that you completed all the preparation and you have all What we need.

 

1) Go to /Application/Install macOS High Sierra.app

2) Show Package Contents.

3) Go to Contents/SharedSupport you will find BaseSystem.dmg

4) Make sure that you checked and you do not have anything left from (1) & (2) in Critical and important points.

5) Double click on BaseSystem.dmg to mount it, Finder will pop out with it's content so close it.

6) After (5) and assuming that you already checked and you do not have anything left from (4) the BaseSystem.dmg will be the only mounted image in Disk Utility.

7) From the method that you choose from Hard Disk or USB preparation click on  BootablePartition, Restore and chose OS X Base System be aware that this will erase all the content of the selected partition so TAKE CARE do not chose a wrong partition that's why I gave a special name to mark the partition that we want to deal with.

8) After successfully restoring BaseSystem from (7) your BootablePartition will be renamed to "OS X Base System" rename it back to BootablePartition

9) Open BootablePartition, Go to /System/Installation you will find a broken link called Packages DELETE IT.

rm -rfv /Volumes/BootablePartition/System/Installation/Packages

10) Create a new folder instead of the broken link and name it Packages.

mkdir -v /Volumes/BootablePartition/System/Installation/Packages

11) Go back to (3) and under Shared Support you will find InstallESD.dmg mount it by double clicking and go to Packages and you will find OSInstall.mpkg copy it to the new folder we created under BootablePartition/System/Installation/Packages,

cp -v /Volumes/InstallESD/Packages/OSInstall.mpkg /Volumes/BootablePartition/System/Installation/Packages/

12) Clover Preparation:

This point has two main things:

  • If you want to use the USB from Hard Disk preparation to be your Clover Bootable media, That's fine Download Clover https://sourceforge.net/projects/cloverefiboot/ and install in BootablePartition. same bellow methods apply.
  • If you want to user your existence EFI same bellow methods apply 

1) For AppleAHCIPort

 

1.1) Inject on the fly method: Fixing Disk I/O Error by using Clover KernelAndKextPatches>KextToPatch then add item to the array, Thanks to @sunKi http://www.insanelymac.com/forum/topic/327488-macos-high-sierra-final-release-is-out-17a365/page-10?do=findComment&comment=2505086

           <dict>
                <key>Comment</key>
                <string>fix IO error ICH10 for 10.13, credit SunKi</string>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Disabled</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Find</key>
                <data>RYX2D5XCiciD4P5mhcl4D4TSdQs=</data>
                <key>Replace</key>
                <data>iciD4P5mhckPmMFBCMyQkJCQdQs=</data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>fix hotplug ICH10 for 10.13, credit SunKi</string>
                <key>MatchOS</key>
                <string>10.13.x</string>
                <key>Disabled</key>
                <false/>
                <key>Name</key>
                <string>AppleAHCIPort</string>
                <key>Find</key>
                <data>icglQGACAD1AIAAAdQyB4b9///+Ji1EBAAA=</data>
                <key>Replace</key>
                <data>kJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJA=</data>
            </dict>

1.2) Replace Kext method Download this kext and replace it with BootablePartition/System/Library/Extensions: Thanks to  @fusion71au http://www.insanelymac.com/forum/files/file/815-appleahciportkext/ and Importantly is to update the kext cache, fix ownership and permissions.

Copy all at once and paste it in your terminal.

sudo chown -R 0:0 /Volumes/BootablePartition/Library/Extensions/AppleAHCIPort.kext && \
sudo chmod -R 755 /Volumes/BootablePartition/Library/Extensions/AppleAHCIPort.kext && \
sudo touch /Volumes/BootablePartition/System/Library/Extensions && \
sudo kextcache -u /

or line by line:

 

# Fix ownership using chown

sudo chown -R 0:0 /Volumes/BootablePartition/Library/Extensions/AppleAHCIPort.kext

# Fix permissions using chmod

sudo chmod -R 755 /Volumes/BootablePartition/Library/Extensions/AppleAHCIPort.kext

# Touch kernel Extensions folder to cache it.

sudo touch /Volumes/BootablePartition/System/Library/Extensions

# Rebuild kernel Extenstions cache.

sudo kextcache -u /

2) For any extra post installation your are free to tweak it in clover or if you want to add extra kext, repeat the above 1.2 with your kext, then fix permission, ownership and update the kernel cache.

3) Copy apfs.efi copy it under  "/Volumes/BootablePartition/usr/standalone/i386/apfs.efi" to your clover installation drivers64uefi/ or drivers64/ in legacy BIOS (This method will convert only SSD otherwise it will not convert any HDD as tested with my old 5 series and my HDD did not convert to apfs).

- Final touch

1) Before finishing this point make sure you passed all the
Critical and important points. Go to /Applications/Install macOS High Sierra.app and double click to open then proceed till you reach "Select the disk you want to install macOS." and chose HighSierra Volume wonder what is HighSierra check Hard Disk or USB preparation. this point "Install macOS High sierra.app" will create a Helper folder Called "macOS Install Data" and a hidden file called ".IAProductInfo" and these two will lead the BootablePartition to install macOS High Sierra in that partition using these Helpers.

 

2) After (1) your computer will restart and In Clover your will find HighSierra Partition and BootableParition chose BootablePartition, If everything goes well the installer will start directly without Disk Utility or any preparation we already did all of that. Please make sure you booted from the BootablePartition not HighSierra  

 

- Knowns Problem:

1) After Final touch point (2), The mouse cursor will not be found or of course movable Don't worry. check pikeralpha https://pikeralpha.wordpress.com/2017/08/05/osinstall-mpkg-appears-to-be-missing-or-damaged/ in the end of the topic after Thank's Apple so it's not just you.

edited: typo.

p.s. Hey. It might be me, but I didn’t see a mouse pointer in the installer. It wasn’t there. Probably something that we should fix.


2) Upgrading from my Sierra 10.12.6 took so long using this method but also Don't worry. I did upgrade without losing any data, Just you have to tweak your clover config.plist to not conflict with the High sierra specially if you injected any S/L/E kext Like audio post installation so it's preferable to keep your config.plist clean from Post Installation and just for a booting process and of course with Clover Preparation.

- Summary:

 

Burn BaseSystem.dmg to a partition or USB , Direct the BaseSystem partition to your HighSierra Partition to complete the installation using Install macOS High Sierra.app Helper folder "macOS Install Data" and the little hidden file .IAProductInfo

 

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

×