Trevor
Starfighter Starfighter
Starfighter
  • 239 Views

First Process Started during Bootup

What is the name of the first process that runs on a RHEL system?

 

Trevor "Red Hat Evangelist" Chandler
Labels (3)
2 Replies
Blue_bird
Flight Engineer
Flight Engineer
  • 190 Views

On a Red Hat Enterprise Linux (RHEL) system, the first process that runs, with Process ID (PID) 1, is called systemd which is linked to /sbin/init.

Thanks

Chetan_Tiwary_
Community Manager
Community Manager
  • 113 Views

Tricky question @Trevor !

During the boot process, when "booting the kernel...." stage starts, a  function start_kernel() is called. The execution of start_kernel() and the functions it subsequently calls occur with process ID 0, marking them as the ancestors of all kernel-mode processes as well as of the process ID 1.

So, this is the first process that runs during bootup ( PID 0 ).

 

Within start_kernel(), dozens of kernel subsystems are initialized, including the task scheduler, and the process eventually leads to the call to rest_init().  It spawns the very first user-space process by launching kernel_init(), which is assigned process ID 1 and is special because it becomes the direct or indirect ancestor of all user-space processes. Additionally, rest_init() creates the kthreadd process (usually bearing process ID 2), which functions as the parent of all kernel threads. The boot process reaches its final step when kernel_init() finishes, making way for the init process to take over.

Since you did not mention first user space process or kernel space process - hence the answer had to include the details.

"In an investigation, details matter..." -   Jack Reacher

Join the discussion
You must log in to join this conversation.