meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:systemd [2016/04/06 09:38] – niziak | linux:systemd [2024/02/09 19:24] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== systemd ====== | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| ===== 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 28: | ||
| </ | </ | ||
| + | <code bash> | ||
| + | systemd-cgtop | ||
| + | </ | ||
| ==== emergency mode ==== | ==== emergency mode ==== | ||
| Line 45: | Line 53: | ||
| < | < | ||
| - | === Start service when MMC card is inserted === | + | Enable debug console on tty9 |
| + | <code bash> | ||
| + | |||
| + | ==== Start service when MMC card is inserted | ||
| Create directory " | Create directory " | ||
| List of devices: <code bash> | List of devices: <code bash> | ||
| Line 123: | Line 134: | ||
| === Remove startup console clearing === | === Remove startup console clearing === | ||
| - | <code> | + | <file | / |
| - | / | + | |
| [Service] | [Service] | ||
| TTYVTDisallocate=no | TTYVTDisallocate=no | ||
| + | </ | ||
| + | |||
| + | === udev === | ||
| + | In udev rules.d add TAG+=" | ||
| + | < | ||
| + | SUBSYSTEM==" | ||
| + | SYMLINK+=" | ||
| + | TAG+=" | ||
| + | OPTIONS+=" | ||
| </ | </ | ||
| + | And now device is visible from systemd: | ||
| + | <code bash> | ||
| + | systemctl -l -a | ||
| + | dev-input-event0.device | ||
| + | dev-input-lcd_sandwich_touchscreen.device | ||
| + | </ | ||
| + | You can create refer to device, e.g. create .wants directory | ||
| + | < | ||
| + | |||
| + | === udev: start service === | ||
| + | To start service if device is inserted: | ||
| + | <file | mu.rule> | ||
| + | ..., TAG+=" | ||
| + | </ | ||
| + | |||
| + | === do not mount crypted volumes === | ||
| + | After switching to systemd by command <code bash> | ||
| + | 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 ' | ||
| + | <file | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | === Debian: Set network service timeout === | ||
| + | System startup can hang forever if there is no link on ethernet cable: | ||
| + | < | ||
| + | To set timeout, add file: | ||
| + | <file | / | ||
| + | [Service] | ||
| + | TimeoutStartSec=15 | ||
| + | </ | ||
| + | |||
| + | ====== Issues ====== | ||
| + | |||
| + | ===== init.d services not started ===== | ||
| + | |||
| + | < | ||
| + | systemd-sysv-generator[320]: | ||
| + | systemd-sysv-generator[320]: | ||
| + | systemd-sysv-generator[320]: | ||
| + | </ | ||
| + | |||
| + | Reason is that some init scripts are symlinked to files located in **/opt** directory, which is a different FS (in this case BTRFS subvolume), and it was not mounted when **systemd-sysv-generator** was started. | ||
| + | |||
| + | **Solution: | ||
| + | [[https:// | ||
| + | |||
| + | > Under systemd-enabled systems, there' | ||
| + | > You also need to make sure that your filesystem' | ||
| + | |||
| + | |||
| + | |||