/sbin/init twice at booting a linux system ??
by Tricia279 from LinuxQuestions.org on (#6F2RP)
Well I wonder by learning "how linux works" that /sbin/init is twice started.
Does this make sence ?
1) First occurance of /sbin/init
The initramfs filesystem image contains programs and binary files that perform all actions needed to mount the proper root filesystem, including providing the kernel functionality required for the specific filesystem that will be used, and loading the device drivers for mass storage controllers, by taking advantage of the udev system (for user device), which is responsible for figuring out which devices are present, locating the device drivers they need to operate properly, and loading them. After the root filesystem has been found, it is checked for errors and mounted.
The mount program instructs the operating system that a filesystem is ready for use and associates it with a particular point in the overall hierarchy of the filesystem (the mount point). If this is successful, the initramfs is cleared from RAM, and the init program on the root filesystem (/sbin/init) is executed.
2) Second occurance of /sbin/init
The boot loader loads both the kernel and an initial RAMibased file system (initramfs) into memory, so it can be used directly by the kernel.
Once the kernel has set up all its hardware and mounted the root filesystem, the kernel runs /sbin/init.
These statements above come from the course of the Linux Foundation: LinuxFoundationX LFS101x Introduction in Linux.
Can someone explain me, why this done twice ?
Many thanks.
Does this make sence ?
1) First occurance of /sbin/init
The initramfs filesystem image contains programs and binary files that perform all actions needed to mount the proper root filesystem, including providing the kernel functionality required for the specific filesystem that will be used, and loading the device drivers for mass storage controllers, by taking advantage of the udev system (for user device), which is responsible for figuring out which devices are present, locating the device drivers they need to operate properly, and loading them. After the root filesystem has been found, it is checked for errors and mounted.
The mount program instructs the operating system that a filesystem is ready for use and associates it with a particular point in the overall hierarchy of the filesystem (the mount point). If this is successful, the initramfs is cleared from RAM, and the init program on the root filesystem (/sbin/init) is executed.
2) Second occurance of /sbin/init
The boot loader loads both the kernel and an initial RAMibased file system (initramfs) into memory, so it can be used directly by the kernel.
Once the kernel has set up all its hardware and mounted the root filesystem, the kernel runs /sbin/init.
These statements above come from the course of the Linux Foundation: LinuxFoundationX LFS101x Introduction in Linux.
Can someone explain me, why this done twice ?
Many thanks.