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

3
votes
1answer
29 views

chkconfig does not support my script

I have looked and looked and none of the threads I have found are helping. We have a tomcat startup script that we modified slightly for our needs. It works fine on Centos / redhat 6 boxes, but does ...
0
votes
1answer
12 views

Where do service permissions come from

I'm trying to broaden my knowledge of the events surrounding system startup. I see that there are many process which are started without root level permissions. e.g. rsyslogd is listed as running ...
2
votes
2answers
32 views

Create persistent process without inittab

I have a virtual server running Ubuntu 14.04 LTS x64 and I want to create a persistent process that restarts with the system and when it crashes. To do that, I've added the following lines to the ...
1
vote
0answers
41 views

MySQL update failed (debian)

I have problem updating MySQL server (pkg mysql-server5.5) MySQL server "can't stop" [FAIL] Stopping MySQL database server: mysqld failed! invoke-rc.d: initscript mysql, action "stop" failed. dpkg: ...
4
votes
1answer
93 views

how to completely blank video output on boot (no kernel logging, grub output, etc.)

So, this is an inversion of the classic question: "Why is my terminal blank on boot?" -- How do I make my terminal blank on boot? I'm creating a Debian Wheezy system with GRUB as the boot loader that ...
0
votes
1answer
36 views

Init system with dependency handling and service file format on *BSD

I'd like to know whether there are any Systemd equivalents for *BSD distributions, basically something that can handle dependencies between services (service A requires B to be started, so until B is ...
1
vote
2answers
40 views

systemd in the era of hotplugable devices

One argument I hear often about systemd is that it more adapted to current hardware needs, e.g. here Computers changed so much that they often doesn’t even look like computers. And their ...
1
vote
2answers
31 views

Launch node & chrome after system boot

I've a RaspberryPi, and I would like to run a nodeJS script (running a server), and then open Chrome when the server has been launched. Currently, I launch my nodeJS script thanks to a script in ...
0
votes
1answer
65 views

what is the canonical way to start a daemon in rhel/centos-6 init script?

I found lots of good documentation for ubuntu's start-stop-daemon and there is a man page for a binary daemon. But from what I can tell the canonical way to start a daemon in a rhel/centos script is ...
2
votes
2answers
60 views

Creating a shutdown only script with update-rc.d

I have a Raspberry PI running the standard Raspbian distribution. I have this little C program that I need to run at the very end of the shutdown sequence. All it does is send a couple of logical high ...
-1
votes
1answer
157 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 ...
0
votes
0answers
31 views

rc.local isn't being executed on custom Ubuntu LiveCD image

I have unpacked an Ubuntu desktop live ISO and squashfs, added some simple commands to /etc/rc.local (touch a file in /tmp, wget a web page from a local server), but it seems that rc.local isn't ...
2
votes
1answer
163 views

SquashFS+UnionFS as root filesystem?

What's an easy way to to use a union filesystem (read-only SquashFS + R/W overlay) as /? I'm thinking of using a custom boot script as the kernel init= argument. The script would mount the SquashFS + ...
0
votes
1answer
19 views

How to log output to log file using runit

I am running program using runit to run at startup. I want all the output by from the program that is run by runit to be logged to a file. I have looked at svlogd but I cannot figure out how to get ...
2
votes
0answers
47 views

What is the systemd equvalent to sysvinit 'X-Start-Before'?

Quoted from https://wiki.debian.org/LSBInitScripts. X-Start-Before: boot_facility_1 [boot_facility_2...] X-Stop-After: boot_facility_1 [boot_facility_2...] provide reverse dependencies, ...
1
vote
2answers
136 views

The linker does not find libraries in /lib

