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

29
votes
4answers
2k 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
154 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
93 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 ...
1
vote
0answers
36 views

where is upstart jobs pid held [closed]

Since the upstart command keeps giving me the wrong pid for a job no matter what I try, I would like to manually change it to the correct pid. Does anybody know where the pid for upstart jobs are ...
0
votes
1answer
46 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
59 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
61 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 ...
3
votes
3answers
109 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
39 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 ...
3
votes
1answer
327 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
44 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
47 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 ...
3
votes
1answer
94 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
264 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
127 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
63 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
80 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 ...
4
votes
1answer
286 views

How does init determine which devices to modprobe?

I'm building a totally custom initramfs for a netbooting project and in the process learning a lot about it, but I'm a little puzzled by the loading of modules. I know modprobe can be used to load ...
1
vote
0answers
23 views

(nologin) root and id X re-spawning

Today I faced a strange issue on one of the test server. Server was set to Runlevel 5. But it didnt work and system changed to runlevel 3. It was showing "init: Id "x" respawning too fast: disabled ...
3
votes
1answer
419 views

When would you use pivot_root over switch_root?

I'm wanting to understand the Linux init process better in order to netboot a system over ceph rather than nfs. In the process I've come across two forms of switching root. One called switch_root, ...
3
votes
1answer
184 views

Init script leaves thousands of defunct processes

My problem is that I have an init script that is generating thousands of defunct bash processes. My goal is to have a program called "fr24feed" in its own screen session on boot. After looking at ...
2
votes
1answer
79 views

Application lags if started from init.d?

I have a program (pre-compiled binary) that, when started manually on linux, runs fine. It has a CLI that I use to enter commands. This program is a software router, I can connect to it's CLI to ...
2
votes
1answer
125 views

Check `fsck` automatically

I need to run fsck so that it automatically fixes problems (i.e., fsck -y). And because I am using "systemd" instead of "init" in the linux system, I cannot modify the /etc/default/rcS. So what ...
0
votes
0answers
80 views

Which getty should I use for /dev/tty1 - tty6 text consoles in linux, agetty or something other

I'm configuring LFS linux and I want to select right "getty" for /etc/inittab to handle text consoles /dev/tty1 - /dev/tty6 (the text consoles handled by linux kernel, with output on first display). ...
5
votes
2answers
17k views

How to fix boot into initramfs prompt and “mount: can't read '/etc/fstab': No such file or directory” and “No init found”?

Installing a new system using a GPT partitioned disk dedicated to a single partition, ext4 formatted, extlinux (version 4.05) as bootloader, Ubuntu Core version 13.10 amd64 as rootfs, and Ubuntu ...
-1
votes
3answers
36 views

Shall I expect faster boot when I boot my system with run level 1

I understand that when I set runlevel as 1, my system will boot with very basic set of commands. Does that mean the system will boot faster as compared to run level 5 or 3?
4
votes
1answer
3k views

How to find out in which order /etc/init.d scripts are load on Debian?

I want to run one sysvinit script before another and figured out how to do that. To make sure, this actually happens in the the order I like, I would like to see a list, in which order that happens. ...
1
vote
0answers
99 views

How to determine which init system is used? [duplicate]

Is there a way to determine which init system is being used in Linux? (such as sysvinit, upstart, systemd, etc.) I don't care if it can be programmatically determined, I just want to know how I can ...
0
votes
1answer
137 views

Full path name of bash? and base process of Linux?

I am new to Linux and I recently had a test at school which had the following questions: What is the full path name of bash? What is the base process of Linux? I couldn't answer these. Does anyone ...
0
votes
0answers
15 views

Restore system with no execute permissions for bash and chmod [duplicate]

Good day everyone! One of my friends asked me a question: how to restore an unbootable Linux system (let it be CentOS or whatever) in the following situation: no execute permissions for bash no ...
0
votes
1answer
102 views

How are the services exactly starting in (K)Ubuntu?

I have latest Kubuntu. I have installed mysql. I was looking into the /etc/init. I see the following: In /etc/init/mysql.conf description "MySQL Server" ...
2
votes
0answers
205 views

mkinitcpio did not include modules.devname in cpio image

