NVMe Drive Doesn't Boot Anymore - Swap Issue

Abstract: Fix NVMe boot failure caused by mismatched swap UUIDs in /etc/fstab or initramfs.

Created: 2026-07-30 by
An NVMe drive failing to boot due to swap issues usually stems from the system attempting to activate a swap partition or file that is missing, corrupted, or improperly configured in /etc/fstab or the initramfs. This often results in a kernel panic or a drop into an emergency shell because the root filesystem cannot mount fully if critical dependencies fail. The most common cause is a mismatch between the UUID stored in configuration files and the actual partition identifiers after reformatting or disk replacement.

Identifying the Boot Failure Symptom

When an NVMe drive fails to boot because of a swap problem, the system typically halts during the early initialization phase. You might see error messages indicating that a device with a specific UUID could not be found, or that the /swapfile is missing. In many Linux distributions, if the system is configured to use a swap partition on the same NVMe drive as the root filesystem, and that partition becomes inaccessible or its label changes, the boot process will abort. The symptom often manifests as a blank screen after the BIOS/UEFI handoff, or a prompt for root password in an emergency mode. It is crucial to distinguish this from hardware failure. If the motherboard lights turn off or you get no signal, check our guide on Motherboard Light Turns Off and Gets Stuck with a Blank Screen to rule out physical connection issues first. However, if you can access a live USB environment, the issue is almost certainly software-related configuration.

Checking /etc/fstab Configuration

The primary suspect for swap-related boot failures is the /etc/fstab file. This file tells the operating system which partitions to mount at startup and where. If you recently reformatted your NVMe drive, changed partition sizes, or replaced the drive entirely, the UUIDs (Universally Unique Identifiers) will have changed. The old UUIDs remain in /etc/fstab, causing the system to look for non-existent devices. To diagnose this, boot from a live USB stick and open a terminal. Mount your root partition to a temporary directory, such as /mnt. Then, examine the contents of /mnt/etc/fstab. Look for lines containing swap in the fourth column (the filesystem type). These lines will specify either a partition path like /dev/nvme0n1pX or a UUID. Compare the UUID listed in /etc/fstab with the actual UUID of your swap partition. You can find the current UUIDs by running lsblk -f or blkid while in the live environment. If they do not match, you must update the file. Use a text editor like nano or vim to correct the UUID. Alternatively, you can remove the swap line entirely if you do not intend to use swap space, though this may affect performance on systems with limited RAM.

Updating Swap UUIDs Correctly

If you are updating the UUID, ensure you copy it exactly, including hyphens. Do not rely on generic names like /dev/sda1 as these can change based on connection order. Using UUIDs is the standard best practice for stability. After editing, save the file and unmount the partition before rebooting. If you are unsure about the exact partition layout, refer to general troubleshooting steps rather than assuming specific device nodes.

Verifying Initramfs Integrity

Even if /etc/fstab is correct, the initramfs (initial RAM filesystem) may contain cached information about the previous disk configuration. The initramfs is loaded into memory very early in the boot process and contains scripts to mount the root filesystem and any necessary swap devices. If this image was generated when the old UUIDs were active, it will still try to look for them. Regenerating the initramfs ensures that the latest configuration is baked into the boot image. On Debian-based systems, you can run update-initramfs -u. On Red Hat-based systems, use dracut --force. This step is critical after changing disk layouts or UUIDs. Failure to regenerate this image is a common reason why fixes applied to /etc/fstab do not take effect on the next reboot.

Disabling Swap Temporarily for Testing

If you cannot immediately identify the correct UUID, or if the swap partition is damaged, you can temporarily disable swap usage to see if the system boots normally. This helps isolate whether the swap configuration is indeed the blocker. In /etc/fstab, comment out the swap line by adding a # at the beginning of the line. This prevents the system from trying to activate it during boot. Once booted, you can investigate further without the pressure of a failed startup. If the system boots successfully with swap disabled, you know the issue lies within the swap configuration. You can then recreate the swap partition or file with fresh UUIDs and update the configuration accordingly. Note that disabling swap permanently is not recommended for production servers or systems with low memory, as it can lead to out-of-memory errors. For more insights on NVMe performance impacts, see Effect of NVMe SSD Usage on Write Speed Test.

Preventing Future Boot Issues

To prevent future occurrences, always verify your /fstab entries after making significant changes to your storage setup. Use tools like findfs or blkid to double-check UUIDs before editing configuration files. Regularly backup your /etc/fstab file before making changes. Additionally, consider using labels instead of UUIDs if your distribution supports them reliably, although UUIDs remain the most robust method. Ensure that your initramfs is updated whenever you modify storage configurations.

Frequently Asked Questions

How do I find the UUID of my swap partition?

You can find the UUID by booting into a live USB environment and running the command blkid in the terminal. This command lists all block devices along with their UUIDs, allowing you to identify the correct identifier for your swap partition.

What happens if I delete the swap line from fstab?

Deleting the swap line will prevent the system from using swap space during boot. This allows the system to start even if the swap device is missing, but it may reduce performance if the system runs out of physical RAM. You should only do this if you plan to add a new swap configuration later.

Can a corrupted swap file cause a boot failure?

Yes, if the system is configured to use a swap file located on the root partition and that file is corrupted or missing, the boot process may fail. The system expects the file to exist according to the configuration, and its absence can trigger an emergency shell or halt.

Do I need to reinstall the OS if swap fails?

No, reinstalling the operating system is rarely necessary. Most swap boot issues can be resolved by correcting the /etc/fstab entries and regenerating the initramfs. Only resort to reinstallation if the underlying filesystem is severely damaged beyond repair.

Why does my NVMe drive work in BIOS but not in Linux?

This indicates that the hardware is functioning correctly, and the issue is likely with the driver or configuration within the Linux environment. Check if the NVMe module is loaded properly and if the partition table is readable by the OS. Refer to guides on Troubleshooting USB Installation Issues in BIOS for broader context on hardware detection.
Tags: NVMe Boot Swap

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More