init

Shut down actions order: write buffers after RO root remount

Shut down actions order: write buffers after RO root remount Exploring amazing Book How Linux Works by Brian Ward I usually have no question. But this one. At the "6.7.0 Shutting Down Your System" there is an ordered list of jobs. After remount root file system in ReadOnly mode (6) write buffered data by the …

Total answers: 2

Can I call /sbin/init from init script

Can I call /sbin/init from init script Let us say I have a custom init like this #!/bin/bash sleep infinity Which of these will load init #!/bin/bash /sbin/init sleep infinity #!/bin/bash exec /sbin/init sleep infinity I know that exec is supposed to start a new shell but is it necessary? Asked By: Bret Joseph || …

Total answers: 1

Alpine Linux in Raspberry Pi not activating swap partition on boot

Alpine Linux in Raspberry Pi not activating swap partition on boot Probably this is a really naïve question, but I can’t make this work by trying the methods I’ve found in the existing documentation or in other solutions. I have Alpine Linux installed on a Raspberry Pi, which SD card is formatted to have the …

Total answers: 1

Who mounts /proc and /sys in GNU/Linux systems?

Who mounts /proc and /sys in GNU/Linux systems? If you build a custom GNU/Linux system for an embedded device, do you need to execute mount -t proc proc /proc mount -t sysfs sysfs /sys somewhere in init process or is this done automatically by the kernel? I’ve read contradicting statements about this. An embedded Linux …

Total answers: 1

Which user does systemd start services as?

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 mother of all processes in Linux, and in my …

Total answers: 2

Stop not called for init rc.d service

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 return 0 } start() { if [ -f "$PIDFILE" ] && kill -0 "$(cat "$PIDFILE")"; then echo ‘Service already running’ return 1 fi …

Total answers: 1

How to integrate C program with init file?

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 program instead of …

Total answers: 1

What packages in a systemd distro rely on it?

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? What is systemd-specific here? Asked By: sef sf …

Total answers: 1

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

making an init: how exactly does the reboot command work? I’m trying to write an init, but can’t figure out the rebootpoweroff thing. apparently reboot is just a link to systemctl? (I’m using arch) So how does this work? init poweroff works and stuff, but reboot/poweroff just seems to be linked to systemctl Asked By: …

Total answers: 1

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

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 directories are created? Are they created after /boot has been …

Total answers: 1

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

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? Asked By: ordinary_guy || Source Using file and ldd: $ file /bin/sh /bin/sh: ELF 64-bit LSB pie executable, x86-64, …

Total answers: 1

ALSA and PulseAudio starting without being invoked by init system?

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 service to OpenRC using: rc-update add alsasound boot …

Total answers: 1

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

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-usbids command not found. Looking around people …

Total answers: 2

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

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] <defunct> johan 4109 4099 0 2260 2688 6 07:17 pts/1 …

Total answers: 1

What are systemd runtime unit files for?

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 unit files /lib/systemd/system/ (also sometimes /usr/lib/systemd/system/): default unit files for packages I understand that system unit files are for (possibly …

Total answers: 4

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

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 rootdelay= (did the system wait long enough?) -Missing …

Total answers: 2

Failed to activate service 'org.freedesktop.systemd1': timed out

Failed to activate service 'org.freedesktop.systemd1': timed out On ubuntu 16.04.6 on trying to mask a systemd service. I am seeing errors like below. systemctl mask hadoop-hdfs-zkfc.service Failed to activate service ‘org.freedesktop.systemd1’: timed out I am using the default systemd version that comes with Ubuntu 16.04.6. ubuntu@platform1:~$ systemctl –version systemd 229 +PAM +AUDIT +SELINUX +IMA +APPARMOR …

Total answers: 3

Where is fsck run?

Where is fsck run? I was reading through all the things that are run during bootup and have seen that after mounting the rootfs, /sbin/fsck.ext4 is run and after that systemd is run. I was wondering where or how fsck is run, because I was searching for it in the kernel source code and couldn’t …

Total answers: 2

Running a systemd service as a user other than root!

Running a systemd service as a user other than root! I created the following service, amos.service, and it needs to run as amos (member of the amos group) [Unit] Description=AMOS Service After=network.target [Service] User=amos Group=amos Type=simple WorkingDirectory=/usr/share/amos ExecStart=/usr/share/amos/amos_service.sh start ExecStop=/usr/share/amos/amos_service.sh stop Restart=on-failure [Install] WantedBy=multi-user.target all the permissions have been set on /usr/share/amos to amos:amos the …

Total answers: 4

What init 1 command exactly does?

What init 1 command exactly does? Well to be honest I love finding Loopholes in everything, I was watching a TV Serial Mr Robot and at some point a character mentioned init 1 command, that her computer started crashing again and again and she lost her mind after using that command. I am studying OS …

Total answers: 2