You've just added a new hard drive, but you're having trouble installing macOS.
You've just added a new hard drive, but you're having trouble installing macOS.
Your 2011 iMac's hard drive issue has been resolved by adding a new drive. The problem with the OS disc is likely due to compatibility. You can try transferring the installation media from your old MacBook using a USB drive, then reinstalling it on the iMac.
Discover the steps to boot up your Mac using internet recovery mode in this guide.