Questions tagged [systemd]

systemd is an alternative approach to SystemV and Upstart init daemons for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead.

Filter by
Sorted by
Tagged with
0
votes
1answer
34 views

Get version of boot file

I'm trying to figure out how systemd-boot determines the version of its boot file. In my current setup (all VMs), I'm running Debian 10, Fedora 34, and Manjaro 21.0.7, all using the same bootloader. ...
0
votes
0answers
10 views

How to run a command depending on snapd when shutdown or reboot is requested?

I would like to run the command /snap/bin/microk8s.stop and wait for it's termination before my system is shutdown or rebooted. It is provided by the snap microk8s. The command fails in a number of ...
0
votes
1answer
36 views

Why is my systemd startup script not running properly? (ubuntu 20.04)

I have created two systemd startup scripts as per https://www.howtogeek.com/687970/how-to-run-a-linux-program-at-startup-with-systemd/, containing the following: #1 #!/bin/bash synclient ...
1
vote
1answer
39 views

Failed to mount /sysroot - zfs on lvm on luks with detached header

I tried to install a fresh system. With encrypted zfs and a detached header and boot on usb. But I can't boot, because the mount of /sysroot is failing. I tried changing the kernel parameters and ...
3
votes
4answers
3k views

Using systemd-timesync on a read-only / filesystem

I'm trying to set-up a Raspberry Pi with read-only filesystems. The base image is the debian buster lite raspbian image. Most stuff is working, e.g. had to do simple fixes like: mv /etc/resolv.conf /...
0
votes
0answers
26 views

Need Help Running Process at Bootup

Tried guide from here. Edited this file with nano: /etc/systemd/system/myservice.service. .service file is: [Unit] Description=DOESN'T WORK. [Service] Type=oneshot RemainAfterExit=yes ExecStart=/home/...
1
vote
1answer
16 views

Systemd automount with custom command

I use tomb to store some files. I want to use a systemd .automount unit so that whenever I try to access these files, the tomb is automatically mounted. However, tombs are not mounted with mount, they ...
1
vote
2answers
2k views

systemd service fle: Restart=on-failure not allowed for Type=oneshot services

I created a systemd service file to run two rsync commands sequentially and I need to retry until successful. Sometimes the rsync server is down. Systemd tells me Restart=on-failure is not allowed for ...
7
votes
1answer
174 views
+50

Stop systemd user services as root user

I have a systemd A@.service that every user on the server can start with systemd --user start A@1.service. As root I would like to stop that service for all users when we do maintenance. I haven't ...
0
votes
0answers
6 views

systems services and Udev rules execution priorities

I have a Udev rules to rename the ethernet card and some PCI devices. I have included some scripts to execute as part of rules. But some rename related tasks are already present in /etc/systemd/system/...
0
votes
0answers
12 views

systemd change hostname without logging out

I have a systemd service that reads some environment values (that may change at startup) and set the hostname accordingly. The service at the moment is a mix of several tries [Unit] Description=...
1
vote
2answers
1k views

Suppress systemd: “Directory to mount over is not empty, mounting anyway.”

I am purposefully mounting a read-write copy of a directory on top of the read-only version of itself. This generates a log message such as: Aug 27 14:31:02 svelte systemd[1]: mnt-btrfs\x2dvol-...
2
votes
0answers
27 views

Struggling with systemd and user permissions for backup script

I could use some help with figuring out the right way to accomplish what I need using systemd. I feel like I have backed myself in between a rock and a hard place and am not sure where to go. here is ...
0
votes
1answer
18 views

systemd start a script that activate virtual env not take effect

I was trying to systemd a flask app. I tried to write a script like this: #!/bin/bash cd /path/to/app source venv/bin/activate python start.py and just ExecStart this script in the .service file. But ...
3
votes
0answers
235 views

pam_winbind is logging passwords

Occasionally, a systemd unit using a pam module that uses pam_winbind logs a users password. Systemd unit log: Mar 25 15:47:41 display-server node[5969]: pam_succeed_if(grooming:auth): requirement "...
0
votes
1answer
136 views

Linux takes long time to boot after resizing and moving partitions

A while ago i installed a new NVME drive in my computer and installed Windows on it. I removed the old Windows installation from my old SSD so that my Linux installation could use all of it. I then ...
11
votes
3answers
22k views

Setting console font in vconsole.conf does not work (systemd)

