📖 ~1 min read
Table of contents
Symptom & Impact
Memory pressure leads to OOM kills because swap is missing or inactive.
Environment & Reproduction
Ubuntu 18.04 VMs where swapfile was removed, misconfigured, or not mounted after reboot.
Root Cause Analysis
Invalid /etc/fstab entry, incorrect swapfile permissions, or disabled swap policy.
Quick Triage
Use swapon –show, free -h, and grep swap /etc/fstab to verify active configuration.
Step-by-Step Diagnosis
Check swapfile existence, mode 600, and run sudo systemctl status proc-sys-fs-binfmt_misc.mount only if boot parsing errors appear.

Solution – Primary Fix
Create swapfile with fallocate, chmod 600, mkswap, swapon, and persist 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
Attach dedicated swap partition for predictable performance on high-memory-pressure workloads.
Verification & Acceptance Criteria
swapon –show lists active swap after reboot and OOM events decline.
Rollback Plan
Disable swap with swapoff and restore previous fstab if performance characteristics regress.
Prevention & Hardening
Set vm.swappiness appropriately and monitor memory plus swap usage trends.
Related Errors & Cross-Refs
Out of memory Kill process, swapoff failures, and fstab parse warnings.
Related tutorial: View the step-by-step tutorial for Ubuntu 18.04 LTS.
View all Ubuntu 18.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
man swapon, man mkswap, and Ubuntu swapfile documentation.
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.