core-agent-linux/vm-systemd/dev-xvdc1-swap.service
Marek Marczykowski-Górecki 7f15690e43
Add a service to enable swap early - before fsck of the root filesystem
fsck may require significant amount of RAM, enable swap earlier to avoid
out of memory condition. Implement this as a separate service unit, not
a swap unit, because the latter requires udev running (implicit
dependency on dev-xvdc1.device) which is not the case before remounting
root filesystem read-write.

QubesOS/qubes-issues#6174
2020-11-03 05:18:57 +01:00

14 lines
324 B
Desktop File

[Unit]
# have it as .service, not .swap, because .swap has implicit dependency on
# .device which needs udev running already
Description=Enable swap on /dev/xvdc1 early
DefaultDependencies=no
Before=systemd-fsck-root.service
[Service]
Type=oneshot
ExecStart=-/usr/sbin/swapon /dev/xvdc1
[Install]
WantedBy=sysinit.target