I am trying to set a different default console font for my new Arch Linux installation (using systemd). I set up my vconsole.conf in /etc as so: KEYMAP=us FONT=Lat2-Terminus16 I rebooted and saw my ...
0
votes
0answers
19 views

View/Manage all autostart/startup softwares and services

Is there a cross-distro way or software (cli or gui) which lists/manage all autostart/startup softwares and services? For example all softwares/services in: /etc/init.d/ /etc/xdg/autostart/ /etc/...
0
votes
0answers
14 views

Arch linux: Often random internet connection loss accompanied by short switch to IPv6

I often loose my internet connection on my Arch linux thinkpad. I have my IP address shown on my i3status bar so I can see changes in real time. The issue goes like this: IP address switches to IPv6 ...
1
vote
2answers
44 views

Systemd service not working with Java and Python

I'm running my Discord Music Bot on a VPS, and to start the bot as the VPS does, I have a service called "bot.service" (located in /etc/systemd/system), which have the following: [Unit] ...
0
votes
0answers
12 views

Optional 'nofail' mount of partition for /var/log that does not prevent systemd-journal-flush service starting

I tried adding a unit that mount a partition as /var/log, using the nofail option: [Unit] Description=Log Directory (/var/log) [Mount] Where=/var/log What=/dev/disk/by-label/device-logs Type=ext4 ...
0
votes
0answers
17 views

Dynamic swap file with systemd swap unit

On each boot a temporary partition is mounted at /mnt/tmp. The temporary partition varies in size. I need to set a swapfile on it which is half the size of the partition. Is this possible with systemd ...
0
votes
1answer
23 views

Does the override.conf file change the actual service file conf?

I have created an override.conf file for systemd-journal-catalog-update.service and placed it in systemd-journal-catalog-update.service.d/ directory. The purpose it to remove systemd-tmpfiles-setup....
4
votes
2answers
16k views

How to fix “.service: Start request repeated too quickly.” on custom service?

I'm learning how to create services with systemd. I get this error: .service: Start request repeated too quickly. I can't start the service any more; it was working yesterday. What am I doing wrong? ...
0
votes
0answers
39 views

Boot into a usb from Pop OS. Can't find other images

So I installed Pop Os on my old mac-book air. And it worked quite ok. However, I decided to try lubuntu on it and erase Pop OS. I know that Pop OS doesn't use grub as bootloader and instead the ...
1
vote
1answer
15 views

Wait for mount before starting services

I have a Raspbian 9 system with an external hard disk, which gets mounted as /srv/file during boot. I am running PostgreSQL and BIND, both of which have data files residing on that disk. On startup, ...
4
votes
4answers
4k views

Kubuntu 20.04 Shutdown/Reboot Hangs At “Waiting for process: crond”

I'm running Kubuntu 20.04. 3 out of 4 times when I shutdown or reboot, it hangs at: Reached target Reboot. systemd-shutdown[1]: Waiting for process: crond I've spent a fair bit of time googling, ...
0
votes
1answer
21 views

Systemd Timer has no trigger

My systemd timer is configured the following way which should execute its service every 5 minutes. [Unit] Description=Sync mail [Timer] OnCalendar=*:0/5 Unit=mail.service [Install] WantedBy=multi-...
379
votes
13answers
416k views

How to clear journalctl

I couldn't find in google any safe way to clear systemd journal. Do anyone know any safe and reliable way to do so? Let's say I was experimenting with something and my logs got cluttered with various ...
656
votes
5answers
903k views

How to see full log from systemctl status service?

I check service status with systemctl status service-name. By default, I see few rows only, so I add -n50 to see more. Sometimes, I want to see full log, from start. It could have 1000s of rows. Now,...
2
votes
1answer
45 views

Why does dmesg need sudo if journalctl can access the same info without root?

These days, at least in Arch Linux (probably true for other distros too? 1), dmesg needs sudo, otherwise it doesn't work: $ dmesg dmesg: read kernel buffer failed: Operation not permitted On the ...
2
votes
1answer
3k views

Reload network interfaces without rebooting

