Jump to content
Taruga

Mojave Raid 0 APFS Solution

32 posts in this topic

Recommended Posts

Posted (edited)

Problem solved :thumbsup_anim:

This is the way I did it

Lets suppose that disk16 and disk17 are the disks to create the Raid 0 

After the first command to create the raid, 2 extra disks (disk18 and disk19) will show up if you do a diskutil list

diskutil appleRaid create stripe raid0 apfs disk16 disk17

diskutil unmountDisk disk18
diskutil unmountDisk disk19
sudo gpt create disk18
sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk18
sudo gpt add -b 409640 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk18
sudo newfs_apfs disk18s2

diskutil mountDisk disk19

 

This is diskutil list output before the above commands
 

dev/disk16 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk16
   1:                        EFI EFI                     209.7 MB   disk16s1
   2:                  Apple_HFS Sem nome                319.6 GB   disk16s2

/dev/disk17 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk17
   1:                        EFI EFI                     209.7 MB   disk17s1
   2:                  Apple_HFS Sem nome                319.6 GB   disk17s2

 

 

After diskutil appleRaid create stripe raid0 apfs disk16 disk17 , diskutil list displays:

 

dev/disk16 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk16
   1:                        EFI EFI                     209.7 MB   disk16s1
   2:                 Apple_RAID                         319.7 GB   disk16s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk16s3

/dev/disk17 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk17
   1:                        EFI EFI                     209.7 MB   disk17s1
   2:                 Apple_RAID                         319.7 GB   disk17s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk17s3

/dev/disk18 (external, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                 Apple_APFS                        +639.5 GB   disk18

/dev/disk19 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +639.5 GB   disk19
                                 Physical Store disk18
   1:                APFS Volume raid0                   839.7 KB   disk19s1

 

And after the rest of the commands, diskutil list displays:
 

dev/disk16 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk16
   1:                        EFI EFI                     209.7 MB   disk16s1
   2:                 Apple_RAID                         319.7 GB   disk16s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk16s3

/dev/disk17 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk17
   1:                        EFI EFI                     209.7 MB   disk17s1
   2:                 Apple_RAID                         319.7 GB   disk17s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk17s3

/dev/disk18 (external, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +639.5 GB   disk18
   1:                        EFI                         209.7 MB   disk18s1
   2:                 Apple_APFS Container disk19        639.2 GB   disk18s2

/dev/disk19 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +639.2 GB   disk19
                                 Physical Store disk18s2
   1:                APFS Volume untitled                897.0 KB   disk19s1


Now, disk18 has a GUID_partition_scheme  which it didn't had before.
And disk19 it's the APFS formated volume ready to install the OS.
 

---------------------------


Obs:
 

sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk18
sudo gpt add -b 409640 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk18


The above GUID's used were taken from https://en.wikipedia.org/wiki/GUID_Partition_Table
 

EFI System partition 	
C12A7328-F81F-11D2-BA4B-00A0C93EC93B

Apple APFS				
7C3457EF-0000-11AA-AA11-00306543ECAC


--------------

And for HFS+, if anyone needs:

Hierarchical File System Plus (HFS+) partition
48465300-0000-11AA-AA11-00306543ECAC

But with HFS+, then instead of:

diskutil appleRaid create stripe raid0 apfs disk16 disk17
sudo newfs_apfs disk18s2

Should be used:

diskutil appleRaid create stripe raid0 JHFS+ disk16 disk17
sudo newfs_hfs -v raid0 disk18s2



Video demo link:

Youtube



 

Edited by Taruga

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)
11 hours ago, Taruga said:

I´ve been trying to boot Mojave from an APFS Raid 0 (2 x 240GB SSD) externally connected to an USB 3 dock

I can boot into single mode but I can't load any kext's , it says something Invalid Kext Signature.
If I try to boot normally or in single mode it will crash

Any ideias what I should do ?
Is this an impossible task or not ?

Boot into macOS in single mode or safe mode and then rebuild the kextcache and repair permission that might resolve the issue on invalid kext signature.

Did you add any kexts to /Library/Extensions or /System/Library/Extensions?

 

For performing the kextscache/permission rebuild you can use the KextWizard, Kext Utility.

 

Can I ask you why are you using RAID 0, is that because that you want to have a 480GB storage? RAID 0 has no redundancy nor fault tolerance, if you are using RAID 0 for performance I suggest that you fuse them together just like a FusionDrive.

Here is a link on how to make a FusionDrive

Edited by Cyberdevs

Share this post


Link to post
Share on other sites

No kexts were added to /Library/Extensions or /System/Library/Extensions, there is something else going on here which I didn't figured out yet.

I don't use things like KextWizard, I prefer doing things on the terminal with the proper commands and not rely on apps for that. 
I know how to do it manually, but for some reason it's not working as expected.


I'm using Raid 0 for performance (read & write speeds), which is much better than a Fusion Drive. 
I've been using Raid 0 for many years, I have no problem with redundancy or fault tolerance because I use Time Machine for backups if something bad happens.


Do you think a Fusion Drive has redundancy or fault tolerance ?! I don't think so.
For redundancy or fault tolerance, there's Raid 1 
Fusion Drive is good to mix a rotational disk with a solid state as one volume to get maximum storage with a better performance, where the OS writes to the faster of the two and later it starts managing your data to the slower drive which usally has more storage while keeping the faster one with enough free space for incoming data.

Share this post


Link to post
Share on other sites

No, FusionDrive doesn't offer redundancy or fault tolerance either but since RAID 0 scenario has seemed to fail I suggested that as an alternative.

And as you mentioned FusionDrive is best to be used with a conventional hard disk and a SSD which is much faster but it's not only limited to that so you can create the FusionDrive with any sort of hard disk as you already know.

 

Anyways good luck on your quest and I hope you find the root cause for the issue which can be interesting if you manage to get it to work.

Share this post


Link to post
Share on other sites

USB 3.0 is much slower than a data Sata connection maybe the error is in the USB drivers in Mojave?    Can you connect them internally?

Share this post


Link to post
Share on other sites

@Taruga, antoniooninato: So does anyone use the RAID setup in the BIOS if you have a supported controller card (Asus X79 Deluxe has an additional Marvell RAID SATA3 controller). It shows up as a single disk (120g x2 RAID0 configured in controller) on my High Sierra.

I don't have Mojave to test it. Wouldn't a hardware RAID behave differently? 

Share this post


Link to post
Share on other sites
Posted (edited)
20 minutes ago, antoniooninato said:

thanks Taruga I'm working on it, I was able to create the Preboot partition using a terminal command that I found, but I think I need to test first with High Sierra before moving on to Mojave,

 

just in case to be clear, you have a bootable RAID0 + APFS.

is not just a APFS non bootable RAID array, right. 

I will take a look at your post so I can study everything to see if I can spot whatever it is that I need to do

once again thanks

 

You don't need to manually create Preboot, if you setup the raid 0 like I explained, it will be created by the macOS installer (Preboot, Recovery and VM)

To be perfectly clear, I DO HAVE A BOOTABLE MOJAVE RAID 0 WITH APFS :thumbsup_anim:
I tested with 2 SSD´s, and later for this guide and a video I've made I tested the steps with 2 HDD's because I didn't wanted to delete the other raid 0.

This is a screenshot

Edited by Taruga

Share this post


Link to post
Share on other sites
2 minutes ago, antoniooninato said:

I don't know in what part of the world you are


I'm from Portugal, it's 09:35 am here, and I woke up yesterday ;)
 

