Strange indeed!
It runs from USB but not when you put the hard drive back in the computer?
In any case check your disk for problems.
Start up your computer in single-user mode to reach the command line.
Note: If necessary, perform a forced restart as described in the
Emergency Troubleshooting Handbook that came with your computer.
On desktop computers, you can do this by pressing the reset/interrupt
button (if there is one) or holding down the power button for several
seconds. On portable computers, simultaneously press the
Command-Control-power keys. If your portable computer doesn't restart
with this method, you may need to reset the Power Manager.
At the command-line prompt type:
/sbin/fsck -fy
Press Return. fsck will go through five "phases" and then return information about your disk's use and fragmentation. Once it finishes,
it'll display this message if no issue is found:
** The volume (name_of_volume) appears to be OK
If fsck found issues and has altered, repaired, or fixed anything, it will display this message:
***** FILE SYSTEM WAS MODIFIED *****
Important: If this message appears, repeat the fsck command you typed in step 2 until fsck tells you that your volume appears to be OK
(first-pass repairs may uncover additional issues, so this is a normal
thing to do).
When fsck reports that your volume is OK, type reboot at the prompt and then press Return.
But it could be just the flat cable connecting the hard drive to motherboard !