... ,but it must be the same exact motherboard.
Identical is best. Usually same brand and chipset will work. I can swap drives between my GA-EP45-UD3P and GAEP45-UD3L motherboards all day and they both still work - mostly.
It breaks the Windows activation because the MAC address of the built in ethernet ports are different, at least until I swap the drives back.
But after that, the odds of success go downhill pretty quickly.