Mojave users:
This worked for me, as I just finished installing. The original code from Ylx is outdated
for Mojave. Whether it's a newer Mojave version, different folder names, etc...
who knows.
What I did, and what I suggest you do, is play around with 'ls' in your different sub-folders
once you are in Terminal.
The below code worked for me, because that is what my specific data was named.
Step 1. Start by getting into the home directory. You can do this typing 'ls' and seeing
where you are. If you are not seeing "Applications, System, Volumes, Library, etc" as some
the folders, you need to type "cd .." a few times. After each "cd .." type "ls" to see
where you are at.
Step 2. Once you are at your home directory, play around with the 'ls' function to see how
Unix names the folders, and how the sub-folders are spelled out with spaces, different style slashes, etc.
Step 3. Use the data below to run the code. This code is simply copying the data. One big
mistake I kept making, was I was using the code provided verbatim and never worked...so
that's when I started navigating through the sub-folders to see exactly what everything was named and
wrote it down (typed it out) on a separate document.
Step 4. After the *, is a (space)...so it should look like "/SharedSupport/* /Volumes/Mojave...etc"
What this is doing is before the space is your target, and after the space is your destination.
You are simply copying the data from the install media to your destination hard drive.
Step 5. After the data copies, Restart the computer, have your thumb drive in to load the
bootloader, select your HARD DRIVE, then remove your thumb drive before it gets past the initial
load screen. It will start the installation, restart a couple of times. When it restarts
you need to insert the USB to get to the bootloader, keep selecting your hard drive, and
remove thumbdrive each time after you select your hard drive.
This should get you going in the right direction.
I CANNOT STRESS ENOUGH...Browse your sub-folders to see exactly what your sub-folders are named,
otherwise the 'cp' code will not work.
Hope this helps. Below is the code I used that worked for me.
cp -rf /Volumes/Install\ macOS\ Mojave/Install\ macOS\ Mojave.app/Contents/SharedSupport/* /Volumes/Mojave/macOS\ Install\ Data
Remember, after /SharedSupport, there is a (space) and continue writing the code.
"/SharedSupport/* /Volumes/Mojave...etc."