Share this post


Link to post
Share on other sites
Posted (edited)

I don't recommend you going thru this without a backup or other disk with a working bootable macOS
You should have at least a working Clover (I think) 

You would have to create the raid 0 like this:

diskutil appleRaid create stripe raid0 apfs disk0 disk1 disk2 disk3

Then, after that you would get 2 more disks listed, like maybe for ex. disk4 and disk5

I don't quite understand what you mean by key numbers, if you are refering to the GUID's (for ex. 48465300-0000-11AA-AA11-00306543ECAC) used in the gpt commands, that remains the same. 
All that needs to be changed are the disk numbers, like diskX or diskXsY

ATTENTION
There is a huge risk of data loss from using the commands I posted if people use them with the wrong disk numbers

8 minutes ago, antoniooninato said:

this is my doubt , I know the last one is probably the raid volume and that one goes alone

but my doubt is if the other ones go like this

 

sudo gpt create disk0

sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0

sudo gpt add -b 409640 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0

sudo newfs_apfs disk0s2

 

sudo gpt create disk1

sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk1

sudo gpt add -b 409640 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk1

sudo newfs_apfs disk1s2

 

sudo gpt create disk2

sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk2

sudo gpt add -b 409640 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk2

sudo newfs_apfs disk2s2

 

sudo gpt create disk3

sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk3

sudo gpt add -b 409640 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk3

sudo newfs_apfs disk3s2

 

diskutil mountDisk disk4


NO NO NO NO

All gpt commands are done only once, and only on the disk that will show up in diskutil list after the raid is created with the diskutil appleRaid create stripe_________________


I will soon upload a video that may help you guys understand better 

 

Edited by Taruga

Share this post


Link to post
Share on other sites

I updated the first post to better understand what those GUID's represent.
 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi antoniooninato

 I also got that error at the final of stage 2 installation, that's something to figure out later .... but it did not prevent me from booting Mojave after that.

 

That error might be related to systemsetup -setstartupdisk


For example, I can get a list of my startup disks with:
sudo systemsetup -liststartupdisks

bash-3.2# systemsetup -liststartupdisks
/Volumes/Mojave/System/Library/CoreServices

/Volumes/HighSierra/System/Library/CoreServices

/System/Library/CoreServices

But if I try on High Sierra (or even in Mojave) to set my Mojave Raid volume as a startup disk it fails, for example:
sudo systemsetup -setstartupdisk /Volumes/MOJAVERAID0/

bash-3.2# systemsetup -setstartupdisk /Volumes/MOJAVERAID0/

