I have two identical Imacs (mid 2011), One of the Imacs has logic board problem but I need all the programs and data on that HDD and i'm just thinking of swapping HDD to the one that is working. Will it boot as per normal?
You don't need to do this.
All you need to do is take the drive OUT OF the "bad" iMac.
Then use a USB3/SATA docking station (there are many of them on amazon for cheap) to connect it to the USB port on the "good" iMac, and access it that way.
Hmmm....
Wondering if you could just boot the bad iMac into "target disk mode" (hold down T key at boot), and see if you can "get into it" that way...?