I have a 2TB external drive with an NTFS partition. If I connect it to my main desktop, it mounts fine in Dolphin - I just click the drive when it appears on the sidebar, and I can see all the files, navigate, work with them etc. This computer is running Kubuntu 22.04, and it might be useful to know that it was the first computer I used this drive with.
When I connect the drive to a laptop, running a newly-installed Kubuntu 23.10, the drive appears, but clicking it on Dolphin's sidebar gives me an error message:
Error mounting /dev/sdb1: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error mounting /dev/sdb1 at /media/root/TOSHIBA EXT: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error
I was scared of disk/partition failure, but it's a brand new external drive; I took it back to the desktop machine and it operated just fine.
I then took it back to the laptop and tried mounting it with udiskctl, it not only didn't work but gave me the same error message - so I know Dolphin is probably using it as a backend, which means it's not a KDE problem but a udisks or permissions problem.
Finally I used a simple mount command. Terminal told me I had to be root. I then ran
sudo mount /dev/sdb1 /media/mountpoint
and it worked fine! I could even operate the files inside without any complaints regarding permissions.
I tested the external HD in another laptop, also running 23.10 (although this is an upgraded system). I got the same error, and the same solution applied.
I searched Google and AskUbuntu for an answer. The closest scenario I found gave me some ideas; I tried:
- deleting /media/"username" so the system could create it anew;
- chowning /media/"username" to username:username and later username:root; and
- chowning /media to username:username and later username:root.
Nothing worked, and I returned /media to full root ownership, deleting the username's folder inside (it has since been recreated by a new attempt to mount the drive, which failed as per the error message above. It's always the same error message).
Notice that when I mounted it with 'sudo mount' Dolphin turns the drive's sidebar entry into the mounted kind, where I can see its free space, etc. - and it allows me to unmount the drive graphically, but it asks for my password. Even though it wouldn't be optimal behaviour, I don't understand why it couldn't ask for my password to mount the damn thing in the first place...
I am aware I could add the partition's UUID to fstab in both laptops, but this wouldn't really solve the issue - this is not supposed to happen! Besides, I'm tidying up the first laptop for a person who's not going to mess with the terminal in case she's unable to plug in e.g. a friend's external drive.
I should also add that fat32 pen drives don't present a similar issue, they mount just fine.
Thanks in advance!
Error mounting /dev/sdb1 at /media/root/TOSHIBA EXT
this part is strange why /media/root? – nobody Jan 23 '24 at 17:28sudo -H
to get your user id. But why NTFS if not using with Windows? Better to use a Linux format like ext4, also typically faster. You have to have Windows to run chkdsk & defrag periodically on NTFS as you cannot fix NTFS from Linux., – oldfred Jan 23 '24 at 18:27