Can't set startup disk to /Volumes/MOJAVERAID0/System/Library/CoreServices


And after that error, do you see the disk(s) icons in Clover UI to boot from then ? 
I do ! 

Then what I did next was the following:

  • In Clover, I pressed the 'o' key to change clover settings
  • In System Integruty Protection I unchecked all the options, that will leave System Integrity Protection [0x0000]
  • In Binaries patching I unchecked Kernel XCMP and AppleRTC Patch, and I have nothing else checked in this section
  • Then I booted with -v -s  
  • After booting in in Single User mode, I mounted the file system with:
    /sbin/mount -uw / 
  • Then I entered:
    touch /System/Library/Extensions/
  • and next I extered:
    exit
  • After pressing the return key after the exit command, the boot process started and I got the macOS Mojave GUI where we can't setup the user account, and the other usual settings after an instalation.
     

Obs:
Currently I can only boot Mojave on Raid 0 with APFS by performing the above steps, we need to figure out how to avoid booting this way. 
All the wierd problems I had a few days ago while I was trying to boot Mojave went gone after I switched the raid from the dual USB3 dock and connected them internally to SATA ports. 
Thank you Gigamaxx for suggesting it  ;)




 


 

Edited by Taruga

Share this post


Link to post
Share on other sites

Great news! 

I´m happy you finnaly got it to boot :)

But for me, the clone way it's something I don't want for obvious reasons. 
I don't want to waste time having to make clones with  every update that comes out and have to clone out, update and clone back again. 
That's a waste of time
 

12 hours ago, antoniooninato said:

i basically had 3 ways to do it

the normal clone way

your way or my way


Choose one the above two ;) 


 

Share this post


Link to post
Share on other sites

I do need something like that. Thanks for sharing the link.
That thing looks fassssssstttttttt


Enviado do meu iPhone usando o Tapatalk

Share this post


Link to post
Share on other sites
Posted (edited)

Hi Taruga

 

I tested on real mac. The installation was successful, but after rebooting. restart after a few seconds of start-up. So I tried to install rEfind then Clover (of course with disabled hacks) unchanged. rEfind and Clover installed on the efi partition and on the USB flash drive. Same problem with your systemsetup -setstartupdisk. Bless also can not be set. There is a problem in the Preboot partition. 

 

 

Could you check the entries in the Preboot and Apple Boot OSX partitions? Suggest...

 

 

Edited by wodawoda
update

Share this post


Link to post
Share on other sites

To boot, you need to:
 

  • Leave System Integrity Protection [0x0000]
  • Boot with  -s  
  • After booting in Single User mode, mount the file system with:
    /sbin/mount -uw / 
  • Then enter:
    touch /System/Library/Extensions/
  • and then enter:
    exit

    Like I said before, this is the only way I can boot Mojave with APFS Raid 0
     

Share this post


Link to post
Share on other sites
On 9/1/2018 at 3:39 PM, Taruga said:

Like I said before, this is the only way I can boot Mojave with APFS Raid 0


Hum... now I can boot normally (without -s, I tested multiple times) with or without SIP after some changes I did to Boot OS X partitions.
I need to figure out what I did exactly, from what I remember I copyed some folders from the Preboot volume to the Boot OS X partitions

Share this post


Link to post
Share on other sites
On 9/1/2018 at 4:39 PM, Taruga said:
  • Leave System Integrity Protection [0x0000]
  • Boot with  -s  
  • After booting in Single User mode, mount the file system with:
    /sbin/mount -uw / 
  • Then enter:
    touch /System/Library/Extensions/
  • and then enter:
    exit

Did not help.

 

On 9/2/2018 at 10:41 PM, Taruga said:

I need to figure out what I did exactly, from what I remember I copyed some folders from the Preboot volume to the Boot OS X partitions

 Question which :)

 

Edited by wodawoda
After the reset of pram and nvram, I can run the system in single user mode thx

Share this post


Link to post
Share on other sites

Taruga, please write what you have the difference in the file structure.

 

Reel-MBP:~ r$  tree /Volumes/Boot\ OS\ X
/Volumes/Boot\ OS\ X
├── System
   └── Library
       └── CoreServices
           ├── PlatformSupport.plist
           ├── SystemVersion.plist
           └── boot.efi
└── com.apple.boot.R
    ├── Library
       └── Preferences
           └── SystemConfiguration
               └── com.apple.Boot.plist
    ├── System
       └── Library
           └── PrelinkedKernels
               └── prelinkedkernel
    └── usr
        └── standalone
            └── i386
                └── EfiLoginUI
                    ├── Lucida13.efires
                    ├── Lucida13White.efires
                    ├── appleLogo.efires
                    ├── battery.efires
                    ├── disk_passwordUI.efires
                    ├── flag_picker.efires
                    ├── guest_userUI.efires
                    ├── loginui.efires
                    ├── recoveryUI.efires
                    ├── recovery_user.efires
                    ├── sound.efires
                    └── unknown_userUI.efires

