As of May 31, 2023, we have updated our Code of Conduct.

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
63 views

Which user does systemd start services as?

I'd like to learn about how systemd starts services, specifically which user the service is started as, and I'd like to use Jenkins running on my Linux PC as an example. I know that init is pid 1, the ...
StoneThrow's user avatar
  • 1,505
0 votes
1 answer
50 views

Stop not called for init rc.d service

I have a very simple SysVinit service in /etc/rc.d: #!/bin/bash PIDFILE="/var/run/test.pid" status() { if [ -f "$PIDFILE" ]; then echo 'Service running' return 1 fi ...
Maestro's user avatar
  • 179
0 votes
1 answer
18 views

How can I configure shutdown, reboot etc. to display a message on an old (2.6) Linux?

I have an old embedded control system that still uses a 2.6 kernel and runs Debian 4. I am looking for a way to display a message whenever the superuser calls (interactively) reboot, shutdown, ...
jstarek's user avatar
  • 1,663
0 votes
0 answers
34 views

how to pass initramfs address in uboot menuconfig?

Hiii I am running a Linux kernel image in qemu I make 2 virtual partitions in my SSD (1 for the Linux image and 2 for the root directory (for initials)) now I am running about binary from qemu and I ...
admin linux's user avatar
0 votes
0 answers
25 views

init script to move file and reboot

I need a tiny init script which get arguments from /proc/cmdline and then move or copy dirs or files passed to in via /proc/cmdline and reboot. Everything is fine, except /sbin/reboot does not work ...
Yaroslav Minieiev's user avatar
0 votes
1 answer
87 views

How to integrate C program with init file?

So I am working on building minimal os using busybox. What I want is I want to run my .net program from BIOS. But I am not sure linux will run .net program or not, so to clear my path I am using C ...
Abhishek Borse's user avatar
1 vote
1 answer
33 views

What packages in a systemd distro rely on it?

I am aware that the reason you can't install runit or openrc on a distro and expect it to work is that some packages and stuff rely on systemd. What exactly do they rely on? The systemctl command? ...
sef sf's user avatar
  • 72
0 votes
0 answers
58 views

kernel ignores append init=/bin/bash

qemu-system-x86_64 -m 2G -accel kvm -kernel kernel6.1 -append "init=/bin/bash" -initrd myinitrd.gz Supposed to run bash as init, but kernel still prints: [ 1.400577] Run /init as init ...
exebook's user avatar
  • 194
0 votes
0 answers
32 views

making my own init, and a bunch of processes are there, that I didn't start

I'm tryna write my own init. so fat ir just launches agetty tty1 and supports the commands poweroff, reboot, halt. for some reason when I use top or ps I see a bunch of processes, like 200 of them, ...
sef sf's user avatar
  • 72
0 votes
1 answer
55 views

making an init: how exactly does the reboot command work?

