Can you please post dmesg of a successful booting? That will tell us which SATA controller/disks you are using. Also, the boot log of a failed boot will be very helpful - the best way to get this is via serial console. If you don't have access to serial console, taking note / picture of the part where SATA detection fails will do too.
Also, when the machine boots successfully, does it work without generating disk related kernel logs? Just perform any IO-heavy operations - cp'ing directories which contain large files, tar/untarring... - and see if the kernel complains about anyting.