14 directories, 17 files
Reel-MBP:~ r$ tree /Volumes/Preboot
/Volumes/Preboot
└── 00B24073-D432-4C9A-AC90-468B0E3B7733
    ├── Library
       └── Preferences
           └── SystemConfiguration
               └── com.apple.Boot.plist
    ├── System
       └── Library
           ├── Caches
              └── com.apple.corestorage
                  ├── EFILoginLocalizations
                     ├── Lucida13.efires
                     ├── Lucida13White.efires
                     ├── appleLogo.efires
                     ├── battery.efires
                     ├── disk_passwordUI.efires
                     ├── flag_picker.efires
                     ├── guest_userUI.efires
                     ├── loginui.efires
                     ├── preferences.efires
                     ├── sound.efires
                     └── unknown_userUI.efires
                  └── EncryptedRoot.plist.wipekey
           └── CoreServices
               ├── PlatformSupport.plist
               ├── SystemVersion.plist
               ├── boot.efi.j132ap.im4m
               ├── boot.efi.j137ap.im4m
               ├── boot.efi.j680ap.im4m
               ├── bootbase.efi.j132ap.im4m
               ├── bootbase.efi.j137ap.im4m
               └── bootbase.efi.j680ap.im4m
    ├── usr
       └── standalone
           └── i386
               └── EfiLoginUI
                   ├── Lucida13.efires
                   ├── Lucida13White.efires
                   ├── appleLogo.efires
                   ├── battery.efires
                   ├── disk_passwordUI.efires
                   ├── flag_picker.efires
                   ├── guest_userUI.efires
                   ├── loginui.efires
                   ├── recoveryUI.efires
                   ├── recovery_user.efires
                   ├── sound.efires
                   └── unknown_userUI.efires
    └── var
        └── db
            ├── AdminUserRecoveryInfo.plist
            ├── CryptoUserInfo.plist
            └── secureaccesstoken.plist

16 directories, 36 files
Reel-MBP:~ r$ tree /Volumes/Recovery
/Volumes/Recovery
└── 00B24073-D432-4C9A-AC90-468B0E3B7733
    ├── BaseSystem.chunklist
    ├── BaseSystem.dmg
    ├── PlatformSupport.plist
    ├── SystemVersion.plist
    ├── boot.efi
    ├── boot.efi.j132ap.im4m
    ├── boot.efi.j137ap.im4m
    ├── boot.efi.j680ap.im4m
    ├── com.apple.Boot.plist
    ├── immutablekernel
    ├── immutablekernel.j132ap.im4m
    ├── immutablekernel.j137ap.im4m
    ├── immutablekernel.j680ap.im4m
    └── prelinkedkernel

1 directory, 14 files
Edited by wodawoda

Share this post


Link to post
Share on other sites

Sorry for the late reply.

I didn't have much free time to check exacty what I did to boot Mojave from raid 0 (apfs) without booting with -s flag

 

But I think it must be because of the var folder that I copied from the Raid Preboot Volume into the com.apple.boot.S folder, and I think that I put another copy of that folder in the root of Boot OS X partitions also.
And then I locked that folder like this: (sorry for the screenshot in Portuguese)

2136002789_Capturadeecr2018-09-17s01_47_11.png.a043e055079506ab9cc5231440dd1b2e.png


I see that you have com.apple.boot.R instead of com.apple.boot.S that I have, but sometimes I see that a secondary folder with that same name (com.apple.boot.R) appears in my Boot OS X partitions.

Obs. All these file operations were done from High Sierra, I got many problems trying to perform them from Mojave

 

Edited by Taruga

Share this post


Link to post
Share on other sites

I wrote the previous post from High Sierra and I check both Boot OS X partition contents again, and there was lot of changes to those partitions after coming from Mojave (raid 0 APFS) to my main system HighSierra (raid 0 HFS+)

The folder structure of both Boot OS X partitions was like this:
 

Taruga:Boot OS X taruga$ tree /Volumes/Boot\ OS\ X
/Volumes/Boot\ OS\ X
├── System
│   └── Library
│       ├── Caches
│       │   └── com.apple.corestorage
│       │       ├── EFILoginLocalizations
│       │       │   ├── Lucida13.efires
│       │       │   ├── Lucida13White.efires
│       │       │   ├── appleLogo.efires
│       │       │   ├── battery.efires
│       │       │   ├── disk_passwordUI.efires
│       │       │   ├── flag_picker.efires
│       │       │   ├── guest_userUI.efires
│       │       │   ├── loginui.efires
│       │       │   ├── preferences.efires
│       │       │   ├── sound.efires
│       │       │   └── unknown_userUI.efires
│       │       └── EncryptedRoot.plist.wipekey
│       └── CoreServices
│           ├── BridgeVersion.bin
│           ├── BridgeVersion.plist
│           ├── PlatformSupport.plist
│           ├── SystemVersion.plist
│           ├── boot.efi
│           ├── boot.efi.j132ap.im4m
│           ├── boot.efi.j137ap.im4m
│           ├── boot.efi.j680ap.im4m
│           └── bootbase.efi.j137ap.im4m
├── com.apple.boot.R
│   ├── Library
│   │   └── Preferences
│   │       └── SystemConfiguration
│   │           └── com.apple.Boot.plist
│   ├── System
│   │   └── Library
│   │       └── PrelinkedKernels
│   │           └── prelinkedkernel
│   └── usr
│       └── standalone
│           └── i386
│               └── EfiLoginUI
│                   ├── Lucida13.efires
│                   ├── Lucida13White.efires
│                   ├── appleLogo.efires
│                   ├── battery.efires
│                   ├── disk_passwordUI.efires
│                   ├── flag_picker.efires
│                   ├── guest_userUI.efires
│                   ├── loginui.efires
│                   ├── recoveryUI.efires
│                   ├── recovery_user.efires
│                   ├── sound.efires
│                   └── unknown_userUI.efires
└── var
    └── db
        ├── AdminUserRecoveryInfo.plist
        ├── CryptoUserInfo.plist
        └── secureaccesstoken.plist

