OP:
Could you try to find another copy of Yosemite?
Or possibly 10.11 El Capitan (which I like better)?
The goal is to get ANY copy of the OS (regardless of which version) installed to make the Mac bootable again.
A Mac that boots (regardless of OS) is far better than one that won't.
Hmmm...
Going back to your original post, you say you have an iMac A1224, right?
According to everymac.com, that could have been made in several years, from 2007 until 2010.
See this page:
EveryMac.com's Ultimate Mac Lookup - lookup Apple Mac, iPod, iPhone and iPad specs by serial number, order number, model number, model ID, EMC number and more.
everymac.com
"Because there are seven iMac models that match the A1224 model number, you may wish to lookup yours by EMC Number, Model ID, or Serial Number for greater precision."
Do you have access to another Mac that still boots?
If so, which Mac and which OS?
Do you have a spare EXTERNAL drive?
It might be possible to create a
bootable external drive.
Then take that to the problem iMac and see if it can be booted that way.