I'm trying to write an init, but can't figure out the reboot\poweroff thing. apparently reboot is just a link to systemctl? (I'm using arch) So how does this work? init poweroff works and stuff, but ...
sef sf's user avatar
  • 72
0 votes
0 answers
38 views

QEMU takes time to load with cutsom init

So I'm working on writing my own INIT, and I downloaded arch qemu image to boot from. I mount the drive, add the init to it, umount and then run the vm with: sudo qemu-system-x86_64 \ -boot c \ -...
sef sf's user avatar
  • 72
0 votes
1 answer
21 views

I wanna develop an INIT- how to set up dev env

I wanna make an init, and so I'm gonna need to get a very basic system on a VM probably. What is the best way to go about doing that? I also saw that it might be possible doing this with a docker ...
sef sf's user avatar
  • 72
2 votes
1 answer
126 views

Who actually mounts the file system and creates directories like /bin, /dev, /etc

I have a really basic doubt, which part creates all these directories, where is this configuration of creating directories stored while installing a new OS? What is the order in which these ...
Vyom Yadav's user avatar
0 votes
0 answers
220 views

error execution phase addon/coredns: unable to create a new DNS service: the server was unable to return a response in the time allotted

I am trying to initialize kubeadm using sudo kubeadm init command but I get the following result: [init] Using Kubernetes version: v1.26.0 [preflight] Running pre-flight checks [WARNING Firewalld]...
best_of_man's user avatar
2 votes
1 answer
142 views

System with serial console, which system is responsible for flow control settings

I have a proprietary Linux system, with a proprietary init system, which uses a serial console. I lately noticed, that the xon/xoff flow control is active on this serial console, which poses the risk ...
Sascha's user avatar
  • 121
1 vote
0 answers
338 views

Inside a Docker container, `tini` should be proxying signals to my Java app, but it doesn't seem to be doing so

I'm using tini as my init process to allow me to launch a Java app via a shell script in a container and have my app get signals from Docker when the container is stopped. Given that the problem ...
CryptoFool's user avatar
1 vote
1 answer
146 views

Determine the library or libraries used by the /sbin/init and /bin/sh in FreeBSD

How to determine the library or libraries being used by the /sbin/init and the /bin/sh in FreeBSD? Is it dynamically linked or static?
ordinary_guy's user avatar
0 votes
2 answers
450 views

Require systemd service to be started before executing init.d script

I have a script in /etc/rc.d/init.d/ on a Red Hat 7 system that is provided by a vendor. This script is able to be started and stopped via systemctl, but it appears to not actually be a systemd unit ...
dcom-launch's user avatar
2 votes
0 answers
376 views

WSL service logging like journald

I am running a WSL instance on my machine which starts a bunch of services like atd. What I would like to have is to have an ability to lookup the logs of a specific service like I would do using ...
777moneymaker's user avatar
0 votes
1 answer
123 views

systemd integration

I was asked during an interview this ambiguous question, that I couldn't answer which one of this tools has not had functions integrated into systemd? udev consolekit sysvinit pam syslog
alex's user avatar
  • 1
0 votes
1 answer
324 views

ALSA and PulseAudio starting without being invoked by init system?

Forgive me if this is a noob question, however, I just installed Artix with OpenRC, and while following the guide on setting up ALSA with OpenRC from the gentoo wiki, I was told to add the alsasound ...
Zsargul's user avatar
  • 81
0 votes
2 answers
358 views

How to get the latest usb.ids when update-usbids no longer exists?

I had to move from Debian Jessie to Buster. The script that runs to create a small custom boot disc runs update-usbids to get the latest files to copy over to the build. However it now says update-...
user3161924's user avatar
2 votes
2 answers
2k views

Why oom_reaper when having vm.panic_on_oom = 1

From what I understand from its author : The OOM killer currently allows to kill only a single task in a good hope that the task will terminate in a reasonable time and frees up its memory. (…) It ...
MC68020's user avatar
  • 5,943
1 vote
0 answers
105 views

/sbin/init does not exist after removing duplicates with rmlint

So I executed rmlint to remove duplicates on my archlinux, and executed the script it generated. Then I reboot and got the message bailing out you are on your own. Good luck. And /sbin/init does ...
dahko37's user avatar
  • 11
0 votes
2 answers
600 views

Why can fprintf(stderr, ....) output to screen when stderr doesn't refer to a terminal device?

Given that a simple program: /* ttyname.c */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> int main(int argc, char **...
Li-Guangda's user avatar
2 votes
0 answers
195 views

Why does foreground job ignore job control signals when Bash is running as PID 1?

When bash is invoked as pid 1 directly through the kernel option init=/bin/bash --login, it will issue something like this before prompting: bash: cannot set terminal process group (-1): Inappropriate ...
Li-Guangda's user avatar
0 votes
2 answers
180 views

Why do I have to statically link a c program if I want to use it as the init program for the kernel?

I'm learning about how Linux works and for that I'm watching Tutorial: Building the Simplest Possible Linux System by Rob Landley. He basically goes through some steps to build a minimal system and ...
m4l490n's user avatar
  • 165
2 votes
2 answers
2k views

How to load kernel modules for current hardware in init of minimal Busybox-based system

In a minimal Busybox-based Linux system, which commands must be invoked as part of the init script to ensure all kernel modules for the current hardware are loaded?
Axel Fontaine's user avatar
0 votes
0 answers
177 views

How do I initialize the framebuffer in my init executable?

I have a "Minimal Linux" experiment where I have to take a system as close as possible to the bare kernel and thus I need to write my own init. I know how to do the shutdown, reboot, and ...
Eric Silveira's user avatar
0 votes
2 answers
223 views

Command to reset the system to a state as close as possible to the state after a reboot?

Which commands should I run in a Linux / Ubuntu server to reset the currently-running system to a state as close as possible to the state after a reboot? (without actually rebooting!) I can imagine ...
Basj's user avatar
  • 2,251
1 vote
1 answer
1k views

switch_root: failed to execute /sbin/init: Too many levels of symbolic links

So, recently I was doing the Linux from scratch project and I had multiple terminals open, so I was continuing to make it, and by accident I typed the line in another terminal tab (root), and it ...
kalix's user avatar
  • 13
0 votes
1 answer
64 views

Are RC folders obsolete on Ubuntu?

I am learning Linux, using Ubuntu. I wanted to remove network management from one of the run levels. I had done this correctly before, but now, no matter how hard I try, I can not remove a script from ...
Mani Kamran's user avatar
0 votes
1 answer
160 views

Custom run level

I recall in the past creating a custom run (init) level. Has anyone else come across that? I'm wanting to have a run level invoked in specific conditions. I've searched through current documentation. ...
PJD's user avatar
  • 1
2 votes
1 answer
589 views

How does the Linux kernel know the computer architecture?

In start_kernel(), one of the first things the kernel does is run setup_arch(). setup_arch() is defined for every supported architecture, so it is passed a pointer to the appropriate command line. How ...
Ramsey Alsheikh's user avatar
3 votes
1 answer
264 views

Defunct process on every boot, if I don't kill it, it hangs during shutdown

Every time I boot my PC (Ubuntu 20.04.2 LTS), I have a defunct process: johan@johan-desktop:~$ ps -AF | grep qemu libvirt+ 1596 1 0 0 0 15 07:17 ? 00:00:00 [qemu-system-x86] &...
Johan B.W. de Vries's user avatar
0 votes
1 answer
8k views

systemd says "networking.service failed" but network is up

Normally, I run Gentoo with openrc init, but am installing a Debian 10 server and having some trouble understanding systems. The server boots via a custom dracut initrd which created a bonded network ...
Travis Osterman's user avatar
2 votes
2 answers
684 views

How can I mount /dev from C?

How can I mount /dev from C? I'm writing a simple init, and I know this sounds stupid but I would like to have /dev mounted to another folder. The manpages for mount() don't show dev as a supported ...
Mason M's user avatar
  • 33
0 votes
1 answer
100 views

What happens when I restart a service via systemctl or init

Im trying to understand the lifecycle of a process during the restart. For eg: If we issue the restart command It'll kill the process id remove or flush all the open files in the descriptors. Close ...
TheDataGuy's user avatar
0 votes
1 answer
95 views

Init script still running after boot

I created a 1 line shell script to send me some custom notifications, and it works as intended. I placed the script in /etc/init.d/, ran update-rc.d scan defaults. After reboot, the notifier script is ...
john doe's user avatar
  • 706
1 vote
1 answer
1k views

Dropping to initramfs shell

For many years now I've been an avid windows & mac user. Most recently, the growing love-affair between tech corporatists and government bureaucrats has convinced me to take the plunge into the ...
STYX's user avatar
  • 11
1 vote
1 answer
575 views

Chinese Characters in One of a File

I have found some chinese characters in one of a file on my linux mint 20.1 File - /proc/1/cmdline Chinese Characters - 猯楢⽮湩瑩猀汰獡h But when i open same file in terminal using less command, it shows : /...
Yasin's user avatar
  • 13
0 votes
1 answer
133 views

Launch bash shell using systemd and have it attach to the current terminal

What I'm wanting to do is have systemd launch the bash shell and connect it to my current terminal. The goal is be examine how systemd controls the environment that is created for the processes it ...
Battlerock's user avatar
0 votes
1 answer
425 views

Zombie processes and exiting init

Assuming that I decide, for some reason, to never use the syscall wait ever again in any of the programs I write. Does it mean that my memory will be cluttered with all the finished processes that ...
Eliran Turgeman's user avatar
1 vote
0 answers
1k views

Systemd ordering: after multi-user.target before getty.target?

I have an installer which I turned into a systemd service it needs, networking.target to be online multi-user.target to be online I want my installer service to run after the above but before getty....
Evan Carroll's user avatar
  • 26.9k
2 votes
1 answer
207 views

Why does `exec init` work in podman but not buildah with the same options?

How are these two commands different? Both of them launch a shell as pid 1 and make the same mounts and volumes, buildah run --tty --mount type=tmpfs,destination=/run -v /sys/fs/cgroup:/sys/fs/cgroup:...
Evan Carroll's user avatar
  • 26.9k
2 votes
2 answers
2k views

podman run with --init gives me: Error: container-init binary not found on the host: stat /usr/libexec/podman/catatonit: no such file or directory

When I run podman run --init, I get $> podman run --init -ti cp /sbin/init Error: container-init binary not found on the host: stat /usr/libexec/podman/catatonit: no such file or directory But I ...
Evan Carroll's user avatar
  • 26.9k
3 votes
1 answer
1k views

Hot replacing a PID 1 process inside a container without crashing

As you know a OCI container (more commonly known as Docker container) terminates once its entrypoint process (a.k.a. PID1 inside the container's namespace) exits. However, I'm curious if there's a way ...
ahmet alp balkan's user avatar
0 votes
1 answer
205 views

my startup script does not start when I want to

So I am having a bash script in /etc/init.d/ containing this init info: ### BEGIN INIT INFO # Provides: minio server # Required-Start: $local_fs $remote_fs $mysql $all # Required-Stop: ...
Monocito's user avatar
1 vote
1 answer
3k views

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 - Not able to resolve

I am facing a Kernel panic from which I am not able to solve my way out. I saw some posts regarding the same but none seems to be conclusive. I am trying on a Raspberry Pi 4B hardware to build and use ...
Sreedhar's user avatar
3 votes
1 answer
1k views

kernel cannot execute binaries (error -8)

my platform: SOC = STM32H743 (ARMv7E-M | Cortex-M7) Board = Waveshare CoreH7XXI Linux Kernel = 5.8.10 (stable 2020-09-17) initial defconfig file = stm32_defconfig rootfs = built using busybox | ...
Mahyar Shokraeian's user avatar

1
2 3 4 5
7