19 directories, 38 files
Taruga:Boot OS X taruga$ tree /Volumes/Boot\ OS\ X\ 1
/Volumes/Boot\ OS\ X\ 1
├── System
│   └── Library
│       ├── Caches
│       │   └── com.apple.corestorage
│       │       ├── EFILoginLocalizations
│       │       │   ├── Lucida13.efires
│       │       │   ├── Lucida13White.efires
│       │       │   ├── appleLogo.efires
│       │       │   ├── battery.efires
│       │       │   ├── disk_passwordUI.efires
│       │       │   ├── flag_picker.efires
│       │       │   ├── guest_userUI.efires
│       │       │   ├── loginui.efires
│       │       │   ├── preferences.efires
│       │       │   ├── sound.efires
│       │       │   └── unknown_userUI.efires
│       │       └── EncryptedRoot.plist.wipekey
│       └── CoreServices
│           ├── BridgeVersion.bin
│           ├── BridgeVersion.plist
│           ├── PlatformSupport.plist
│           ├── SystemVersion.plist
│           ├── boot.efi
│           ├── boot.efi.j132ap.im4m
│           ├── boot.efi.j137ap.im4m
│           ├── boot.efi.j680ap.im4m
│           └── bootbase.efi.j137ap.im4m
├── com.apple.boot.R
│   ├── Library
│   │   └── Preferences
│   │       └── SystemConfiguration
│   │           └── com.apple.Boot.plist
│   ├── System
│   │   └── Library
│   │       └── PrelinkedKernels
│   │           └── prelinkedkernel
│   └── usr
│       └── standalone
│           └── i386
│               └── EfiLoginUI
│                   ├── Lucida13.efires
│                   ├── Lucida13White.efires
│                   ├── appleLogo.efires
│                   ├── battery.efires
│                   ├── disk_passwordUI.efires
│                   ├── flag_picker.efires
│                   ├── guest_userUI.efires
│                   ├── loginui.efires
│                   ├── recoveryUI.efires
│                   ├── recovery_user.efires
│                   ├── sound.efires
│                   └── unknown_userUI.efires
├── com.apple.boot.S
│   └── var
│       └── db
└── var
    └── db
        ├── AdminUserRecoveryInfo.plist
        ├── CryptoUserInfo.plist
        └── secureaccesstoken.plist

22 directories, 38 files


I noticed a lot of changes, for ex. my com.apple.boot.S folder was almost emptied, com.apple.boot.R was created, it was not there before, etc...
Since there was a lot of changes I rebooted the pc to check if it would still normally boot from Mojave Raid 0 APFS, and it did without any issue.
 

I hope my posts can help in some way....

Edited by Taruga

Share this post


Link to post
Share on other sites
On 7/1/2018 at 4:28 AM, antoniooninato said:

 

 

I just want two 16x m.2 cards with four 970 in each card

anyway this the card

http://www.highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm

 

 

 

expensive solution how about the Asus DIMM.2 card? cheap solution for SW RAID, I saw some testings and the results are great, another question is if Mac OS support Intel VROC? is YES then this should be a cheaper solution by all meaning I think...

Share this post


Link to post
Share on other sites

Hi,

 

please excuse me if I'm going too far off-topic with this question, but I just got to know:

Can APFS RAID0 arrays be repaired with disk utility? Because I only recently discovered that HFS+J RAID0 volumes cannot, you can merely check the disk for errors. If there are any, tough luck: Repartitioning and restoring from backup is the only solution then. Repairing is not possible (at least not in GUI, maybe from command line it is? I'm not sure, admittedly I didn't test that).

Do you happen to know if this changed with APFS RAID0 solutions?


Greetings

Share this post


Link to post
Share on other sites

Finally I made more complex solution just now.

 

After occasionally SSD death I tried to build bootable Fusion-like APFS container composed of two RAID0 HDD arrays differs by size and speed.

First array itself contains two faster 7200rpm HDDs, secondary — two slower 5400rpm ones. 

 

In short:

