Skip to main content
Home
A key to conquer the (open source) world.

Main navigation

  • Home
  • About Us
    • About this website
    • About_me
    • Family rivalry
  • Gurus
  • Tutorials
User account menu
  • Log in

Breadcrumb

  1. Home

Resolving USB disk issues šŸ—ƒļøšŸ”§after a Linux crash 🐧.

Hero image for keyhole tutorials.

The USB disk, connected during an Ubuntu crash, did not mount after the system rebooted.

Tux locked in a comical showdown with a stubborn USB disk!

What triggered the issue

My Ubuntu 22.04 desktop unexpectedly froze while I was editing a text file located on a USB-mounted removable disk. With no other option, I had to shut down the system using the power switch. To my relief, the system rebooted safely and without issues. However, when I reconnected the USB disk, it refused to mount. After investigating the problem, I discovered the following remedy.

The Solution

If an Ubuntu 22.04 system crashed and cannot mount a USB disk after a reboot, the issue could be:

  • The filesystem got dirty or corrupted.
  • The USB was not cleanly unmounted before the crash.
  • The system services responsible for mounting (like udisks2) are unstable.

Let’s go through this step-by-step recovery.

🧭 1. Check if the USB is detected at all.

Plug the USB in and run:

$ lsblk -f
$ sudo dmesg | tail -n 30
Password 

Upon inspection, dmesg reported:

[ 777.748071] sda: sda1
[ 777.748454] sd 4:0:0:0: [sda] Attached SCSI disk
[ 781.521521] ntfs3: sda1: It is recommened to use chkdsk.
[ 781.628866] ntfs3: sda1: volume is dirty and "force" flag is not set!

This indicates that the USB drive (/dev/sda1) uses the NTFS filesystem, and Ubuntu’s NTFS3 driver is refusing to mount it automatically due to the following reason:

ā€œvolume is dirty and ā€˜force’ flag is not setā€

In other words, the filesystem wasn’t cleanly closed, likely because of the crash or because the drive was disconnected without being safely unmounted.

🧩 What’s happening

NTFS keeps a ā€œdirty bitā€ to mark that Windows (or Linux) didn’t close the filesystem cleanly. Ubuntu’s driver (ntfs3) sees that bit and refuses to mount to avoid data loss.

āœ… Safe Fix — Quick Linux Fix (with ntfsfix)

$ sudo ntfsfix /dev/sda1

This will:

  • Clear the dirty bit.
  • Fix some basic NTFS inconsistencies.
  • Schedule a deeper check for next Windows mount (if applicable).

Once I executed sudo ntfsfix /dev/sda1, the USB disk mounted without issue through the GUI, and a Dolphin window opened displaying its root directory.

šŸ’”Inspect and safely remove the USB disk:

1  Open a terminal in the USB disk’s root directory:

  • Right-click on an empty area within the Dolphin window displaying the root of the USB disk.
  • Select ā€œOpen Terminalā€ from the context menu.
  • A terminal window will open, already set to the USB disk’s root directory.

2  Check the disk contents:

  • Use commands like ls and cd to browse and verify the files as needed.

3  Close the terminal when done.

4  Safely remove the USB disk:

  • In Dolphin’s left sidebar, under Removable Devices, locate the USB disk label.
  • Right-click it and select ā€œSafely Removeā€.
  • Once unmounted, you can physically unplug the USB disk.

Conclusion

So the issue was indeed a ā€œdirtyā€ NTFS filesystem caused by the system crash. Running sudo ntfsfix /dev/sda1 cleared the dirty bit and repaired the basic filesystem metadata, allowing Ubuntu to mount the disk again.

If it happens again ntfsfix is safe to re-run.

Back to the tutorial list.

Author

Categories
Open source News
Linux
Sat, 11/15/2025 - 18:02

Managed ad1

RSS feed
Powered by Drupal