Affected versions: Ubuntu 22.04 LTS

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

System runs without swap, increasing risk of OOM kills under memory pressure.

Environment & Reproduction

Ubuntu 22.04 with manual swap partition/file changes and stale fstab line.

Root Cause Analysis

swap target in /etc/fstab references wrong UUID or incorrect device path.

Quick Triage

Run swapon –show and compare blkid output with /etc/fstab swap entry.

Step-by-Step Diagnosis

Validate permissions and signature of swap file or partition, then test swapon manually.

Illustrative mockup for ubuntu-22-04-lts β€” swap_fstab_diag
swapon –show returns empty after reboot β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Correct fstab swap line with valid UUID or file path, then run swapon -a.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-22-04-lts β€” swap_fstab_fixed
Correct swap UUID configured and active β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Create a new swapfile with fallocate, chmod 600, mkswap, and persistent fstab mapping.

Verification & Acceptance Criteria

swapon –show lists expected swap and free -h reflects configured capacity.

Rollback Plan

Restore previous fstab and disable new swap target if instability appears.

Prevention & Hardening

Validate fstab syntax with mount -a and peer review before reboot.

Boot delays and emergency mode can occur with malformed fstab entries.

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

Ubuntu 22.04 swap configuration and fstab best practices.

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.