diskutil ar create stripe RAID0 jhfs+ disk0 disk1 #  disk4
diskutil ar create stripe RAID0 jhfs+ disk2 disk3 #  disk5
diskutil unmountDisk disk4
diskutil unmountDisk disk5
sudo gpt create disk4
sudo gpt create disk5
sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk4 #  disk4s1 / EFI
sudo gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk5 #  disk5s1 / EFI
sudo gpt add -b 409640 -i 2 -t 48465300-0000-11AA-AA11-00306543ECAC disk4 #  disk4s2 / HFS+
sudo gpt add -b 409640 -i 2 -t 48465300-0000-11AA-AA11-00306543ECAC disk5 #  disk5s2 / HFS+
sudo newfs_hfs -v RAID0a disk4s2
sudo newfs_hfs -v RAID0b disk5s2
diskutil ap createContainer -main disk4s2 -secondary disk5s2 #  disk6 / APFS container
diskutil ap addVolume disk6 apfs "Macintosh HD" #  disk7s1 / synthesized 

###
# Started install Mojave on "Macintosh HD".
# Installation fails at the end: "Failed to update preboot volume".
# That's ok  Preboot & Recovery volumes were created. 
# Cloned existing single-drive APFS Mojave system (disk999) to "Macintosh HD" using latest CCC  so Preboot & Recovery were fixed.
###

diskutil mount disk0s4 # Boot OS X
diskutil mount disk1s4 # Boot OS X 1
diskutil mount disk7s2 # Preboot
diskutil mount disk7s3 # Recovery

###
# Then copied prelinkedkernel, etc FROM "Preboot" & "Recovery" TO both "Boot OS X" corresponding folders.*
# Copied "var" folder from "Preboot" both to "/Volumes/Boot OS X<\ 1>/" root and "/Volumes/Boot OS X<\ 1>/com.apple.boot.<X>" folders. 
###

# Locking "var":
sudo SetFile -a L "/Volumes/Boot OS X/var"
sudo SetFile -a L "/Volumes/Boot OS X/com.apple.boot.<X>/var"
sudo SetFile -a L "/Volumes/Boot OS X\ 1/var"
sudo SetFile -a L "/Volumes/Boot OS X\ 1/com.apple.boot.<X>/var"

sudo reboot now

 

______

* Not sure which folder and files are needed exactly, so:

$> tree "/Volumes/Boot OS X/"
/Volumes/Boot\ OSX
├── System
   └── Library
       ├── Caches
          └── com.apple.corestorage
              ├── EFILoginLocalizations
                 ├── Lucida13.efires
                 ├── Lucida13White.efires
                 ├── appleLogo.efires
                 ├── battery.efires
                 ├── disk_passwordUI.efires
                 ├── flag_picker.efires
                 ├── guest_userUI.efires
                 ├── loginui.efires
                 ├── preferences.efires
                 ├── sound.efires
                 └── unknown_userUI.efires
              └── EncryptedRoot.plist.wipekey
       └── CoreServices
           ├── BridgeVersion.bin
           ├── BridgeVersion.plist
           ├── PlatformSupport.plist
           ├── SystemVersion.plist
           ├── boot.efi
           ├── boot.efi.j132ap.im4m
           ├── boot.efi.j137ap.im4m
           ├── boot.efi.j680ap.im4m
           ├── bootbase.efi.j132ap.im4m
           ├── bootbase.efi.j137ap.im4m
           └── bootbase.efi.j680ap.im4m
├── com.apple.boot.P
   └── var
       └── db
├── com.apple.boot.S
   ├── Library
      └── Preferences
          └── SystemConfiguration
              └── com.apple.Boot.plist
   ├── System
      └── Library
          └── PrelinkedKernels
              └── prelinkedkernel
   └── usr
       └── standalone
           └── i386
               └── EfiLoginUI
                   ├── Lucida13.efires
                   ├── Lucida13White.efires
                   ├── appleLogo.efires
                   ├── battery.efires
                   ├── disk_passwordUI.efires
                   ├── flag_picker.efires
                   ├── guest_userUI.efires
                   ├── loginui.efires
                   ├── recoveryUI.efires
                   ├── recovery_user.efires
                   ├── sound.efires
                   └── unknown_userUI.efires
└── var
    └── db
        ├── AdminUserRecoveryInfo.plist
        ├── CryptoUserInfo.plist
        └── secureaccesstoken.plist


 

 

 

 

Share this post


Link to post
Share on other sites

 

I've deleted my test raid to try to replicate all that I've done to boot from APFS Raid 0.

Unfortunately, I don't have much free time for this.... so things go slowly.
 

I'm still not 100% sure what I've done to boot without problems, but I think at least 2 things are needed:

√ Copy var folder from APFS Raid Preboot volume into the root of Boot OS X partitions
√ Copy PrelinkedKernels folder into com.apple.boot.S/System/Library/ on Boot OS X partitions
 

(I will have to check all this as soon as possible for me so I can try to decrease the steps needed and confusion about it)

 

 


I've been using High Sierra since the betas in Raid 0 HFS with GUID_partition_scheme without any issues.
And I 
always made the system updates without any problems.

