Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

-1
votes
0answers
19 views

It is correct to run X from single user terminal?

Linux is running with init 3 mode. Is it's correct to run X startx from a single user (non sudoers) terminal?
0
votes
2answers
62 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 ...
-2
votes
2answers
74 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
59 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=...
0
votes
3answers
34 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 ...
-2
votes
1answer
58 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
23 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? ...
3
votes
3answers
395 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 ...
-3
votes
1answer
127 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
196 views

Status of sysstat.service showing active(exited)

When I see status of sysstat is see the following, ● sysstat.service - Resets System Activity Logs Loaded: loaded (/usr/lib/systemd/system/sysstat.service; enabled; vendor preset: enabled) Active: ...
0
votes
1answer
45 views

kernel sysfs doesn't recognize storage kobjects [closed]

I am using ubuntu kernel 4.xx with corresponding ubuntu initrd.img, and it works. But, I want to use a custom initramfs inspired by lfs (linux from scratch) initramfs. The kernel extracts, and runs ...
3
votes
2answers
282 views

How can I make an executable run as a service?

On Ubuntu 18.04, I can start or stop some service by sudo service cron start/stop I can list some services by service --status-all The output matches the files under /etc/init.d/. I heard there ...
1
vote
1answer
173 views

Failed to execute /init (error -13), can't run '/etc/init.d/rcS': No such file or directory

Last night I broke my Arch. Now, when trying to boot, it says: [0.595364] Failed to execute /init (error -13) : can't log to /dev/tty5 starting pid 131, tty '': '/etc/init.d/rcS' : can't log to /dev/...
3
votes
2answers
374 views

Remove busybox from buildroot

As part of Linux hardening we want to remove busybox from filesystem created with buildroot. But I am not sure if system can boot without it. I am quite sure that there are init files that depends ...
1
vote
2answers
32 views

some process are started through init even i am using systemd

When I do ll /proc/1/exe I get lrwxrwxrwx. 1 root root 0 Oct 16 11:28 /proc/1/exe -> /usr/lib/systemd/systemd Which means i am running systemd daemon not init. But when I list ll /etc/init....
2
votes
1answer
97 views

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 ...
1
vote
0answers
70 views

Linux Mint won't boot after issues saving .tex file

I've been having some problems booting into Linux Mint 18.2. It started when I woke the computer from sleep and tried to continue editing a .tex file I was working on. I got some errors which ...
0
votes
1answer
32 views

Background initialization with runit

I recently switched my init system on my ARM box running Linux 2.6 from sysvinit to runit with great success. However, I'm trying to fine-tune the initialization routine. I'd like to have something ...
0
votes
0answers
91 views

How do I stop trackpad driver via xinput disable

If I enter the xinput list command into a terminal I get the following output. Virtual core pointer id=2 Virtual core XTEST pointer id=4 Synaptics TM3096-006 id=11 SynPS/2 ...
1
vote
1answer
32 views

Setting up VM login instead of Local login [closed]

I had a question earlier, it is tied into this, that one was looking for the proper procedure, this one is looking how to implement. If you need a backstory refer to My first question I have a local ...
0
votes
1answer
60 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 ...
2
votes
1answer
91 views

Targets and Unit files on Boot System

I have been going through all the docs and examples regarding the targets (referred to as runlevel) for the past few days but I am still confused with the topic. Can anyone explained me the ...
0
votes
1answer
29 views

Portable way to run a simple script at startup

I'm trying to run a very simple 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: ...
0
votes
0answers
31 views

What happens when a process in SysV boot fails?

If using SysV what will happen if a process fails during the init ? For example assume that the processes in the figure will be executed sequentially. So first networking, then dbus-1,... Now my ...
6
votes
2answers
262 views

Where is fsck run?

I was reading through all the things that are run during bootup and have seen that after mounting the rootfs, /sbin/fsck.ext4 is run and after that systemd is run. I was wondering where or how fsck is ...
0
votes
1answer
121 views

What happens if you fork before switch_root?

So typically an initramfs /init script will end with something like exec switch_root /newroot /sbin/init effectively replacing itself with systemd or whatever floats your boat. But what would happen ...
1
vote
1answer
44 views

Using second init/systemd startup on different partition

We have the following setup: A read-only system partition from which the kernel is booted from. (Debian Jessie) A read-write partition which has additional software to be started as daemons. A simple ...
0
votes
2answers
530 views

How to determine a linux distro is based on 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 wanna know without installing and booting is there any possible way to find distro based on ...
1
vote
2answers
428 views

How should one invoke docker to take care of the PID 1 problem with zombie processes?

The phusion/baseimage boasts of taking care of the pid 1 problem with a light weight init process. How can one use the phusion/baseimage properly? I tried to invoke the image with the command ps aux ...
1
vote
1answer
279 views

Can't mount devtmpfs, can't run init [closed]

