macOS cannot boot. How can I add trailing loader space?
I nearly had this nightmare after installing MacOS Mojave, then playing around with the partitions with Paragon (the only good disk editor left for MacOS).
Unfortunately it shows the trailing partition as “free” approx 180M.
So not knowing that this was the other GPT partition table reference I cleared it out.



Every time I came to run first aid on the whole disk I got the same error.
Also it says run first aid from recovery which I didn’t have...

So stumbled on the MBR patch from these guys:
https://www.insanelymac.com/forum/files/file/944-mojave-mbr-hfs-firmware-check-patch/

This was brilliant and allows one to install easily to USB without having to use the APFS.
Then you need to disable SIP
So boot the Recovery on the USB
Then choose terminal.
Issue the following command:

csrutil disable
[see https://amp.reddit.com/r/osx/comments/3hv3kk/update_on_rootless_the_configuration_mechanism/#ampf=undefined
For more details]

Then type:

reboot

Hold down Alt key and then boot back into OS on main disk.
Then using Paragon Hard disk Manager (well worth it!)

https://www.paragon-software.com/home/hdm-mac/

Check your recovery partition (you can use diskutil list),
Delete it (make sure you back it up in case!)

I had to add another “empty” or “free space” after my main os (800MB)

I.e :
EFI:
Macintosh HD:
Free Space:
Other MacOS:

Then Copy the Recovery Volume from your USBstick using Diskutil or Paragon.

Now even if you select the Apple_Boot GUID in Paragon you still need to issue the following command: (replace TargetVolume with the volume you have (or have just created at the end of the main OS, ie I my case /dev/disk0s3)

[See the following website for more info on this command.
https://www.lifewire.com/create-os-x-recovery-hd-on-any-drive-2260909]
sudo asr adjust --target /dev/TargetVolume -settype Apple_Boot

Then this makes the volume dissapear from disk Utility (but not from Paragon HDM).

Then reboot into the recovery volume and run the following:

Diskutil umountDisk /dev/disk0
[allows disk to be verified]

DiskUtil verifyDisk /dev/disk0
[verify main disk]

Diskutil repairDisk /dev/disk0
[repair Disk0]

Then issue the final command to restore SIP back to normal

Issue the following command:

csrutil enable 



Then type:

reboot

Hold down Alt key and then boot back into OS on main disk.

You can now run the first aid on the main disk as well as the volumes and it should be fine.



Also CMD -R should now now bring up the Recovery HD.

Good luck to anyone else, just glad I have Paragon and Carbon Copy Cloner, but cmd line options are still needed.