But regading Mojave, although I can make it boot fine from Raid 0 APFS, I don't feel OK to start using as my main OS
Lots of things need to be tested, for ex. check if future updates are installed or not.
 

About this:

"Failed to update preboot volume"

 

We will always get this error unless Apple changes bless command to suport blessing RAID APFS volumes, which they do not !
One can try to manually bless an APFS Raid volume and will an error as well.

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

I've made a script to help me creating GUID_partition_scheme Raids (both HFS and APFS)


U S E    I T    A T    Y O U R    O  W N    R I S K     U S E    I T    A T    Y O U R    O  W N    R I S K     U S E    I T    A T    Y O U R    O  W N    R I S K

 

#!/bin/sh
#set -x
clear
args=("$@")
disks=$#
IFS=        
Version="1.0"
Author="Taruga"
Release="2018"
echo $@
#------------------------------------------------

function SetupRaid_HFS {
for (( i = 0; i< $disks ;i++)); do
echo
echo 'diskutil eraseDisk JHFS+ empty '${args[${i}]}
echo
echo `diskutil eraseDisk JHFS+ empty ${args[${i}]}`
done
echo 
echo `diskutil ar create stripe GUIDRAID JHFS+ ${args[@]} `

STRIPE="$(diskutil info /Volumes/GUIDRAID/ |grep -e 'Device Identifier:' |awk '{ print $3} ')"

echo `diskutil unmountDisk ${STRIPE}`
sleep 1
echo `gpt create ${STRIPE}`
echo `gpt add -t hfs ${STRIPE}`
echo `diskutil eraseVolume JHFS+ HFS_Raid0 ${STRIPE}s1`

}

function SetupRaid_APFS {
for (( i = 0; i< $disks ;i++)); do
echo
echo 'diskutil eraseDisk APFS empty '${args[${i}]}
echo
echo `diskutil eraseDisk APFS empty ${args[${i}]}`
done
echo 
echo `diskutil ar create stripe GUIDRAID APFS ${args[@]} `

STRIPE="$(diskutil info /Volumes/GUIDRAID/ |grep -e 'Part of Whole: ' |awk '{ print $4} ')"
echo $STRIPE
echo `diskutil unmountDisk ${STRIPE}`
sleep 1
CONTAINERTMP="$(diskutil list |grep -A2 ${STRIPE}|grep Store | awk '{ print $3} ')"
echo $CONTAINERTMP
echo `gpt create ${CONTAINERTMP}`   
echo `gpt add -t apfs ${CONTAINERTMP}` 
echo `newfs_apfs -v APFS_Raid0 ${CONTAINERTMP}s1` 
echo `diskutil mountDisk ${STRIPE}`
}

#------------------------------------------------


cat << EOF
                            -- Guid Raid Helper --
                                    v$Version
                                © $Author $Release


EOF

if [ $disks -lt 2 ]; then 

echo 'At least 2 disks need to be passed as arguments'
echo 'usage example: ./Raid0Setup.sh disk21 disk22 '
echo 
echo ' Check which you want to use'
echo  `diskutil list` 
else 

echo 'DATA ON THE FOLLOWING DISKS WILL BE ERASED'
echo
echo

for (( i = 0; i< $disks ;i++)); do
cat << EOF
${i} ${args[${i}]} `diskutil info ${args[${i}]} |grep "Disk Size:" |awk '{ print $3  $4}'`

EOF
done

echo
echo  'ARE YOU SURE WANT TO CONTINUE ?  (y|n) : \c'
read

if [ $REPLY = "y" ]; then
    echo
    echo  'Setup Stripe (Raid 0) in hfs or apfs ? (hfs|apfs): \c'
    read
    if [ $REPLY = "hfs" ]; then
    SetupRaid_HFS
    exit
    fi
    if [ $REPLY = "apfs" ]; then
    SetupRaid_APFS
    exit
    fi  
else
echo
echo "That's OK... maybe next time."
echo
fi

fi

 

U S E    I T    A T    Y O U R    O  W N    R I S K     U S E    I T    A T    Y O U R    O  W N    R I S K     U S E    I T    A T    Y O U R    O  W N    R I S K

 



Regarding the gpt commands, I reduced the complexity needed and now I just use only 2 gpt commands:

√ gpt create disk#
   and:
√ gpt add -t hfs disk#  
   or   (according to the need of hfs or apfs)
   gpt add -t apfs disk#

 

