meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
linux:systemd [2016/05/02 08:48] – [Debug] niziaklinux:systemd [2017/05/22 14:22] niziak
Line 1: Line 1:
 ===== HowTo ===== ===== HowTo =====
 ==== start / stop ==== ==== start / stop ====
 +Rerun all generators, reload all unit files and recreate dependency tree:
 <code bash> <code bash>
 systemctl daemon-reload systemctl daemon-reload
Line 23: Line 24:
 </code> </code>
  
 +<code bash>
 +systemd-cgtop
 +</code>
  
 ==== emergency mode  ==== ==== emergency mode  ====
Line 126: Line 130:
  
 === Remove startup console clearing === === Remove startup console clearing ===
-<code> +<file | /etc/systemd/system/getty@tty1.service.d/noclear.conf>
-/etc/systemd/system/getty@tty1.service.d/noclear.conf+
  
 [Service] [Service]
 TTYVTDisallocate=no TTYVTDisallocate=no
-</code>+</file>
  
 === udev === === udev ===
Line 142: Line 145:
 </code> </code>
 And now device is visible from systemd: And now device is visible from systemd:
-<code>+<code bash>
 systemctl -l -a systemctl -l -a
   dev-input-event0.device                                                                        loaded    active   plugged   /dev/input/event0   dev-input-event0.device                                                                        loaded    active   plugged   /dev/input/event0
Line 150: Line 153:
 <code>/etc/systemd/system/ev-input-lcd_sandwich_touchscreen.device.wants</code> <code>/etc/systemd/system/ev-input-lcd_sandwich_touchscreen.device.wants</code>
  
 +=== udev: start service ===
 +To start service if device is inserted:
 +<file | mu.rule>
 +..., TAG+="systemd", ENV{SYSTEMD_WANTS}="netctl-auto@mywifi.service"
 +</file>
 +
 +=== do not mount crypted volumes ===
 +After switching to systemd by command <code bash>apt-get install systemd-sysv</code>, new problem occurs: 
 +system boot stops and waits for password for encrypted partition (with user data - no needed to system start).
 +
 +To prevent automount of crypted volumes, additional parameters 'noauto' and 'noearly' must be added to /etc/crypttab:
 +<file | /etc/crypttab>
 +/MyMountPoint /dev/vg_MyName/lv_MyName none luks,noauto,noearly
 +</file>
 +
 +=== Debian: Set network service timeout ===
 +System startup can hang forever if there is no link on ethernet cable:
 +<code>   **] A start job is running for LSB: Raise network interf...38s / no limit)</code>
 +To set timeout, add file:
 +<file | /etc/systemd/system/networking.service.d/reduce-timeout.conf>
 +[Service]
 +TimeoutStartSec=15
 +</file>