OS 충돌 및 하드 재부팅 후 시스템 장치를 찾을 수 없음

OS 충돌 및 하드 재부팅 후 시스템 장치를 찾을 수 없음

저는 Linux Mint 커널 버전 4.15.0-42-generic을 실행 중이고 사용자 systemd 서비스 파일이 있습니다 ~/.local/share/systemd/user/my.service.

[Unit]
Description=My service
After=network.target
After=systemd-user-sessions.service
After=network-online.target
StartLimitBurst=5
StartLimitIntervalSec=30s

[Service]
ExecStart="/my/command"
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=5
PrivateTmp=true
Environment=DISPLAY=:0

[Install]
WantedBy=default.target

설치 방법은 파일을 배치한 후 systemctl --user daemon-reload, 를 실행하는 것 입니다 systemctl --user enable my.service.

OS가 충돌하여 하드 재부팅(전원 주기)을 시작하지 않는 한 완벽하게 작동합니다. 다시 로그인 후 서비스가 실행되지 않습니다.

사실 발견조차 되지 않았습니다.

재부팅 후 첫 번째 명령은 파일이 여전히 존재하고 변경되지 않았음에도 불구하고 systemd가 서비스를 잃었음을 증명합니다.

matt@brego:~$ systemctl --user status my.service
Unit my.service could not be found.

matt@brego:~$ ls -la ~/.local/share/systemd/user
total 20
drwxr-xr-x 2 matt matt 4096 Oct 16 15:56 .
drwxr-xr-x 3 matt matt 4096 Sep 28 13:58 ..
-rw-r--r-- 1 matt matt  458 Oct 16 15:56 my.service

matt@brego:~$ loginctl list-sessions
   SESSION        UID USER             SEAT             TTY             
        c2       1000 matt             seat0                            

1 sessions listed.

실행 중이 systemctl --user start my.service거나 systemctl --user enable my.service동일한 오류가 발생합니다.Unit my.service could not be found.

실행 systemctl --user daemon-reload한 다음 서비스를 활성화해야 합니다. 모든. 시간. 뒤쪽에. 딱딱한. 재시작.

사용자 로그인, 시스템 재부팅 및 전원 껐다 켜기 후에 systemd가 서비스를 실행하도록 하려면 어떻게 해야 합니까? 그리고 서비스도 잊지 마세요?

추가 질문을 해결하기 위해 편집

동일한 사용자로 하드 재부팅 후 다양한 명령 출력:

matt@brego:~$ cat /etc/pam.d/systemd-user 
# This file is part of systemd.
#
# Used by systemd --user instances.

@include common-account

session  required pam_selinux.so close
session  required pam_selinux.so nottys open
session  required pam_loginuid.so
session  required pam_limits.so
@include common-session-noninteractive
session optional pam_systemd.so

matt@brego:~$ ps -U ${UID} -f | grep systemd
matt      1341     1  0 13:34 ?        00:00:00 /lib/systemd/systemd --user
matt      1384  1341  0 13:34 ?        00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
matt      6870  1913  0 14:12 pts/1    00:00:00 grep --color=auto systemd

matt@brego:~$ systemctl --user list-units --type=target
UNIT           LOAD   ACTIVE SUB    DESCRIPTION                                                                        
basic.target   loaded active active Basic System                                                                       
default.target loaded active active Default                                                                            
paths.target   loaded active active Paths                                                                              
sockets.target loaded active active Sockets                                                                            
timers.target  loaded active active Timers                                                                             

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

5 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

matt@brego:~$ systemctl --user status default.target
● default.target - Default
   Loaded: loaded (/usr/lib/systemd/user/default.target; static; vendor preset: enabled)
   Active: active since Tue 2018-12-04 13:34:34 MST; 38min ago
     Docs: man:systemd.special(7)

Dec 04 13:34:34 brego systemd[1341]: Reached target Default.

관련 정보