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).

Filter by
Sorted by
Tagged with
0
votes
3answers
2k views

Startup script needs root permissions

I have a script that I need to run at startup. I have it in init.d. I need to execute one of the commands within the script with root permissions. How do I go about doing this? Edit 1: For reference,...
0
votes
0answers
23 views

Fedora 30 can't boot: faild to start up manager

I newly installed Fedora 30 on a machine then I installed Oracle Database 12c and restored a really big dump (took two days). Then, I installed samba server and shared a folder with that. After that, ...
2
votes
1answer
993 views

How can I replace root / filesystem with another filesystem?

When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab. Based on a test in an early init script, I want to replace that root ...
1
vote
1answer
27 views

how to properly halt linux system when exiting init

In Qemu, I'm starting a linux VM where init process (PID 1) is bash. It is working : I can use bash after boot. But when I quit bash with a exit or CTRL+D I got a kernel panic. Kernel panic - not ...
27
votes
2answers
57k views

How can I kill a <defunct> process whose parent is init?

Transmission is intermittently hanging on my NAS. If I send SIGTERM, it doesn't disappear from the process list and a <defunct> label appears next to it. If I send a SIGKILL, it still doesn't ...
2
votes
1answer
1k views

Server won't boot, kernel panic - not syncing

After a reboot of a CentOS 6.2 server we are getting a kernel panic with the following error: Kernel panic - not syncing: Attempted to kill init! Panic occurred, switching back to text console When ...
1
vote
0answers
20 views

How can I configure my TTYs and VTs i.e. my Alt-Fn keys F1 - F12 in a safe and flexible way?

Right now I have a archlinux systemd installation that gives me a console login on tty1 to tty6. I see that with this @getty service systemd has an elegant way to fire up an array of ttys. The result ...
0
votes
1answer
17 views

Why do all the links in /etc/rc6.d start with K if runlevel 6 corresponds to reboot?

I was trying to find out how to run a script at startup and during shutdown during which I got to know that level 6 corresponds to reboot in ubuntu. When I opened the /etc/rc6.d every link's name ...
1
vote
3answers
2k views

Why does `init 0` result in “Excess Arguments” on Arch install?

I am used to the old method of calling init 0 to shutdown. Bad, I know; but when I tried it on my new Arch install I get this: # init 0 Excess Arguments This confuses me because I thought systemd ...
0
votes
1answer
139 views

ps axf shows “/sbin/init splash” for PID1

I want to reformulate a very interesting Q by Thelostcause ("Splash in PID =1"): How does and how can "/sbin/init splash" show up in the ps command? I also ask: aren't we (we who are running a "...
1
vote
0answers
23 views

What is the equivalent of systemd-analyze in CentOS 6?

systemd-analyze is the command to investigate time taken by each service during boot in CentOS 7. Is there a similar utility in CentOS 6 for doing this? update: extending the question after Lucas' ...
1
vote
2answers
156 views

Splash in PID =1

I have just started learning about process in Linux. I have come around this command called - ps -ef (which will shows all the process running ) I get output like this UID PID PPID LWP ...
2
votes
1answer
80 views

Does Linux sends `SIGCHLD` to `init` when it inherits orphaned zombie processes?

Does Linux sends SIGCHLD to init (PID 1 process) when it inherits orphaned zombie processes (processes that have not been reaped by its original parent)?
2
votes
2answers
11k views

Why does systemctl isolate multi-user.target succeed only once?

I was just taught here that systemctl isolate multi-user.target is the modern way to unload the graphic shell, which was done by init 3 previously. I see that init 3 still works in my system but it ...
0
votes
0answers
28 views

How to reload users daemons as superuser?

I'm writing an installation script that should do the following just after package installation: systemctl --user daemon-reload systemctl --user start ${@}" The problem is that the installation is ...
2
votes
2answers
2k views

What is the default path that systemd uses to locate locate System V scripts?

Is /etc/init.d the default search path that the systemd generator uses to convert native SysV script to unit files, and falls back to /etc/rc?.d or vice versa? From this answer by @JdeBP: This ...
0
votes
0answers
16 views

init:wait for root not found

