Boot OSX on a NVMe Card

Discussion in 'Mac Pro' started by foxfoobar, Apr 15, 2016.

  1. foxfoobar macrumors newbie

    Joined:
    Apr 14, 2016
    #1
    Hi!

    I read about the NVMe cards that aren't bootable because the EFI rom (off course) doesn't list them at the boot manager. The first thing i learned when fiddling around with a hackintosh (back in '05 with deadmoo image) was the "rd=" option. So since i already successfully booted OSX from an USB3.0 stick on a cMP3,1 (where booting from USB3.0 isn't supported), here's how it should also work with a Samsung 950 Pro NVMe.

    Note: I haven't got an 950Pro to test this, but it should work just like doing this with a USB-Stick on an cMP with USB3.0 cards. The NVMe driver must already be installed and kernelcache rebuilded!
    Note2: I did this long ago on a MountainLion system, so the procedure might vary, e.g. files are laying somewhere else on the source disk etc.

    1. Partition your 950Pro and clone an already installed system to your 950Pro, e.g. your running system.

    2. Use a spare SSD (USB stick would also work) and partition it as:
    Partition Map Scheme: GUID Partition Table
    Format: Mac OS Extended (Journaled)
    Partition Name: NVMeBoot

    3. Now do the following on the Terminal to make the SSD/USBStick bootable:
    mkdir -p /Volumes/NVMeBoot/System/Library/CoreServices/
    mkdir -p /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/
    mkdir -p /Volumes/NVMeBoot/System/Library/Caches/com.apple.kext.caches/Startup/

    cp /System/Library/CoreServices/SystemVersion.plist /Volumes/NVMeBoot/System/Library/CoreServices/
    cp /System/Library/CoreServices/boot.efi /Volumes/NVMeBoot/System/Library/CoreServices/
    cp /Library/Preferences/SystemConfiguration/com.apple.Boot.plist /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/
    cp /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache /Volumes/NVMeBoot/System/Library/Caches/com.apple.kext.caches/Startup/

    sudo bless --folder /Volumes/NVMeBoot/ -label NVMeBoot

    4. Change /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/com.apple.Boot.plist so it reads

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Kernel Cache</key>
    <string>/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache</string>
    <key>Kernel Flags</key>
    <string>boot-uuid=69D67D3F-908E-39B1-B284-BB796536406D rd=*uuid -v</string>
    </dict>
    </plist>

    Note: Change the UUID (in my case 69D67D3F-908E-39B1-B284-BB796536406D) to match the UUID from your 950Pro's root partition! Open "Disk Utility.app", click the 9050Pro's partition to where you cloned your OSX onto and press CMD+i. Now copy the number where it says "Universal Unique Identifier:" and paste it to com.apple.Boot.plist "boot-uuid=" line.

    That should be it, reboot and check it out. Would be nice if someone could test this.
     
  2. h9826790 macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #2
    That's a great news. I never expect that we can boot via the USB 3.0 PCIe card on the cMP.

    I almost know nothing about this kind of system stuff. Need some time to learn and study. I don't have NVMe drive, but at least can test if the same method can make the 4,1 or 5,1 USB3.0 bootable. Thanks for the sharing!
     
  3. Draeconis macrumors 6502a

    Joined:
    May 6, 2008
    #3
    Could this method be used to redirect booting to a ZFS-formatted volume?
     
  4. h9826790, Apr 20, 2016
    Last edited: Apr 20, 2016

    h9826790 macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #4
    I read through the procedure quite a few time, but still have some confusion. So, let's say I want to make my external HDD bootable via my USB 3.0 PCIe card. I have to...

    1) Clone my current OSX from a internal bootable drive to that external HDD;

    2) Get another USB stick, and partition is as
    Partition Map Scheme: GUID Partition Table
    Format: Mac OS Extended (Journaled)
    Partition Name: NVMeBoot (Or USBBoot, whatever the name I want)

    3) Use Terminal to make the USB stick bootable:
    mkdir -p /Volumes/NVMeBoot/System/Library/CoreServices/
    mkdir -p /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/
    mkdir -p /Volumes/NVMeBoot/System/Library/Caches/com.apple.kext.caches/Startup/

    cp /System/Library/CoreServices/SystemVersion.plist /Volumes/NVMeBoot/System/Library/CoreServices/
    cp /System/Library/CoreServices/boot.efi /Volumes/NVMeBoot/System/Library/CoreServices/
    cp /Library/Preferences/SystemConfiguration/com.apple.Boot.plist /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/
    cp /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache /Volumes/NVMeBoot/System/Library/Caches/com.apple.kext.caches/Startup/

    sudo bless --folder /Volumes/NVMeBoot/ -label NVMeBoot

    4) 4. Change /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/com.apple.Boot.plist so it reads

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Kernel Cache</key>
    <string>/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache</string>
    <key>Kernel Flags</key>
    <string>boot-uuid=69D67D3F-908E-39B1-B284-BB796536406D rd=*uuid -v</string>
    </dict>
    </plist>

    Change the UUID accordingly to match the UUID of the external HDD.

    And now, this confuse me. I now have 2 device, the external HDD, and the USB stick. Apart from the OS was cloned onto the external HDD, all the work was done on the USB stick. Do you mean that I need to plug the USB stick into one of the native USB 2 port, and then make the external HDD bootable via the USB 3.0 PCIe card?

    I didn't try it yet, because I want to make sure my understanding is correct. However, if it works, then it's quite a smart solution. Use the bootable USB 2.0 port to forward the boot ability to the USB 3.0 PCIe card. So that I can enjoy the USB 3.0 speed on my external boot disk.
     
  5. ActionableMango macrumors G3

    ActionableMango

    Joined:
    Sep 21, 2010
    #5
    Yes, I think boot redirection is exactly what's happening. The last "cp" step is copying the kernel and all of its extensions (which would include the USB 3.0 driver) to the USB 2.0 stick.

    That makes me wonder if there are performance ramifications to having booted the kernel and its drivers off of USB 2.0. Or probably not, at least not after initial loading, because I assume these things have to stay in system memory.

    Now I am a little bit embarrassed about the times I've said that a cMP will never be able to boot from USB 3. :oops:
     
  6. Fl0r!an macrumors 6502a

    Joined:
    Aug 14, 2007
    #6
    Yes, you basically need a natively readable drive (= USB2, SATA) carrying your OS X kernel cache, which in turn contains the drivers (USB3, NVMe, whatever) needed to access the rest of your system.
    It's a procedure older Hackintosh people know, I think I did something similar to boot from my custom Fusion Drive back in Chameleon days.

    Would be interesting to see if any existing USB3 / NVMe EFI driver is able to run on Apples EFI 1.1 implementation. Could e.g. be flashed to the SPI flash of a GPU, which is definitely less hassle than messing around with the boot rom.

    At some point it might become easier to just install Clover to get all advantages: UEFI implementation with drivers for everything, native boot screens with PC cards, etc... But then you might also sell the cMP and get a Hackintosh.
     
  7. h9826790 macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #7
    If I understand it correctly, this method only able to boot OSX via USB 3.0 card, right?
     
  8. foxfoobar thread starter macrumors newbie

    Joined:
    Apr 14, 2016
    #8
    Hi!

    Sorry for the late reply, but somehow i don't get any email notifications on replies/posts. Anyway, i had the time to test it out on my cMP3,1 (i don't own a cMP4,1/5,1 yet) using Mavericks. I used a simple USB-Stick which i made bootable and cloned my Mavericks disk onto an old leftover SSD which i used with an USB3.0 enclosure. I use the KT7001 USB3.0 card from Inateck (Fresco Logic FL1100) which is supported out of the box by OSX. I had the USB3.0 SSD enclosure connected to the first port of the USB card, since the first 3 ports are NOT connected to the integrated Hub (VIA chip), haven't tested the other 4 (Hub) ports. I choosed the USB-Stick on the EFI boot manager and it took about 10-15 seconds till the kernelcache was loaded. Mavericks just booted fine and i haven't had any issues, just like booting the OS from USB2.0. To get the kernelcache loaded faster it would probably be better to make room for a 100-200MB partition on an integrated SSD where you can place the boot files to.

    So yes, it should also work if the NVME driver is stable! But like i wrote before, i don't own a NVME SSD and someone who owns one should test this and report back. And if it is working stable then someone might come up with an app or background daemon which is monitoring the kernelcache on the NVME/USB3.0 OS drive and copies the kernelcache to the configured directory (boot partition) when it gets rebuilded, e.g. after doing an OSX update etc.

    Cheers,

    furchtbar :)
     
  9. crjackson2134 macrumors 68030

    crjackson2134

    Joined:
    Mar 6, 2013
    Location:
    Charlotte, NC
    #9
    Well, it's not really the same as native USB3 booting, so don't be too embarrassed.
     
  10. hbp112358 macrumors newbie

    Joined:
    Jun 9, 2011
    #10
    no, it's the same as raid booting, using the same interface built into the system to allow for raids to boot, but instead of using the Special partition at the Back of the raid drive you are creating your own (boot jumpstart) drive.

    HBP
     
  11. PercyHanna macrumors member

    Joined:
    Feb 11, 2010
    #11
    Thanks for these instructions! I was finally able to get my Lenovo ThinkStation D20 to boot El Capitan off my internal PCIe NVMe SSD (HyperX Predator) using this method. I might eventually try Sierra again, but the last few times I tried, I was unable to boot up into ANY installed Sierra drive (even if I installed to a separate USB drive). This worked fine with El Capitan, though.
     
  12. AUser2017 macrumors newbie

    Joined:
    Feb 4, 2017
    #12
    The Hyper X Predator isn´t a NVMe SSD. Its based on AHCI...So booting should be no problem at all...
     
  13. foxfoobar thread starter macrumors newbie

    Joined:
    Apr 14, 2016
    #13
  14. pastrychef, Feb 14, 2017
    Last edited: Feb 14, 2017

    pastrychef macrumors 601

    pastrychef

    Joined:
    Sep 15, 2006
    Location:
    New York City, NY
    #14
    Yes, it's AHCI.

    Screen Shot 2017-02-14 at 6.29.13 AM.png
    Source: M.2 SSD Options for the Skylake NUC - Choosing the Right SSD for a Skylake-U System
    --- Post Merged, Feb 14, 2017 ---
    +1

    Agree completely. It's reaching a point where users have to jump through more hoops to make the Mac Pros modern than hackintosh users do.
     
  15. flowrider macrumors 601

    flowrider

    Joined:
    Nov 23, 2012
    #15
    We are NOT there yet!!!!!!!

    Lou
     
  16. pastrychef macrumors 601

    pastrychef

    Joined:
    Sep 15, 2006
    Location:
    New York City, NY
    #16
    Look at what's involved for getting USB 3 booting and NVMe booting working...

    There's still no openly available way to get boot screens on Nvidia cards after GTX 680 without paying for pre-flashed cards...

    Using Clover seems like the more attractive solution to me. Which goes back to Fl0r!an's point that it just opens the door for hackintosh as a legitimate option.

    Getting up and running on a hackintosh can be pretty fast and relatively easy.
     
  17. HarryBalzak macrumors newbie

    Joined:
    Sep 30, 2017
    #17

    Foxfoobar you are a champion.
    I have been successfully booting my Mac Pro 4,1- 5,1 from Samsung 960 Evo on El Capitan 10.11.6 (with some iCloud issues) using the Github Repository and your magic until I heard about the NVMe support with High Sierra. I have just successfully got 10.13 up and going booting from the 960 Evo once again with your assistance and, it would appear, with no iCloud issues.. :)
    Thanks for sharing your knowledge.
    Greatly appreciated
    HB
     
  18. pedrosimao macrumors newbie

    Joined:
    Oct 12, 2017
    #18
    You are my hero! I was able too boot in my new Kingston KC4000 NVME on a Macbook Pro 15 Retina Late 2013 thanks to you, and only you!
    Now I am waiting for someone to come up with a EFI that could do that natively
     
  19. krishnaM macrumors regular

    Joined:
    Sep 26, 2014
    #19
    Wow! This is wonderful thread, I didn't know booting from external HDD via USB3.0 pcie card was possible. Now I am a layman when it comes to using Terminal. But I really want to try that. Can you please guide me so that I don't make no stupid mistake? Can I still be able to use USB 2.0 port for booting after if needed
     
  20. h9826790 macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #20
    I didn't try the USB 3.0 boot yet, but the procedure from OP is very clear. Just read it through a few times, and make sure you do the exact procedure step by step, then everything should be fine.

    My understanding is.

    Your cMP is actually booting from the USB drive from one of the native USB 2.0 port.

    But the USB drive will redirect the boot sequence to the USB 3.0 connected hard drive. So, all USB 2.0 ports are still bootable. In fact, they must be bootable, otherwise, this method won't work.

    As long as you follow the exact same procedure, write everything to a USB drive but not your primary internal boot hard drive. This process is very very safe. Because if you remove the USB drive, your cMP will revert to the previous status in no time.
     
  21. krishnaM macrumors regular

    Joined:
    Sep 26, 2014
    #21
    Thanks for quick reply. So basically I rename my ext. HDD to 'USBboot' and copy/paste 'one sentence' at a time on to Terminal app and hit 'enter'? Sounds too simple! Do I also include that link address 'http://www.apple.com/DTDs/PropertyList-1.0.dtd' as mentioned in step 4? Please don't laugh at my ignorance.
     
  22. h9826790 macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #22
    Yes, I think it's better to follow the exact same instruction.
     
  23. pedrosimao macrumors newbie

    Joined:
    Oct 12, 2017
    #23
    Just copy and paste everything to your terminal. Don't forget to give the exact USB name to your USB drive, of not you will have to change a bit some commands.
     
  24. krishnaM, Oct 14, 2017
    Last edited: Oct 14, 2017

    krishnaM macrumors regular

    Joined:
    Sep 26, 2014
    #24
    Well, I took the plunge of faith and jumped into deep water. I formatted a new usb 2 stick with GUID partition and labeled it as NVMeBoot so that commands match, copied the UUID from my bootable usb 3 drive (with CCC copy of my Mackintosh drive). I had to disable SIP to play with CoreServices. However it was not successful. Here are the terminal events:


    Krishnas-Mac-Pro:~ krishna$ mkdir -p /Volumes/NVMeBoot/System/Library/CoreServices/

    Krishnas-Mac-Pro:~ krishna$ mkdir -p /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/

    Krishnas-Mac-Pro:~ krishna$ mkdir -p /Volumes/NVMeBoot/System/Library/Caches/com.apple.kext.caches/Startup/

    Krishnas-Mac-Pro:~ krishna$ cp /System/Library/CoreServices/SystemVersion.plist /Volumes/NVMeBoot/System/Library/CoreServices/

    cp: /Volumes/NVMeBoot/System/Library/CoreServices/SystemVersion.plist: Permission denied

    Krishnas-Mac-Pro:~ krishna$ cp /System/Library/CoreServices/boot.efi /Volumes/NVMeBoot/System/Library/CoreServices/

    Krishnas-Mac-Pro:~ krishna$ cp /Library/Preferences/SystemConfiguration/com.apple.Boot.plist /Volumes/NVMeBoot/Library/Preferences/SystemConfiguration/

    Krishnas-Mac-Pro:~ krishna$ cp /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache /Volumes/NVMeBoot/System/Library/Caches/com.apple.kext.caches/Startup/

    cp: /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache: No such file or directory

    Krishnas-Mac-Pro:~ krishna$ sudo bless --folder /Volumes/NVMeBoot/ -label NVMeBoot

    Password:

    Krishnas-Mac-Pro:~ krishna$



    I'll appreciate if you can interpret the language and guide me where is it I am going wrong. Thanks
     
  25. krishnaM macrumors regular

    Joined:
    Sep 26, 2014
    #25
    any suggestions please....
     

Share This Page