Unable to mount NTFS drive on Ubuntu, Linux

Context

Windows migration to Linux; Ubuntu 24.04 LTS. Need access to data files in NTFS(Microsoft Windows propietary file system) drive.

Symptom

Could not access the drive. Error message: “Failed to mount “drive-name”. Error mounting /dev/sda3 at /path/to/drive: wrong fs type, bad option, bad superblock on /dev/sda3, missing codepage or helper program, or other error”.

ntfs error

Why it happened

Uncertain. Possibly system was not powered off properly, causing drive to be “flagged” preventing Linux from mounting it until flag is removed. Flag removal needs to be done by checking it on Windows(chkdsk). Windows system not available.

Fix

  1. Ran dmesg | tail -n 80 // to display the last 80 lines of the “kernel ring bugger” which contains recent kernel messages and system events. Printed: “scheduled for check/dirty flag on NTFS”, confirming above theory.
  2. Getting drive filesystem info through lsblk(list block devices): lsblk -f /dev/sda3. (“-f” flag for information on filysystems)
  3. Ran sudo ntfsfix /dev/sda3 for a “soft/non-destructive” NTFS repair. temporary ‘fix’ to remove the flag and let us mount the drive. it does not replace and still needs Windows chkdisk.
  4. Creating mounting point: sudo mkdir -p /mnt/ssd-data/
  5. Mounting using nfts-3g driver: sudo mount -t ntfs-3g /dev/sda3 /mnt/ssd-data/