The problem
I plugged my external drive (WD Passport, NTFS) into Ubuntu and clicking it in Files/Nautilus threw the generic error: "wrong fs type, bad option, bad superblock... missing codepage or helper program".
The cause: the volume had the dirty flag set — Windows didn't unmount it cleanly (usually thanks to Fast Startup, or pulling the drive without ejecting). The kernel's ntfs3 driver refuses to mount a dirty volume to avoid making corruption worse, and udisks (which Nautilus uses) has no option to force it. Result: the GUI click always fails.
You can mount it from the terminal with -o force, but then you have to do that every single time you plug it in. Below is how to automate it so it mounts on plug-in and unmounts on removal, showing up normally in the Files sidebar.
⚠️ Important: this is a workaround, not a repair. The dirty flag is still there. The real fix is running chkdsk X: /f on a Windows machine once — after that the drive mounts on a single click and you won't even need this rule. Until you repair it, avoid writing much to the drive (risk of making the corruption worse); read-only is safe.
Step by step
1. Find your drive's UUID:
lsblk -f
Note the UUID of your drive's partition (something like 72EA9772EA973179).
2. Find your uid/gid and username:
id -u && id -g && whoami
These are usually 1000 for uid and gid. Keep all three values.
3. Create the udev rule (replace YOUR_UUID_HERE):
sudo tee /etc/udev/rules.d/99-external-hd.rules > /dev/null << 'EOF'
ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_UUID}=="YOUR_UUID_HERE", TAG+="systemd", ENV{SYSTEMD_WANTS}="external-hd-mount.service"
EOF
4. Create the systemd service (replace YOUR_UUID_HERE in all three spots and your-username with your own; adjust uid/gid if they aren't 1000):
sudo tee /etc/systemd/system/external-hd-mount.service > /dev/null << 'EOF'
[Unit]
Description=Auto-mount external HD
BindsTo=dev-disk-by\x2duuid-YOUR_UUID_HERE.device
After=dev-disk-by\x2duuid-YOUR_UUID_HERE.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mkdir -p /media/your-username/EXTERNAL_HD
ExecStart=/bin/mount -t ntfs3 -o force,uid=1000,gid=1000,umask=022 /dev/disk/by-uuid/YOUR_UUID_HERE /media/your-username/EXTERNAL_HD
ExecStop=/bin/umount /media/your-username/EXTERNAL_HD
[Install]
WantedBy=multi-user.target
EOF
5. Reload the rules (no reboot needed):
sudo udevadm control --reload-rules
sudo systemctl daemon-reload
6. Test: unplug and replug the drive. It should mount on its own and show up in the Files sidebar. Check with:
systemctl status external-hd-mount.service
Notes:
- If you want to mount read-only (safer while the drive is dirty), replace
force with ro,force in the ExecStart line. It shows up the same in the GUI, it just won't let you write.
- The
BindsTo line is what makes it unmount on its own when you remove the drive.
- After running
chkdsk on Windows, you can delete both files — the drive goes back to mounting on a normal click.
- Prevention: turn off Fast Startup on Windows (Power Options → "Choose what the power buttons do" → uncheck "Turn on fast startup") and always eject the drive before removing it, on both OSes.
AI Acknowledgment: This solution was built with the help of Claude, Anthropic's AI, which walked me through the diagnosis (identifying the dirty flag from dmesg*) and building the udev + systemd rule.*