π ~1 min read
Table of contents
Symptom & Impact
System runs without swap, causing early OOM kills under memory pressure.
Environment & Reproduction
Common after moving swap file or editing fstab on Ubuntu 22.04 LTS.
Root Cause Analysis
Swap entry path, UUID, permissions, or fstab syntax is invalid at boot.
Quick Triage
Confirm swap file exists and has mode 600 before enabling.
Step-by-Step Diagnosis
Inspect systemd swap unit and boot logs for activation errors.

Solution – Primary Fix
Recreate and initialize swap file, then persist it in /etc/fstab.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use a dedicated swap partition if swap file performance is insufficient for workload.
Verification & Acceptance Criteria
swapon –show displays active swap after reboot and memory pressure tests stabilize.
Rollback Plan
Remove new swap entry and restore previous fstab if boot warnings increase.
Prevention & Hardening
Track swap configuration in versioned infrastructure scripts and monitor OOM events.
Related Errors & Cross-Refs
Often coincides with high memory consumption by Java, browser, or container workloads.
Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.
View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
See Ubuntu swap file guidance and man swapon, man mkswap.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.