I'm doing a BASH script for Arch Linux in a Raspberry Pi 2. The thing is that in some point I'd like to reload the network interfaces without reboot and have my new named network interfaces (en0 and ...
0
votes
0answers
52 views

Systemd on debian and ubuntu restarting services weekly, why?

I have several Debian 10 and Ubuntu 20.04 VMs. I have zabbix alerts setup to tell me when services restart, and 2 of these VMs are restarting all their services at midnight every week. I have looked ...
1
vote
0answers
43 views

How to run a script to leave domain with systemd right before shutdown?

Right before shutdown I would like to run a script that makes an instance leave our domain on shutdown. I have this as the .service file: [Unit] Description=Service to remove domain join After=network-...
2
votes
1answer
31 views

Wireguard service is “inactive (dead)” on boot

I have a Raspberry Pi 4 running Ubuntu 21.04 using the system-installed Wireguard. It doesn't start correctly on boot. I previously had Ubuntu 20.10 installed, and the same occurred there. On boot: $ ...
3
votes
2answers
301 views

screen inside systemd wants 777 permissions on /run/screen but 775 outside

I am trying to run an application as a systemd service inside a screen container. When trying to start the service it fails with the error message: screen[11648]: Directory '/run/screen' must have ...
1
vote
1answer
113 views

Cannot add systemd-analyze to Buildroot image

I decided to use systemd in my embedded linux system to be able to use systemd-analyze tool. I can add both systemd and systemd-analyze in my config, but after runing my system on Raspberry Pi 4, I ...
0
votes
1answer
19 views

Why does systemd randomly fail to mount a remote NFS directory?

Ubuntu 20.04. I have a systemd mount file that mounts a remote NFS path. The mount file looks like this: [Unit] Description=/userdata Wants=network-online.target After=network-online.target [Mount] ...
1
vote
1answer
2k views

systemd: Start request repeated too quickly

If I run this command from terminal, it works fine: bundle exec /home/ubuntu/.rbenv/shims/puma -C /var/www/html/mysite/config/puma.rb But if I was to put that in ExecStart in a systemd service unit ...
29
votes
5answers
53k views

Restarting systemd service on dependency failure

What's the right approach to handle restarting a service in case one of its dependencies fails on startup (but succeeds after retry). Here's a contrived repro to make the problem clearer. a.service ...
0
votes
0answers
19 views

Network Manager not working on arch

so ive been using arch for about 4 months and just now i closed the lid of my laptop. It disabled my internet connection. When i launch htop to check my background proceses i see networkmanager ...
3
votes
2answers
994 views

Systemd user units fail to auto-start

The unit file works when manually started. systemctl --user enable does not auto-start the service after user login. Unit File [Unit] Description = VNC Duplicate Display RDP After = default.target [...
14
votes
3answers
21k views

Setting DISPLAY in systemd service file

I'm trying to learn systemd services by trying to start xclock as a service; the service file is below [Unit] Description=clock [Service] Environment=DISPLAY=:0 ExecStart=/usr/bin/xclock [Install] ...
1
vote
0answers
25 views

systemd: How to list or edit a masked service unit file definition?

Normally one can see what is the definition of a foo.service unit file the following ways: systemctl cat foo.service Or, alternatively: systemctl edit --full foo.service In the examples above, you ...
0
votes
1answer
10 views

Errors in systemd service when the command requires realtime midi and alsa thread scheduling

I have this service unit file: Type=simple User=meghdad ExecStart=/etc/startpianoteq.sh [Unit] Description=Pianoteq using a preset [Install] WantedBy=multi-user.target This service would run a ...
0
votes
1answer
1k views

CentOS 7 - running FFMPEG as a service

I'm writing some tests for a video streaming project. In order to check that I stream video correctly, I've set up a VM that runs a video client (e.g ffmpeg / vlc) as a daemon. I want that, on command,...
6
votes
1answer
7k views

Enable systemd-backlight@intel_backlight instead of systemd-backlight@acpi_video0

I have 2 files in /sys/class/backlight/ - acpi_video0 and intel_backlight. intel_backlight is the one which controls my screen brightness (echo/cat), however acpi_video0 is the default. By default, ...
0
votes
1answer
30 views

What happens when I turn my ethernet off? What steps does the OS perform once I turn the ethernet OFF?

I want to know what actually happens once I turn my ethernet OFF. What does the OS do on a network layer? Does it flush the routing table or anything like that.
0
votes
0answers
12 views

multiple DNS services

On my Fedora system : a simple PC workstation behind a provider box with an extra laptop also on Fedora, I have dnsmasq, avahi-daemon and systemd-resolved which all manage DNS connections. avahi-...
0
votes
1answer
21 views

How do I print into the journal from a systemd environment generator?

I am working on an embedded system. I wrote an environment generator in bash and it seems to work just fine. However I get some errors in the journal: May 28 02:03:14 imx6ull14x14evk systemd[121]: /...

1
2 3 4 5
71