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

learn more… | top users | synonyms

119
votes
6answers
53k views

What are the pros/cons of Upstart and systemd?

It appears systemd is the hot new init system on the block, same as Upstart was a few years ago. What are the pros/cons for each? Also, how does each compare to other init systems?
2
votes
3answers
59 views

Why do we need initramfs and initrd

I understand the purpose of the this concept. For example we have exotic file system on the disk and in order to load system we need mount root filesystem. But we cannot because there is no suitable ...
2
votes
1answer
23 views

What are the variables $remote_fs and $syslog on SysVinit LSB header?

From: https://wiki.debian.org/LSBInitScripts Add a block like this in the init.d script: ### BEGIN INIT INFO # Provides: scriptname # Required-Start: $remote_fs $syslog ...
3
votes
3answers
67 views

Shutdown procedure clarification

The book "How Linux Works" says the general shutdown procedure (independent of init system) is something like this: init asks every process to shut down cleanly. If a process doesn’t respond after a ...
4
votes
2answers
771 views

When running to a run level does it execute previous run levels?

If I tell my system to go to run level 3 does that mean that it first runs through run level 0, 1, 2, and then finally runs through run level 3? I thought the answer to this question was yes. But ...
2
votes
2answers
89 views

How to use Upstart scripts on CentOS7?

I am learning some stuff about object storages and have an example: I need to create a file /etc/init/start_swift.conf with following commands: description "mount swift drives" start on runlevel [234]...
42
votes
15answers
14k 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 now uses systemd, Ubuntu uses Upstart, while others use ...
8
votes
4answers
4k views

New parent process when the parent process dies

In UNIX, when a parent process disappears, I thought that all child processes reset init as their parent. Is this not correct all the time? Are there any exceptions?
2
votes
1answer
45 views

Why does using the service command work on a systemd distro?

I'm trying to understand the Linux init system. I don't understand how there are three competing systems, yet the service command seems to work on all of them. From the service commands man page: ...
1
vote
1answer
27 views

When in the fallback shell, how do you start init?

I booted my system using in grub : linux /boot/vmlinuz-4.5.0 root=/dev initrd /boot/initrd-4.5.0 I set root to dev to specifically not get it to boot correctly. Of course it falls back to the ...
0
votes
1answer
32 views

Booting Into a TTY with No Graphics?

I'm a little new to this so I apologize if my question is hard to follow. I'm running Arch Linux, systemd as the init system, and I would like to boot into a plain TTY with no graphics. I've tried to ...
3
votes
1answer
44 views

How can I permanently disable a xinput device?

I have a rogue xinput device due to some OS error that sends key press signals even tough nothing is pressed thereby causing screen flickering and the loss of mouse focus. The device is: xinput list ...
6
votes
5answers
10k views

Why is my Debian jessie always in runlevel 5?

I have configured the lines in /etc/inittab as follows: # The default runlevel. id:2:initdefault: But after logging in the output of runlevel is as follows: N 5 So why am I in runlevel 5 ...
1
vote
1answer
56 views

In inittab, trying to set environment variable before executing script

In inittab, I have an entry that looks like this: scpt:234:once:RSYNC_OPTIONS=-q /path/to/script/script.sh arg1 arg2 arg3 2>&1 However, it fails because it's actually attempting to execute ...
0
votes
2answers
29 views

Best way to start multiple “screen” scripts after restart? (centos)

We are using centos. As soon as the server is restarted and the OS is fully loaded, we would like to have a certain user ("foo") start three or four scripts with screen. For example, screen -d -m -S ...
0
votes
0answers
14 views

referencing init script from custom location for Running it as a linux daemon

I am installing a software in a RedHat or SUSE Linux system. The whole software belongs to a specific user. From my basic knowledge on linux systems for installing any script as a linux daemon you ...
0
votes
1answer
22 views

Running code before initrd has been removed and after the root filesystem has been mounted

I looked here Kernel boot process and I tried to understand how to run a script before initrd filesystem removed and but after the root filesystem has been mounted (EncFS), If I understand it ...
10
votes
2answers
3k views

Restarting init without restarting the system

In this question on security SE, 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 ...
0
votes
0answers
30 views

Attach framebuffer console(yaft) to existing tty(of own script)

I currently try to fiddle around with my android init ramdisk. One problem I'm currently trying to debug is that ADB in my new init won't start. The script works fine otherwise though, I used fbsplash ...
5
votes
2answers
182 views

Does anything USE /dev/initctl or /run/initctl

I have been investigating code for a UPS for a Raspberry Pi that is using sysv init rather than systemd (personal preference and familiarity). I was looking into how a privileged script - possibly ...
1
vote
0answers
52 views

Running Python application on boot through init.d script

I am trying to start an Python application on a Debian based OS that is running on a router. This application comes prebundled with site-packages and a python binary. Like a virtual environment. The ...
0
votes
1answer
91 views

Do I need set ulimit for system services, such as nginx.service(systemd)/nginx(sysv)?

I know, when we run application in shell for a large website, we'd better set ulimit for our shell, But most of the service is started by systemd/sysv. Do I need set the ulimit in the service ...
4
votes
3answers
2k views

How to disable X server autostart in Debian Jessie?

I have a remote machine running Debian 8 (Jessie) with lightdm installed. I want it to start in no-GUI mode, but I don't want to remove all X-related stuff to still be able to run it though SSH with ...
1
vote
2answers
119 views

Real world use of suckless's “sinit” init [closed]

