iMac Crashes kernel Panic
It's a problem with the system files – try booting into Recovery Mode by restarting the computer and holding down Command + R.

After that, follow the steps to reinstall OS X. This article might help you.