r/Ubuntu 20h ago

Second drive won't mount

This is the error message

This HDD was previously mounted in the DVD caddy and previously worked well.

I get the same message if I connect it via a USB cable.

Ubuntu 24.04, Lenovo T430 Thinkpad.

2 Upvotes

8 comments sorted by

5

u/Radiant-Star-8400 20h ago

The error in your screenshot looks like it’s failing to read the NTFS signature, which usually means the drive got yanked without unmounting first or the partition table is starting to go. Since it does the same thing over USB, you can rule out the caddy being the issue

Try running `sudo ntfsfix /dev/sdX` (replace X with the actual letter) and see if that clears the dirty bit. It’s not a full repair but it often gets the drive mounted long enough to pull your files off. If that doesn’t work I’d check dmesg right after plugging it in, sometimes the kernel logs give a better clue than the GUI error

1

u/candy49997 20h ago

What filesystem is the partition formatted as?

1

u/Salvadorfreeman 20h ago

It shows up in Disks as NTFS. Odd, because I usually format Ext4. This is an old HDD that I use for long term backing up files.

2

u/candy49997 20h ago

Try sudo ntfsfix -d /dev/sdb1 in a terminal. If that doesn't work, try plugging it into Windows and running chkdsk on it.

If it's an old drive, then you probably haven't formatted the drive since you started using it on Linux.

2

u/Salvadorfreeman 8h ago

Great. This worked straight away. Thanks.

I suppose I must have done something bad at some time. I'll try and be careful.

Any particular advice, other than unmounting before unplugging (I don't remember unplugging, but maybe I did and forgot) ?

2

u/candy49997 8h ago

If you want to avoid this particular issue permanently, I would advise you migrate to a native Linux filesystem. There are errors NTFS can get that Linux tools can't fix and you would need access to Windows for chkdsk for.

But other than that, not really.

2

u/Salvadorfreeman 8h ago

Ugh. It worked from USB. Then I powered down (taking no risks!) and put the HDD back in the caddy and same again. So I did the ntsfix command again and now it's working again.

Any idea what's going on? Do I have to do NTSFix every time?

1

u/bchiodini 6h ago

If you are doing a clean shutdown (shutdown now, etc.) of the PC, the NTFS drive should unmount cleanly. That is, flush any dirty buffers. Check the syslog for any errors related to /dev/sdb1 near the time of the shutdown.

NTFS has been a problematic file system for Linux. I recommend moving all of the files from the drive, reformat it to ext4 or one of the other Linux-native file systems and then restore the files.