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

4
votes
1answer
37 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
32 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
34 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
29 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
32 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
29 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
87 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
20 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
93 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
16 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
26 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
76 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, ...
1
vote
1answer
49 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
68 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
83 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
53 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
78 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
1k 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
157 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
152 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
34 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
225 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
328 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
45 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
600 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
763 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
413 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
106 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
354 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
72 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]: ...
2
votes
3answers
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
110 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
702 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
120 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
99 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
100 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?
0
votes
0answers
128 views

How to boot on a ramdisk?

I'm working on a linux embedded for a custom board with a ARM9 processor. My kernel version is : 2.6.33 I'm trying to boot on a ramdisk, kernel correctly mount the file system but failed to execute ...
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
80 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
98 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 ...
4
votes
1answer
226 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
436 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 ...
2
votes
1answer
280 views

How do I set cron to run on background?

I am on ubuntu 12.04 and following this tutorial. I want to setup cron to run in the background but I don't have a chckconfig in sbin so I can't run sudo /sbin/chkconfig crond on I am fairly new to ...
1
vote
1answer
91 views

Emacs, complete list of color “keys”

If you want to customize the colors in Emacs, specifying them in the .emacs init file, without installing any extra package, and without using a pre-made theme, something like this seems to work: ...
1
vote
1answer
253 views

Dedicated-purpose, single application linux boxes

I'm designing an app that will be deployed/installed to a linux machine (perhaps Archlinux, but could be any distro and in fact I would actually prefer something lightweight and inside the Debian ...