artık linuxlarda çok rastlanmayan hata. hatanın sebebi şöyle:
static int __ref kernel_init(void *unused)
{
...
/*
* We try each of these until one succeeds.
*
* The Bourne shell can be used instead of init if we are
* trying to recover a really broken machine.
*/
if (execute_command) {
if (!run_init_process(execute_command))
return 0;
pr_err("Failed to execute %s. Attempting defaults...\n",
execute_command);
}
if (!run_init_process("/sbin/init") ||
!run_init_process("/etc/init") ||
!run_init_process("/bin/init") ||
!run_init_process("/bin/sh"))
return 0;
panic("No init found. Try passing init= option to kernel. "
"See Linux Documentation/init.txt for guidance.");
}
yukarıdaki kod, unix/linux sistemlerin son aşamasında çalışan koddur. kernel init ederken, bir initi bulamazsa panic() fonksiyonunu çalıştırır. panic fonkisoynu ise şöyle bir şeydir:
/*
* In case console is off,
* panicstr contains argument to last
* call to panic.
*/
char *panicstr;
/*
* Panic is called on unresolvable
* fatal errors.
* It syncs, prints "panic: mesg" and
* then loops.
*/
panic(s)
char *s;
{
panicstr = s;
update();
printf("panic: %s\n", s);
for(;;)
idle();
}
bu da, birinci kodda kullanılan panic() fonksiyonunun ne iş yaptığını gösterir. görüldüğü gibi for(;;) -bu zaten başlı başına bir bela- dan sonra idle(); gelir ve cortlarsınız.