init

From NetBSD Wiki

Jump to: navigation, search
This article is a stub. You can help by editing it.

The init(8) program is the very first program that gets run by the kernel on a NetBSD system. It is the parent of all other processes.

The booting process

The kernel is actually an "ordinary" program, as can be seen in src/sys/kern/init_main.c. This program first initializes some vital structures and variables, then initializes the most important subsystems, followed by autoconf.

After all that is done, the kernel is basically ready to perform its most important tasks (run processes). Then, it forks off the very first program, which is init. Init, in turn, sets up a new session and, consequently, a new process group.

It also sets up the terminal, in multi-user mode runs the scripts in /etc/rc.d (by calling /etc/rc and sets up getty and login prompts. And you can take it from there, after supplying the right credentials to login, that is :)

Retrieved from "http://wiki.netbsd.se/init"
Personal tools