LX0-103 · Question #92
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
The correct answer is B. /sbin/init. When the Linux kernel finishes its own initialization, it hands off control by executing a single userspace process, and under SysV init that process is /sbin/init.
Question
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
Options
- A/lib/init.so
- B/sbin/init
- C/etc/rc.d/rcinit
- D/proc/sys/kernel/init
- E/boot/init
How the community answered
(54 responses)- A4% (2)
- B87% (47)
- C7% (4)
- D2% (1)
Why each option
When the Linux kernel finishes its own initialization, it hands off control by executing a single userspace process, and under SysV init that process is /sbin/init.
/lib/init.so is a fabricated path - the init process is a standalone executable, not a shared library loaded from /lib.
/sbin/init is the conventional path for the SysV init binary and is the first userspace process spawned by the kernel at boot, becoming PID 1. The kernel locates it via a compiled-in default path or the init= kernel parameter, and it then reads /etc/inittab to determine which runlevel to enter and which services to start.
/etc/rc.d/rcinit does not exist as a standard path; /etc/rc.d contains runlevel service scripts that are invoked by init, not init itself.
/proc/sys/kernel/init is a kernel parameter tunable that can store the init path but is not itself an executable program that the kernel runs.
/boot/init is not a standard location for the init binary; /boot holds the kernel image and bootloader files, not userspace executables like init.
Concept tested: First userspace process launched by kernel under SysV init
Source: https://man7.org/linux/man-pages/man8/init.8.html
Topics
Community Discussion
No community discussion yet for this question.