meta data for this page
  •  

This is an old revision of the document!


start/ stop

systemctl daemon-reload
systemctl start servicename

info/status

# systemctl get-default
multi-user.target
systemd-analyze critical-chain
systemctl --failed

DefaultDependencies

Value for unit DefaultDependencies is set to yes by default. it will add following dependencies:

  • Conflicts=shutdown.target to stop service during shutdown
  • Conflicts=umount.target to umount mounts durign shutdown
  • Requires=basic.target and After=basic.target

emergency mode

Prevent services from running

If services are defined with DefaultDependencies=no, they will be started unconditionally even in emergency mode, wchich can be wrong.

If mount fails

local-fs.target is configured to go to OnFailure=emergency.target. File /etc/fstab is parsed by systemd-fstab-generator to generate .mount units, which are Required.

To let mounts fail without switching to emergency mode, special attribute are introduced to fstab. http://www.freedesktop.org/software/systemd/man/systemd.mount.html

Debug

Kernel commandline:

systemd.unit=emergency
systemd.log_level=debug systemd.log_target=console console=ttyS0,38400