Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How does the linux kernel know the location of the /sbin/init program during the boot process? Is "/sbin/init" hard coded into the linux kernel source code?

share|improve this question

Yes, /sbin/init is hardcoded into the source. See the function init_post init/main.c:

    if (execute_command) {
            printk(KERN_WARNING "Failed to execute %s.  Attempting "
                                    "defaults...\n", execute_command);

    panic("No init found.  Try passing init= option to kernel. "
          "See Linux Documentation/init.txt for guidance.");
share|improve this answer

The program to run when kernel loading has completed can be given on the kernel boot command line using the init=/file/name argument.

If this option is not passed, the built-in default /sbin/init is used.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.