Aligning, moving and enlarging partitions seems impossible A friend's MacBook (mid 2009 model) was stuck at the boot screen and I have discovered that the HDD was failing, so I've replaced the failing regular 320GB HDD with a Samsung 860 evo 500GB SSD.

I cloned the disk with ddrescue and before reinstalling via the recovery partition, I aligned the partitions (EFI, Macintosh HD and Recovery HD) with GParted.

Something went wrong, and when reinstalling El Capitan was complaining that 


  some features of macOS are not supported for the disk [...] you can't use FileVault, set up a firmware password, or use Disk Utility to repair the disk


I didn't want to give back the MacBook with this problem, so I tried different ways to align the partitions. I even installed El Capitan by using a removable USB stick so I could format the SSD, but the newly created partitions were again not MB aligned.

My last attempt was by using the trial version of the Paragon Hard Disk Manager for Mac, but it failed. It seems that the partitions couldn't be moved and enlarged (so after the recovery partition I still have ~200GB of unallocated space that I can't use).

Any clues on how could I align the partitions and finally return the Mac to my friend?

Note that I have a backup of all the data, so I can format again the SSD. I would just like to preserve/recreate the Recovery partition in the process. And, obviously, allocate all the SSD's space.
So, I've solved my problem in a destructive way: I've connected the SSD to my Linux machine, launched GParted, deleted the Macintosh HD and the recovery partition and created a new Macintosh HD partition, aligning it to the MiB.

After that I've put the SSD back in the macbook, launched disk utility and formatted the partition as HFS+ journaled, then launched the installer from an USB stick and reinstalled MacOS.

The installer had recreated the Recovery partition while keeping the Macintosh HD alignment to the MiB.