Stack Exchange Network

Stack Exchange network consists of 174 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).

0
votes
0answers
26 views

How the process hierarchy is maintained in Linux? [closed]

Is Process Control Block (PCB) the only major factor in it, or other concepts of Init process can explain this? Is there a diagram that explains it in details?
0
votes
0answers
26 views

Custom software as init process (PID 1)

I'm making an embedded system and I don't want to use C or C++ for security reasons, and I need lots of RAM, so things like a PIC processor which I've used in the past aren't an option. I'm planning ...
0
votes
1answer
27 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
38 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 ...
2
votes
2answers
63 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
80 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
288 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
29 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....
0
votes
0answers
17 views

Check if systemd or init.d is installed on distros [duplicate]

I was wondering which commands should I use to check if init.d or systemd is installed for the following distros - CentOS,SuSe,Ubuntu,Debian on all versions.
2
votes
1answer
66 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
42 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
19 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
49 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
28 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
0answers
43 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
45 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
30 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
221 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
111 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
39 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
348 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
291 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
238 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
11 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
91 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
97 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
110 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
114 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
155 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 ...
0
votes
0answers
118 views

Boot linux into single user mode - change init to http server

Ok, This is a really strange stuff that I'd like to test. I'd like to know if it is possible to boot the kernel, and use the init parameter to do the following: 1) run a init ramdisk that mount ...
3
votes
0answers
620 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
330 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
155 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
8k 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
40 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
247 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
66 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
54 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
419 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
106 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 ...
2
votes
1answer
296 views

What does the Linux kernel do with unknown kernel parameters?

Supposedly I passed the kernel a parameter that it doesn't understand, for example blabla or eat=cake, what would the kernel do with these unknown parameters, the traditional case would be passing any ...
1
vote
1answer
553 views

how to change the getty binary in Debian Stretch?

I have a Stretch system n which I would like to replace agetty with ngetty (for various reasons like because I have no use for serial lines, and I like the way ngetty can be configured, for examples). ...
1
vote
2answers
833 views

systemd After [unit] option not working

I have the following myweb.service file [Unit] Description=myweb - A simple hello world program After=bluetooth.service [Service] Type=simple User=root ExecStart=/usr/bin/docker run -p 2222:4343 ...
3
votes
1answer
878 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
1answer
198 views

/sbin/init hangs after upgrading linux kernel

I am upgrading the kernel on a platform using an ARM SOC (AT91SAM9G25) from 3.2 to 4.4. This is a sysv system. The previous 3.2 works fine, but when booting the 4.4 kernel, it hangs after the exec ...