I am building a small embedded system for a x86_64 target, with a Linux kernel and an initramfs which contains a dynamically linked busybox. I tried to install the needed libraries (libm.so.6, ...
2
votes
1answer
69 views

systemd : write a .service daemon for setting up swap and fs in zram

I recently acquired a laptop with a ssd and in order not to weigh too much on the ssd (which I was told had a limited number of write cycles), I decided to write a systemd unit file for setting up a ...
2
votes
3answers
71 views

When to use reboot(2) vs reboot(8)

I'm writing a custom reboot program in C and trying to decide if I should use reboot(2) directly or call system("/sbin/reboot"). Both reboot(8) and init 6 change the runlevel and gracefully shut down ...
1
vote
0answers
35 views

Show kernel parameters passed to init [duplicate]

I learned that if the kernel does not understand a parameter, it saves it and passes it to init when performing the user space start. While e.g. in show parameters of running kernel or How to display ...
4
votes
1answer
95 views

/sbin/init is shared object?

I know 'init' is first process that is started after the kernel is loaded, but there is an ambiguity for me. If it is a process it must have a binary executable file. However, the following shared ...
5
votes
1answer
63 views

What is a sync during kernel boot?

If something prevents a Linux system from booting, it is common to see this message: kernel panic - not syncing: [Error Message] But what does "not syncing" mean? What exactly isn't syncing? The ...
25
votes
4answers
1k views

What exactly does init do?

I am creating a linux distro and now I need an init program. I can code in c really well and I know quite a bit about linux (not much but I've been using arch linux for development for 4 years), so I ...
2
votes
1answer
91 views

Linux kernel action upon init process exiting

Say I am writing my own init program running on a Linux kernel. What happens when my init program exits with return value 0 ? Additionally is the behaviour different if the return value is non-zero? ...
1
vote
3answers
2k views

startx autologin does not run in /etc/inittab in after Debian Jessie update

I installed a minimal Debian system (stable) without GUI, switched to testing/jessie to be able to get the Cinnamon desktop, but X didn't start on boot. If I log in as myself at the CLI, I can type ...
2
votes
1answer
221 views

Orphan process's parent id is not 1 when parent process executed from GNOME Terminal

I start a new process from GNOME Terminal and then this process fork a child. But when I killed the parent process the orphaned process's parent id became something other than 1 which represent init ...
0
votes
1answer
295 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 ...
1
vote
1answer
37 views

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 ?
0
votes
0answers
260 views

“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 ...
1
vote
2answers
373 views

Does Debian Testing use Sysvinit, Systemd or Upstart? How do I configure it (them?)?

I have a copy of Debian Gnome, installed from live medium then upgraded to testing. I've decided to change my default X environment from GDM to i3 for reasons of productivity. This lead me to wanting ...
0
votes
1answer
47 views

What is the purpose of having two login managers on one system ?

I read, that the first process born in user-space is called Init, it starts by itself further processes, it also possesses an incorporated login manager. So far, I could understand it, but than I ...
8
votes
1answer
714 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 ...
12
votes
1answer
778 views

Why does running `killall init` as user log me out?

On multiple computers running Ubuntu 14.XX, I ran the command "killall init" as user, and was immediately logged out. I could log back in again without a problem. Why is this? What's going on behind ...
0
votes
1answer
462 views

Systemd hangs in Xen Dom0 immediately after switch_root in boot process

I've been trying to set up Xen to work with UEFI and my Arch Linux install (3.18.2) as a Dom0 but have been unable to boot. Of note is the fact that it will boot completely fine otherwise, just not ...
2
votes
1answer
112 views

Why doesn't `shutdown now` (with no other arguments) run init scripts?

I'm running Rasbpian on my Pi, and I have a script in /etc/rc0.d (or more precisely, a symlink to /etc/init.d/myscript.sh) that does some GPIO output to notify the user that power can be shut off. If ...
7
votes
1answer
406 views

Init as a shell script

I was going through a tutorial on setting up a custom initramfs where it states: The only thing that is missing is /init, the executable in the root of the initramfs that is executed by the ...
0
votes
1answer
79 views

segfault in libgnutls - Debian won't complete boot

this problem occurs on Debian jessie x86 with systemd. It leads to an incomplete boot sequence on init 2 because network-manager won't start. it leaves the whole system unusable NetworkManager[785]: ...
3
votes
4answers
3k 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
2answers
116 views

/init can't find /bin/mount, but find / can?

I have trouble, while booting up a linux machine of mine. During the boot phase, while running the /init script it complains about not being able to find mount. My PATH variable is set to /sbin and ...
32
votes
4answers
4k views

Is there any UNIX variant on which a child process dies with its parent?

I have been studying the Linux kernel behaviour for quite some time now, and it's always been clear to me that: When a process dies, all its children are given back to the init process (PID 1) ...
0
votes
1answer
3k views

ERROR: init: ttyS0 (/dev/ttyS0) main process (1612) terminated with status 1

I'm getting the following errors every 10-30 seconds on a virtual Red Hat Enterprise Linux 6.5 2 Server on Amazons EC2. Sep 23 09:57:05 ServerName init: ttyS0 (/dev/ttyS0) main process (1612) ...
2
votes
2answers
808 views

disabling ctrl-alt-del and /etc/init

My OS is RHEL 6.2 I disable Ctrl+Alt+Del by changing in /etc/init/control-alt-del.conf the line exec /sbin/shutdown -r now "Control-alt-del pressed" by exec /bin/true I'll be testing it next ...
0
votes
1answer
133 views

Difference between telinit and running scripts manually under rc*.d

I was trying to debug my Linux boot process. If I set the default runlevel to 2 or 3, my system hangs without giving me a prompt. I was able to get to runlevel 1 via a kernel parameter, and ran all ...
0
votes
2answers
108 views

init.d script is not starting under virtualbox

The script is in /etc/init.d: #!/bin/bash VMUSER=myname CURRDATE=(`date +"%m-%d-%Y"` + `date +"%H:%M:%S"`) CURRTIME=(`date +"%X"`) FILE=/home/myname/log/vm-services.log VBPATH=/usr/bin start(){ ...
1
vote
0answers
113 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 ...
6
votes
4answers
1k 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?
4
votes
1answer
2k views

Minimal Linux with kernel and BusyBox: /etc/inittab is ignored, only /init is executed

I managed to create a small and fully functional live Linux CD which contains only kernel (compiled with default options) and BusyBox (compiled with default options + static, all applets present, ...
0
votes
0answers
83 views

CTRL-ALT-DEL for init 0?

On On my Debian 7 system the Ctrl-Alt-Del is this line below and is by default init 6 ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now But I want to turn for init 0 and not init 6 when I press ...
1
vote
1answer
111 views

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 ...
5
votes
1answer
249 views

SIGKILLing after a grace period

I've seen a lot of process managers that try to do this. It was my understanding that you should only use SIGTERM to kill a process. The process could take an unknown amount of time to clean up after ...
2
votes
0answers
458 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 ...