For Ubuntu 16.04, the init script does not exceute the function mountroot, nor does it drop down to the shell. What could be the reason for that? Also, I've updated the menuentry for GRUB , as follows:...
0
votes
1answer
2k views

inittab respawn and rc.local

At the moment I have a daemon starting at boot using rc.local by the following line. su -l user -c '/dir/daemon' but I would like to start this process as a service with respawn. I found out that it ...
24
votes
3answers
216k views

How to fix boot into initramfs prompt and “mount: can't read '/etc/fstab': No such file or directory” and “No init found”?

Installing a new system using a GPT partitioned disk dedicated to a single partition, ext4 formatted, extlinux (version 4.05) as bootloader, Ubuntu Core version 13.10 amd64 as rootfs, and Ubuntu linux-...
-1
votes
2answers
6k views

replacing PID 1 in linux [closed]

I know that PID 1 is init. Now I would like to knom, can I replace init process ID to another one and assign to PID 1 a new process. If yes how can I do that?
4
votes
1answer
1k views

kernel parameter init=/bin/bash not working? (RHEL7, RHCSA test)

I took the RHCSA test a couple of weeks ago, which is a lab/hands-on test. The first step is to gain root access of the VM. Usually (and this works okay on my PC's VirtualBox CentOS 7 VM) I do this by ...
0
votes
0answers
12 views

Is there a command named 'run_scripts' in open SUSE for the init daemon?

For a particular init daemon, I've come across a command 'run_scripts' and a directory specified after the 'run_scripts' for the initialization of those daemons. What is it, and why is it used in such ...
17
votes
8answers
9k views

How to read the shut down messages afterwards?

I'm using Lubuntu 11.10. Every time I shut down I can read FAIL in red letters, but I can not read more. So, how to read the log messages and try to solve the problem?
1
vote
1answer
433 views

“Required-Stop:” line in System-V type init script LSB header

I wrote a daemon which watches for files in certain directory and if a new file is copied to this directory, then it is committed to SVN. New files appear in this directory only if remote devices copy ...
90
votes
18answers
39k views

Detect init system using the shell

This may have more to do with detecting operating systems, but I specifically need the init system currently in use on the system. Fedora 15 and Ubuntu now use systemd, Ubuntu used to use Upstart (...
3
votes
2answers
3k views

autossh in /etc/inittab

I have setup ssh tunnel to be able to connect a target computer behind NAT. I have put the following into /etc/inittab on the computer: tu:2345:respawn:/usr/bin/autossh -M 20000 -f -n -N -T -R 6790:...
4
votes
1answer
5k views

How can you get console backgrounds for Arch Linux?

I have tested out openSUSE and found that the tty1 is a bit different from other systems as the tty has got a background. I know that Knoppix has a tux penguin for each core the computer has, but I'm ...
2
votes
2answers
5k views

init, syslog and stdout/stderr

I'm trying to build an embedded system with linux. (Means very few resources and not much else than busybox.) I'd like to make sure, that everything is going to syslog. I'm using the newest version of ...
0
votes
2answers
2k views

buildroot/busybox: launch bootchartd on startup

I built a custom linux image using buildroot and busybox. To speed up the boot process I'd like to use bootchartd (built-in version of busybox) to profile the process. However bootchartd is not ...
0
votes
1answer
88 views

is there a proper way to shut down from single user mode

I've found a lot of inconsistent documentation on single user mode. I don't need to use it often, but I get curious, and I remember not being to use shut down commands in single user mode and ...
2
votes
1answer
227 views

/etc/inittab respawn already running process, Debian9

I added an antry in /etc/inittab to respawn a binary. The entry is like: id:2:respawn:/path-to-my-bin I then execute init q and the process is started by inittab. If I kill the process, it's ...
0
votes
1answer
34 views

Portable way to run a simple script at startup

I'm trying to run a script at startup as root. (Just sets up a root-owned directory in /tmp). Currently, I'm using this script to set up the boot hook and it appears to get the job done: #!/bin/sh -...
14
votes
3answers
5k views

Why can't the kernel run init?

I've downloaded the Raspbian image on this page. I'm trying to compile a kernel that can be used to boot the image within qemu. I downloaded the Linux kernel source from kernel.org and ran: make ...
1
vote
2answers
1k views

How to determine a Linux distro is systemd or sysV init without installing or booting?

I noticed in somewhere that most of the Linux distro are based on Systemd instead of SysV init. So I just want to know without installing and booting. Is there any possible way to find distro based ...
0
votes
0answers
155 views

Unable to change from graphical target to other systemd targets in Ubuntu

I am currently a newer user of terminal in Ubuntu. I was trying to demonstrate some features of targets in systemd. Each time that I do systemctl enable or systemctl isolate , I enter my credentials, ...
0
votes
0answers
70 views

linux kernel auto load driver module

I want to know how linux kernel know which module must load on startup ? i know some modules must defined in /etc/modules . but what happened if i change physical hardware ? for example ...
1
vote
1answer
42 views

Process ownership automatically changes to init process on GCP Ubuntu 18.04LTS

We recently moved our development infrastructure from our own old machines running Ubuntu 12.04 to Google Cloud instances running Ubuntu 18.04. Developers usually start some screens and run django ...
116
votes
2answers
148k views

How does systemd use /etc/init.d scripts?

I just switched to debian jessie, and most things run okay, including my graphical display manager wdm. The thing is, I just don't understand how this works. Obviously my /etc/init.d/wdm script is ...
3
votes
1answer
1k views

Solaris 11 - (unix: Could not start init) Program terminated)

During a restart of a server with Solaris 11, the system halted with the following alert: WARNING: exec(/usr/sbin/init) failed with errno 8. (unix: Could not start init) Program terminated. The ...
-3
votes
2answers
82 views

Is there a daemon which is not a server? [closed]

It seems that a server is not necessarily running as a daemon, e.g. X server. If I am not correct, please let me know. Is a daemon necessarily a server? Is there a daemon which is not a server? I ...
0
votes
1answer
114 views

what dependency-based linux init systems suitable for embedded systems?

Currently, I run Linux on an arm board using Sysvinit, but the network drivers of my board are not the best which causes the network service to stall the boot for a while, I also have problems with ...
3
votes
1answer
3k views

What is the default /etc/inittab file on a fresh install of Debian Jessie?

I'm looking for the full contents of the default /etc/inittab file on a fresh install of Debian 8.7 before any system-specific modifications are made. I searched for this on the Debian website and ...
0
votes
2answers
397 views

Why should parent process wait (to terminate) until all of its child process terminates?

I know there is no enforcement for the parent process to wait until all its child process terminates. However it's a convention followed. Furthermore, I know that if parent process terminates before ...
26
votes
3answers
2k views

If computers start counting at 0, why does the init process have a pid of 1?

Not much to put here in the body.
5
votes
3answers
1k views

What is the difference between “init” and “service manager”?

From When the operating system shuts down, how does a service manager know that it should sends SIGTERM and SIGKILL to its services? systemd IS BOTH the init and service manager What is the ...
0
votes
3answers
48 views

Is telinit run as a daemon?

In sysvinit, telinit is a symlink to init. init is run as a daemon. Is telinit run as a daemon? I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to ...
-3
votes
1answer
305 views

How does Linux operating system shut down? [closed]

Gilles wrote an excellent reply about how Linux kernel shuts down at https://unix.stackexchange.com/a/122667/674 I was wondering how Linux OS shuts down (in cases of both systemvinit and systemd)? I ...
0
votes
1answer
202 views

Why is there a `systemd` process owned by each user that is logged in?

In my ps output: root 1 0.0 0.0 225552 5316 ? Ss /lib/systemd/systemd --system --deserialize 19 message+ 572 0.0 0.0 51564 3076 ? Ss /usr/bin/dbus-daemon --system --address=...
-2
votes
1answer
76 views

In sysvinit, do `telinit` and `init` run in the same process?

In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html /sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. ...
-1
votes
1answer
40 views

On OSes with SysvInit, are `reboot` and `halt` symlinks to some executables?

On OSes with Systemd, reboot and halt are symlinks to systemctl. On OSes with SysvInit, what are reboot and halt symlinks to? Is it telinit? Or are they themselves executable files, not symlinks? ...