Questions tagged [init]

init is the first actual process (PID 1) spawned during the boot sequence of a UNIX system. Some systems may rely on alternative solutions such as systemd or Upstart (Ubuntu).

init is the first (daemon) process spawned during the boot sequence of a UNIX system. It is initiated by the kernel, which will panic if the init executable cannot be found.

This process has some particular characteristics:

  • While there is no design rule behind this, the init process has PID 1, since it is the first child of process 0 (swapper or sched).
  • init adopts all orphan processes in the system.
  • init handles all operations related to programs starting at boot time. This behaviour can be configured through the /etc/rc* files and directories.

Further reading

347 questions
15
votes
2 answers

Restarting init without restarting the system

In this question, the accepted answers states that For example, /sbin/init uses glibc [the vulnerable lib], and restarting that without a reboot is non-trivial. Now, non-trivial is engineer'ish for impossible, but I'm still curious: Is it…
Sebb
  • 626
  • 1
  • 5
  • 11
7
votes
1 answer

What will happen if I run the command init in my Ubuntu Gnome terminal?

command init seems to be the first process running after each booting. If I init in my Ubuntu Gnome terminal, will that restart my OS?
Tim
  • 101,790
5
votes
2 answers

Why does init disable the process if it's respawning too fast?

In case when a process specified in /etc/inittab crashes init says: INIT: Id "x1" respawning too fast: disabled for 5 minutes Why is it doing it? What can be done during these 5 minutes if crash happens at boot? And even if it doesn't happen at…
4
votes
1 answer

Linux - IPC with init

The init process exists as an ancestor of all of processes on a linux system. Does this process have any kind of IPC entry point ? Do other processes ever do IPC with init for any reason ?
Jake
  • 1,353
3
votes
2 answers

Which steps does "insserv" take to install an init(System-V) script?

I played around with a LSB init script under Debian Wheezy(init is from sysvinit package version 2.88dsf-41+deb7u1) for learning purposes. My script is following: # cat /etc/init.d/test-script #! /bin/sh ### BEGIN INIT INFO # Provides: …
Martin
  • 7,516
2
votes
1 answer

What are runlevels and how they work

I have not a clear understanding of runlevels and how they work. I know runlevels are a digit indicating which processes should be started by init. Pratically speaking: at startup init sees this digit of rcS script and it decides if the script…
1
vote
1 answer

Time that init waits before sending kill -9 upon shutdown?

As far as I understand the shutdown command: If I send a shutdown -h now init will try and stop all processes gracefully, wait a certain amount of time, then send kill -9. My question is: how long will init wait, and how do I configure this length…
cat pants
  • 435
0
votes
1 answer

I wanna develop an INIT- how to set up dev env

I wanna make an init, and so I'm gonna need to get a very basic system on a VM probably. What is the best way to go about doing that? I also saw that it might be possible doing this with a docker container?
sef sf
  • 72
0
votes
2 answers

Why do I have to statically link a c program if I want to use it as the init program for the kernel?

I'm learning about how Linux works and for that I'm watching Tutorial: Building the Simplest Possible Linux System by Rob Landley. He basically goes through some steps to build a minimal system and around 20:00 he starts explaining about building a…
m4l490n
  • 175
0
votes
1 answer

Error in rosdep init

I have Elementary OS and a try install ROS (Robot Operating System) and when i try initialization sudo rosdep init i get this error Traceback (most recent call last): File "/usr/bin/rosdep", line 3, in from rosdep2.main import…
CarCr
  • 1
0
votes
0 answers

"There is a loop between service rc.local and mountnfs-bootclean if started"

So this is the error I receive when I try sudo apt-get upgrade insserv: There is a loop between service rc.local and mountnfs-bootclean if started insserv: loop involving service mountnfs-bootclean at depth 9 insserv: Starting led_aging.sh depends…
Prashanth Prakash
-3
votes
1 answer

Open Source Operating System

Open Source Operating System A server or computer; A computer taken init 6 mode resets itself continuously. How to get to the init init 5 or 2 mode.