The steps needed are much shorter now, but the script makes it look worse ;) but it helps me a lot

 

 

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By angelo_ios
      EDIT: MacOS Mojave 10.14 ONLY I didn’t test 10.14.1! The EFI folder is compatible with High Sierra.
       
      Guide to installing 10.14 Mojave on a ASUS X555L
       
      What Works:
      -WiFi
      -Sound
      -Graphics (Intel)
       
      What doesn't Work:
      -Bluetooth
      -NVidia Web Drivers
      -Battery Indicator
       
      Used Kexts:
      Picture
       
      Clover setup:
      Clover plist is downloadable in this topic.
       
      Let's start
       
      Step one:
      First get a USB with 8+ GB of storage and a MacOS Mojave 10.14 installer from the AppStore.
       
      Partition the USB in a GUID style and 2 partitions, one partition HFS+ and one partition FAT32.
       
      In the FAT32 partition put the EFI Folder there.
       
      On the HFS+ partition get the MacOS Mojave .app using this command:
      sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/USBNAME --applicationpath /Applications/Install\ macOS\ Mojave.app --nointeraction Lets install!
       
      Put the USB in a 3.0 port on the LEFT side of the Notebook.
       
      In the BIOS follow the default Hackintosh settings, do NOT forget to put Memory allocation to 64MB (Otherwise you won't boot)
       
      Boot into the Installer and install MacOS Mojave.
       
      Boot into MacOS. Now your Graphics are working but your WiFi and Sound are not! for the WiFi follow this video:
      https://www.youtube.com/watch?v=OxFsjhc-AuM Once rebooted WiFi is working! 
       
      For sound get the VooDooHDA.kext and place it into /Library/Extensions
       
      Reboot once again and your sound is now working flawlessly!
       
      My EFI Folder is downloadable

      config.plist
      EFI.zip
    • By dukzcry
      Here's my driver for LSI MegaRAID SAS family of controllers called SASMegaRAID.kext. This one was requested few times at InsanelyMac and other Mac-related communities.
      Download link https://github.com/dukzcry/osx-goodies/releases or https://www.insanelymac.com/forum/files/file/306-sasmegaraidkext/
      F.A.Q.:
      Q: I can't manage controller via supplied utility
      A: Only monitoring functional is supported, management is done via controller BIOS
      Q: Any chance to make cards based on SAS2208 chip work?
      A: Not currently, the chip belongs to the same family, but it requires a lot of handling different from common handling for supported cards.
      Q: The driver loads but my device doesn't show up anywhere in profiler. What should I do?
      A: Try inverting "PreferMSI" key value. It's under "Settings" dictionary in kext's plist. 
      Q: macOS doesn't see my volumes
      A: Set them as virtual (logical) disks in controller's BIOS. If no luck try "Uncontiguous enumeration.zip" version. See full issue report https://www.insanelymac.com/forum/forums/topic/285197-driver-for-lsi-megaraid-sas-family/?do=findComment&comment=1987665
      Q: Is it possible to push more from my setup?
      A: It may be.
      The plist from "Unsafe settings unlocked.zip" allows tweaking of dangerous options. Before playing with them you need to detach all HDDs with critical data and attach some spare HDD for doing the tweaks. The "MaxSGL" option is number of scatter gather list entries you controller can handle. The "MaxTransferSize" determines the maximum size of data transfer (in bytes) per request your controller can catch. If you set them to some enormously big value then they will be truncated to the max values your hardware can achieve (may still be not safe enough for successful data transfers). "MaxTransferSizePerSegment" does the same but for a single SGL entry (will never be larger than MaxTransferSize). For the tests you need to stick to the system.log and start a transfer of a >= 100gb data. If the settings you set are inappropriate, you'll see the I/O errors.
      Q: My Mac stopped to go sleep after i've loaded your kext.
      A: This is awaited. See https://www.insanelymac.com/forum/forums/topic/285197-driver-for-lsi-megaraid-sas-family/?do=findComment&comment=1986269 Use kext from "Unsafe settings unlocked.zip" and set "AllowSleep" key to true.
      Q: Your driver doesn't work for me. Are there any alternatives?
      A: Yes there is one https://www.insanelymac.com/forum/forums/topic/314799-guide-z820-el-capitan-the-great-guide-sucess/?do=findComment&comment=2556863
      Q: I get "mfiutil: mfi_open: not such file or directory" error
      A: It maybe that unit number of you device is not 0 (which is default). Try the following:
      $ ls /dev/mfi?
      /dev/mfi2
      $ sudo mfiutil -u 2
    • By TomZanna
      Buongiorno, ho installato Mac OS Mojave su un Acer A515-51-602C.

      CPU  Intel i5 8250U con UHD620
      GPU  Nvidia GeForce MX150
      RAM  8GB
      HDD  1TB
      WiFi Intel AC 3168
       
      Non funziona
      - Touchpad I2C
      - Audio
      - Batteria
      - Tasti FN
      - Lettore SD
      - Wifi (e mai funzionarà)
      - GPU dedicata (e mai funzionerà)
       
      Attualmente il touchpad è collegato tramite PS2 ma, se possibile, preferirei usarlo tramite I2C (posso cambiarlo dal BIOS).
      CLOVER.zip
      Report.zip
    • By GoggoneXCV
      Ciao a tutti,

      Sono in procinto di installare Mojave nel mio pc (vedi firma) in dual con Win10, ho già installato una volta Sierra nel mio vecchio pc, quindi armato di quella poca esperienza, provo ad installarlo anche in questo nella seconda SSD m2, solo che mi si blocca all'avvio, potreste darmi una mano nella configurazione di Clover?

      Grazie anticipatamente. 
    • By fantomas1
      macOS Mojave 10.14.2 beta (18C31g)
×