AHCI drive detection issue on Asus M97A R2. Motherboard

I have completed building the pc and took all the required safety precautions during the build. But upon installing the hard drive and optical drive and booting into the bios I noticed that only the hard drive was detected the optical drive was not, there is power going to both devices, the hard drive itself however took a while to detect it seems before the bios screen even popped up and usually this step is instant.

I downloaded the latest bios from the Asus USA site for that motherboard, and updated the bios to see if the issue would go away. Same problem the computer seems to struggle identifying the drives.

All other peripherals such as gpu, memory, cpu, fans are all fine and appear to be operating normally as per the bios read out.

I switched the AHCI mode IDE mode to see if that would make a difference, unfortunately it did not the optical drive still not detected and the hard drive still slow to detect. I decided to USB boot into linux from the stick and check if the drives could be mounted within linux.

Linux booted fine but identified an error for ATA.1 during the boot process which was just confusing to me. Within the desktop I opened gparted and it took for ever identifying the hard disk, there was no luck mounting the optical drive either but the hard disk was identified and I then tried to partition it using gparted.

Gparted attempted for a while to create a partition table followed by a few disk partitions but failed saying there was a read/write io error.

I am now worried.. I do not know what is up with this AHCI error nor do I know how to fix it, the logical answer was to update the bios and hope it fixed the bug but I did that with no luck.

So what do I do? The motherboard I got was brand new so why would it do something like this...

I decided to remove the optical drive it was an IDE DVD ROM drive using a PATA to SATA adapter, I figured out that for some reason the motherboard did not like this and since I was not using the drive much anyway I just removed it all together.

The hard drive issue turned out to be bad sectors and also problems with the I/O as a result. I contacted the person whom I purchased it off and have asked to return it for a refund. I think I will just have to patiently wait for my SSD's to arrive before really installing and working with this new machine.

It is only the first day I have had it running but I am finding the motherboard to be a little more sensitive than what I am used too, I am hoping it becomes more stable as I finalize this build with the remaining parts and install an OS on it.