I'm trying to run a recent enough kernel (4.9) on an Inforce 6540 board, a single-board computer with a Qualcomm Snapdragon 805 (Also called APQ8084, a SoC with four Krait 450 Cores, ARMv7-A). The ...
0
votes
0answers
12 views

Force start new copy of service, ignoring “running” state

I have a process which is hung in a state of uninterruptible I/O. After quite a bit of googling I've finally surrendered and accepted that there is no way to kill this process without a reboot. It's ...
0
votes
1answer
106 views

--test option is not available for /sbin/init

According to man init(1) it is a --test option should be available. In fact when I am trying to test it I got an error root@mst-sls:~# /sbin/init --test /sbin/init: unrecognized option '--test' ...
0
votes
1answer
143 views

When will S99 launch if it isn't in a normal form?

If I do a: echo "foobar" > /etc/init.d/foobar chmod 744 /etc/init.d/foobar ln -s /etc/init.d/foobar /etc/rc.d/rc3.d/S99foobar on a SLES 11, then when will the "foobar" command launch during boot?...
2
votes
1answer
2k views

How to pass arguments to a Linux kernel `init=` bootparam?

Update: I have succeeded in creating a very simple demo of using the init= bootparam to specify that a custom binary (written in golang and compiled) should be used in place of the standard init. The ...
0
votes
1answer
141 views

Opening raw UBI partition for writing on Linux if it's mounted and used by init

I need to update a raw UBI partition with a new UBIFS image from Linux userspace with superuser rights, however I'm getting EBUSY (Device or resource busy) error whenever I'm trying to open my ...
0
votes
1answer
156 views

runsv not redirecting standard error output, why?

According to the runsv man page: If the directory service/log exists, runsv creates a pipe, redirects service/run's and service/finish's standard output to the pipe, switches to the ...
0
votes
1answer
200 views

Understanding shutdown command in inittab

Looking in my /etc/inittab file I see the following entry: ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now What do the -t1 and -a options mean? They do not appear in the manual for the shutdown ...
-3
votes
1answer
62 views

Linux bash scripting [closed]

I have lot of questions about scripts. How to configure the script that 1 It automatically turns on when the computer is turned on? 2 I was possible start and close the script with console? 3 After ...
3
votes
0answers
736 views

Why does Linux Mint starts in runlevel 5 even though DEFAULT_RUNLEVEL is set to 2?

When studying about Linux runlevels I came across something I was unable to explain to myself while trying to change the DEFAULT_RUNLEVEL. When I boot Mint, it starts in runlevel 5, even though it ...
1
vote
0answers
375 views

LXC does not stop, Failed to connect to bus

I just created a new LXC with the following command: lxc-create -n ${NAME} -t download I choosed debian, stretch and amd64 as characteristics. I'm using the LXC in unprivileged mode with UID/GID ...
0
votes
1answer
199 views

Arch Linux - How could I decrypt and automount multiple encrypted drives during init?

I have two encrypted drives (one SSD for booting and a hard drive for storage) I need both to be unlocked and mounted before all of the runlevel programs/services. Else some of my services would freak ...
3
votes
1answer
10k views

sudo reboot -> Failed to talk to init daemon

On my Raspberry Pi runs jessie. After installing mosquitto I can not run sudo reboot anymore. This error appears: "Failed to talk to init daemon.". What could be the problem? I have already ...
1
vote
0answers
44 views

Edit init file in order to remap ctrl to enter via xcape

I'm trying to remap cnrl to the caps lock and enter keys in way similar to the program karabiner for macOS. I found the following site http://emacsredux.com/blog/2016/01/30/remap-return-to-control-in-...
1
vote
1answer
324 views

Gentoo's openrc hangs forever in “caching service dependencies…”

Whenever I boot my gentoo laptop, openrc hangs forever in the "Caching service dependencies..." stage. This causes my computer to be unbootable unless I use a sysrq key to kill it and manually boot ...
1
vote
2answers
67 views

Print a message a given number of times, right after system boot (init) in a GUI-less system [duplicate]

I want that for a given number of system boots (say, 1 or 2 system boots), a message will appear. I will store the message somewhere, maybe in a variable: message='If you finished testing, make sure ...
1
vote
1answer
63 views

Why isn't my Apache server starting automatically wnen I reboot my server?

I'm using Amazon Linux. I just Apache via yum, however, I can't get it to automatically start when I reboot my server, despite the fact it starts on the command line ... [myuser@mymachine ~]$ sudo ...
0
votes
1answer
452 views

Init running in Debian 9.1

I have the /usr/lib/systemd and /etc/systemd directories, and systemd is running. But I also have the /etc/init/ directory, with several .conf configuration files, I thought this was a sign of ...
1
vote
0answers
127 views

How systemd Type option affects starting other units?

The man page systemd.service(5) explains the Type options for services: Type= Configures the process start-up type for this service unit. One of simple, forking, oneshot, dbus, notify or ...
0
votes
1answer
1k 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 ...
1
vote
2answers
1k 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 ...