I'm running Arch Linux with a customized kernel. I modified the PKGBUILD from abs, and renamed the package to linux-custom. The PKGBUILD is fine, after installation I could see the modules.devname in ...
0
votes
0answers
36 views

Bash script to identify which init system the system currently using [duplicate]

I have to create a script that will mount my /usr folder as aufs. I compressed it using squashfs. I've managed to install a working systemd init in ubuntu which I am currently using. Because the ...
1
vote
1answer
2k views

Make screen start as Daemon for a Minecraft server

I made a script that runs fine manually, but can't get it to run with the description in How to start a script file on boot?. I have run update-rc.d -f minecraft.start defaults This is what my ...
0
votes
2answers
650 views

Switch between runlevel with init command in bash script … init 3 to init 5

I need your help with bash script that I’m trying to build. To keep things simple I will make it short: The script starts running once it’s gets to run level 5 so i copied the script to ...
0
votes
2answers
437 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
3answers
242 views

Owner of init and xterm

I don't understand what is owner of process. Owner of bash is me. Then who is owner of init and xterm? I searched on google but I can't find.
5
votes
1answer
166 views

What does `init [2]` mean in the COMMAND column of ps?

Reading What do the brackets around processes mean? I understand that the executable name is printed. Linux ps man page: Sometimes the process args will be unavailable; when this happens, ps will ...
2
votes
1answer
166 views

Why is the restart inittab action asking me for an id?

I am following the NAND firmware update tutorial to try to get my system to run from RAM so I can flash it. I previously had my script running but for some reason unknown to me it is giving me: INIT: ...
21
votes
3answers
983 views

If computers start counting at 0, why does the init process have a pid of 1?

Not much to put here in the body, the question is self explanatory.
0
votes
1answer
293 views

Arch Linux pacman -Syu breaks machine [closed]

Strange things have been going on with arch recently after I installed libreoffice. The first sign was that there were no longer any icons on my desktop. I thought this was strange so I rebooted, ...
1
vote
0answers
274 views

Solaris 11 - (unix: Could not start init) Program terminated)

During a restart of a server with Solaris 11, the system halted with the following alert: WARNING: exec(/usr/sbin/init) failed with errno 8. (unix: Could not start init) Program terminated. The ...
2
votes
2answers
805 views

Sabayon - mysql (and other services) won't start

It's a fresh install of Sabayon Linux. I installed mysql (equo install dev-db/mysql), configured it (emerge --config ...), but it doesn't start using /etc/init.d script: # /etc/init.d/mysql start * ...
1
vote
2answers
951 views

init, syslog and stdout/stderr

I'm trying to build an embedded system with linux. (Means very few resources and not much else than busybox.) I'd like to make sure, that everything is going to syslog. I'm using the newest version of ...
3
votes
1answer
611 views

How to trick an init script into returning 0

I have a init script which is poorly designed because it does not conform to the Linux Standard Base Specifications The following should have an exit code of 0 if running, and 3 if not running ...
1
vote
1answer
339 views

service vs. initctl in Ubuntu

Why are some deamons run out of service and some out of initctl in Ubuntu? Do both tools do the same thing and it is just a matter of personal preference of the user what they will use? E.g. sudo ...
1
vote
1answer
199 views

Executing a command after eth0 is available, but before DHCP client

I'm running Debian Weezy on an ARM board. Right now I'm working around an issue with my network driver by running an ethtool command that limits the Ethernet interface to 100 megabit. However, the ...
2
votes
1answer
507 views

Why can't boot this process at launch?

I have two scripts /etc/init.d/puma_a.sh and /etc/init.d/puma_b.sh with identical configs. I try to set both boot like this, but one of them doesn't load on boot. If I manually launch it from console ...
2
votes
1answer
62 views

How do I identify on my system after successful boot. weather it was crash or was it a shutdown or reboot or something else?

Depending on the restart of the system, I need to make my application taking some follow up. my system is get restarted as following: my self as system admin rebooting sudo init 6 or sudo reboot my ...
0
votes
1answer
765 views

LinuxMint 14 x64 halts during startup at: stopping samba auto-reload integration

My Lenovo Y500 intel i7 nvidia gt 560m LinuxMint 14 x64 halts during startup at: stopping samba auto-reload integration No error shown. No login prompt. I accidentally executed this in the wrong ...