Why my Mac Mini doesn't boot with external HDD attached?
Assuming you have not installed a third party dual boot loader such as rEFInd, go into the System Preferences and select the internal HD as the "Startup Disk." If you have installed a third party boot loader it may be damaged or you may need to uninstall. If you don't know what a third party boot loader is; you probably don't have it.