I'm trying to set sinit as an init for linux (on a pc..). My goal at moment is simply running a single tty/bash from it. No special mounting is required as the kernel already gets a root=/dev/sda2 for ...
4
votes
2answers
4k views

How to delete (not disable/mask) a unit in Systemd?

Sometimes I make a new unit in mistake, and then I have to go to /etc/systemd to look for the unit and delete all of its associated files/scripts/links/etc. Is there a better way? Like a single ...
0
votes
1answer
31 views

Suppress console output when switching runlevels

Is there any way to silence the output that occurs on TTY1 when switching runlevels? I'm talking about the output like in the following image: I have a simple UI that may be running on TTY1 when ...
3
votes
1answer
60 views

Shutdown with keyboard press doesn't work

I have a Debian Jessie build, and I want to add keyboard shutdown. I've tried the following, without any success: Attempt 1 To /etc/inittab I added ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now ...
1
vote
1answer
57 views

Cryptsetup: LVM is missing (on a system without LVM)

So, I have a problem with the partitions setup of my laptop. I will try to include as many details as possible in order to make it easier to help. In the past, I had an ubuntu 15.10 system on my ...
0
votes
3answers
145 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,...
1
vote
0answers
73 views

Linux: Why do init and systemd use so much I/O?

This is probably unanswerable. But maybe someone else will have this problem and find this question, append to it, or proffer an answer. I discovered the pidstat command with its -d option, today. ...
3
votes
2answers
54 views

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 ...
0
votes
0answers
16 views

init & System V IPC in kernel

Does it affect init if System V IPC is not compiled into a kernel? Does init require System V IPC?
1
vote
1answer
48 views

Kali Linux 2.0 - Startup Text has disappeared

On Kali Linux 2, before you are greeted with the GUI login screen, there is some pre-GUI text that scrolls on the screen. It shows you what modules and programs are working correctly, which ones ...
0
votes
0answers
14 views

Is there a way to bypass a specific service from initializing while it's “hanging” during boot?

RHEL 5.x I had a network issue that was preventing ntpd from being able to reach a remote time server pool. This ended up prolonging system startup to "hang" at: Starting sshd: ...
0
votes
2answers
968 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 ...
20
votes
2answers
405 views

Can a zombie have orphans? Will the orphan children be disturbed by reaping the zombie?

As I understand it, a zombie process has died but still exists as a placeholder in the process table until its parent (or init if the zombie is itself an orphan) checks its exit status. And my ...
-1
votes
1answer
31 views

Run init.d script during boot

I need to do something apparently quite simple: run a script on a Debian 8.2 machine during boot (or during shutdown, both of them are fine). The script just moves and renames some files, so the ...
2
votes
2answers
5k views

Debian init runlevels

It used to be that when you booted most linuxes, you would boot into runlevel 6, unless you did something during the bootloading to change the runlevel,. The process would then look in /etc/init/rcX....
0
votes
1answer
60 views

Embedded Linux and Init problem - Init won't start

I'm working on a embedded system. I have multiple SD cards to save copy of Linux rootfs on (kernel saved in nand). On a original SD card, where is located a system, and from this card the system is ...
2
votes
0answers
895 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 ...
0
votes
1answer
2k views

lsb - log_daemon_msg echoes messages in shell console!

#!/bin/sh . /lib/lsb/init-functions log_daemon_msg "this is a daemon s message" On the shell console, it prints, this is a daemon s message A daemon process doesn't have stdout at all. So why ...
0
votes
1answer
72 views

Help with “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 ...
0
votes
1answer
238 views

lsyncd won't start at startup

My os is mint 17.2 First off, when I start it with: sudo /etc/init.d/lsyncd start it starts. But when I reboot my system it isn't started by default. How do I have it start at boot time? I had ...
2
votes
1answer
42 views

Reason for rc<boot_facility> named symbolic links in OpenSUSE

OpenSUSE 11.4 has rc<boot_facility> named symbolic links in /usr/bin/, /usr/sbin/ and /sbin/ directories: # find / -type l -iname "rc*" /etc/rc.d /usr/bin/rcs2log /usr/sbin/rcmysql /usr/sbin/...
2
votes
1answer
65 views

Which utility reads LSB headers in System V style init scripts?

Various older Linux distributions, which support System V type init scripts, require one to add LSB header to init script. For example a LSB header from /etc/init.d/sshd from OpenSUSE 11.4: ### BEGIN ...
2
votes
2answers
66 views

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 #! /...
0
votes
1answer
61 views

FTP server to start when changing runlevel 2 to 5

I've been searching for this a little while now: How do I, when I change from runlevel 2 to runlevel 5, start f.e. proftpd? When I go back to runlevel 2, the service should be stopped again. So - ...
0
votes
0answers
96 views

How to run script on startup?

I'm trying to run my script spoofy.sh on start up and I'm having some troubles hoping somebody could shed some light here. I am running Arch Linux, heres my script: #!/bin/bash ifconfig wlo1 down ...
0
votes
1answer
102 views

Qemu - substitute the init process

I have a couple of questions concerning qemu boot options 1) When using the following argument init=/bin/sh It works - but is really the init-process replaced by a sh-process? Qemu-system-x86_64 ...
9
votes
4answers
513 views

Is systemd “malicious”? [closed]

Visiting some forum online that discuss about Debian and Xubuntu, I saw some users that add this line in the signature field: ...With no systemd... This line is showed with pride (it seems to me)...