Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 vote
2 answers
56 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 ...
user avatar
  • 2,161
1 vote
0 answers
16 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 ...
user avatar
  • 11
0 votes
2 answers
85 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 **...
user avatar
0 votes
0 answers
91 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 ...
user avatar
0 votes
0 answers
16 views

Which script for LFS with runit? (there are two)

Building LFS with runit here, i came across two different scripts for installing and configuring LFS with runit. The first one is in the official hints repository and the other one is independent, ...
user avatar
  • 1
0 votes
0 answers
14 views

Can I build CLFS with runit?

I wanted to ask if its possible to use runit with CLFS, im aware there is a git repo for LFS with runit, but im not sure if its the same process to do so.
user avatar
  • 1
0 votes
2 answers
77 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 ...
user avatar
  • 156
1 vote
2 answers
266 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?
user avatar
0 votes
0 answers
74 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 ...
user avatar
0 votes
2 answers
46 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 ...
user avatar
  • 2,113
1 vote
1 answer
286 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 ...
user avatar
0 votes
0 answers
23 views

How to mount a disk in pre-init environment

I'm working on a test that starts a VM (in OpenStack) by mounting a disk with pre-provisioned operating system (let's call it vda, with a single partition vda1). Then the test adds a bunch more disks, ...
user avatar
  • 605
0 votes
0 answers
52 views

linux kernel cannot find init

I'm running Linux kernel 5.14 with u-boot on a custom ARM board with 32MB of ram and 1GB micro-sdcard. this proves that I have the init files in my rootfs: (u-boot command-line) U-Boot > ext4ls mmc ...
user avatar
0 votes
1 answer
56 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 ...
user avatar
0 votes
1 answer
49 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. ...
user avatar
  • 1
2 votes
1 answer
539 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 ...
user avatar
3 votes
0 answers
108 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] &...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
2 votes
2 answers
228 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 ...
user avatar
  • 33
0 votes
0 answers
699 views

PPM init failed on boot

I was trying to install Qtile on Ubuntu 20.04 following the instructions. It advised that I install libpangocairo-1.0-0 after installing xcffib and cairocffi. Because xcffib was installed and it didn'...
user avatar
  • 155
0 votes
1 answer
25 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 ...
user avatar
0 votes
1 answer
38 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 ...
user avatar
  • 486
1 vote
1 answer
492 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 ...
user avatar
  • 11
1 vote
1 answer
236 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 : /...
user avatar
  • 13
0 votes
1 answer
91 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 ...
user avatar
0 votes
1 answer
107 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 ...
user avatar
1 vote
0 answers
513 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....
user avatar
  • 22.5k
2 votes
1 answer
116 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:...
user avatar
  • 22.5k
1 vote
2 answers
929 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 ...
user avatar
  • 22.5k
2 votes
1 answer
483 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 ...
user avatar
0 votes
1 answer
57 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: ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
2 votes
1 answer
672 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 | ...
user avatar
0 votes
1 answer
413 views

Running a process under systemd init for containerization?

Docker provides for the ability to run a command when the container starts. This is specified with CMD in the Dockerfile. However, if I want my container to start with systemd I have to use, CMD [&...
user avatar
  • 22.5k
5 votes
3 answers
521 views

What are systemd runtime unit files for?

The documentation I have read on systemd unit files states that unit files can be found in three locations on the filesystem: /etc/systemd/system/: system unit files /run/systemd/system/: runtime ...
user avatar
0 votes
4 answers
475 views

What is dependency-based init system?

My knowledge about init is limited. All the things I know is that init is the first process that kernel starts after getting booted and is assigned with Process ID of 1. Recently while going through ...
user avatar
  • 21.6k
5 votes
2 answers
24k views

Missing modules (cat /proc/modules; ls /dev) and UUID doesn't exist in BusyBox

I'm stuck in the boot and can't open any terminal. When I try to boot my laptop it shows the following error: Gave up waiting for root device. Common problems: -Boot args (cat /proc/cmdline) -Check ...
user avatar
  • 153
1 vote
0 answers
52 views

Recover from wrong PID 1 process

I’ve just run into a curious situation. To set up a new server, I logged into the OS preinstalled by the hosting provider and performed a pivot_root to a tmpfs so I could unmount the drives and ...
user avatar
1 vote
2 answers
111 views

Are 'per-user' daemon services a new thing?

I always had the impression that daemon processes were system-wide services that are run, owned, controlled and maintained by the 'init' system. However, I have recently learned that some daemon ...
user avatar
  • 2,122
0 votes
0 answers
268 views

What does "touch /reconfigure" before a reboot do?

We have a situation that spontaneous shutdowns are occurring on our Wind River Linux 6 system, and in the syslog, I see a /bin/touch /reconfigure followed by an /sbin/init 0. I can tell from another ...
user avatar
0 votes
1 answer
302 views

How are the kernel daemons running automatically?

I have written my custom init (PID 1) script. In that script I have just mounted the necessary filesystems, but if I run ps aux the list is similar to below: / # ps aux PID USER TIME COMMAND ...
user avatar
0 votes
1 answer
233 views

Where should I `dd` mfsBSD to get it to boot correctly?

I'm trying to install freeBSD onto a VPS (OVH provider). So far, the third method from this response has come the closest to getting me where I want to go. I think OVH has a problem with nested ...
user avatar
0 votes
0 answers
431 views

Network interface is not ready until I try and bring it up

My network interface does not come up when I boot. This was happening with systemd, and I switched to sysv (which I know better) and it's still happening. This is after I boot, no matter how long I ...
user avatar
  • 265
1 vote
0 answers
281 views

How to use host PTY in container?

I'm learning about container technologies of Linux and wrote a minimal container implementation on my own. I'm currently confused about consoles / terminals for container processes, as I'm "reusing" ...
user avatar
  • 2,902
0 votes
3 answers
43 views

How does Linux know what function to choose in rcX.d directory?

For example, I have the following script: ... start(){ echo "Starting..." su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole" ...
user avatar
  • 317
0 votes
1 answer
35 views

mounting a duplicate (swap) partition by parameter name

I'm trying to build a system with a duplicate partition that only one of the partition that is duplicated is mounted to the system. The scenario is like this: Suppose i have the following partition ...
user avatar
  • 101
1 vote
1 answer
45 views

Transfer running instance of OS to another machine

Theoretical question, but for example, is it possible to hibernate on a laptop and boot into that image on a desktop which could have otherwise identical configuration in terms of distro/config files. ...
user avatar
1 vote
1 answer
1k views

AIX and daemon service

I see that the daemon service is started and stopped via the commands: startsrc and stopsrc on group/subsystem. I have init.d script and I want to make it daemon service in AIX. From these commands ...
user avatar
  • 21
0 votes
1 answer
4k views

init: must be run as PID 1

Recently encountered a problem: when entering init 1, it gives an error: init: must be run as PID 1. I Entering ps and it turns out that /sbin/init has PID 1. How now can I use init?
user avatar
1 vote
0 answers
204 views

linux suspicious process spawn by init

i found a suspicious process,it spawn by process 1 (init),as per the guide i doble check the /etc/rc.d/rc3.d ,but i can't found a entry named Sxxkauditd,no suspiciou entyr found in the inittab file ,...
user avatar

1
2 3 4 5
7