Solved Why would Linux Ubuntu refuse to mount an external usb hdd?

Solved issue

Erik Groothuijzen

Active Member
Joined
Mar 3, 2024
Messages
144
Reaction score
60
Credits
1,297
I just installed Linux Ubuntu 24.0.2.4 and wanted to retrieve my data from an external hard drive (disk1) which I used with Linux MX 23.3. It failed to mount the drive because of an unknown error and a long story. Boot up to MX from the usb flash drive and tried to access the disk (disk1), no problem. Boot up to Ubuntu again, tried another of my disks (disk2), can access. Boot up to MX, copy the files from disk 1 to disk 2. Boot up to Ubuntu, failed to mount. What could possibly be the problem that Linux MX can mount the disk and Linux Ubuntu cannot?
 


I would probably start by investigating the logs? And then if you still can't resolve the issue; posting the relevant portion of those logs here so that those of us reading this can actually help you.

We have no idea what's going on, because we can't read your logs for you. And you didn't share any relevant details about the circumstance aside of your frustration with the issue.
 
I just installed Linux Ubuntu 24.0.2.4 and wanted to retrieve my data from an external hard drive (disk1) which I used with Linux MX 23.3. It failed to mount the drive because of an unknown error and a long story. Boot up to MX from the usb flash drive and tried to access the disk (disk1), no problem. Boot up to Ubuntu again, tried another of my disks (disk2), can access. Boot up to MX, copy the files from disk 1 to disk 2. Boot up to Ubuntu, failed to mount. What could possibly be the problem that Linux MX can mount the disk and Linux Ubuntu cannot?
Presumably, if the external disk mounts in MX but not in ubuntu, then the disk itself is not a hardware problem. In that case, it's the difference in mounting processes between the two distros that appear to be issue.

To investigate then, it would be useful to compare the mounting processes of both systems by looking into the log files to detect the differences and perhaps find an error report in the ubuntu logs.

Below are some example commands that could be helpful. Not all may apply, for example, if no syslog package is installed, there won't be a /var/log/syslog file.

Also, adjust the commands to fit your system by using the correct mount point and device name in the commands. Bear in mind that there may be a lot of output, but what is of interest is the mounting of the particular disk, so looking for logs with its device name and mount point would be useful.

Code:
journalctl -b
journalctl -b -x -p 3 --no-pager

dmesg

less /var/log/kern.log
less /var/log/syslog
less /var/log/messages

To see what options MX uses to mount the drive, run:
Code:
mount
and perhaps use some of those options in a command to try and mount in ubuntu, in particular a rw option.

Check the permissions of the mount points in both distros e.g.:
Code:
ls -al /mnt

It may be that the apparmor settings in ubuntu are interfering with the mounting of an external drive. One can alter apparmor enforcement by setting it to "complain mode" globally so it doesn't enforce compliance for the current boot. To do that run, as root or sudo:
Code:
echo -n complain > /sys/module/apparmor/parameters/mode
See the manpage for apparmor for details. Then try and mount the external disk and see what happens.
 
Last edited:
Presumably, if the external disk mounts in MX but not in ubuntu, then the disk itself is not a hardware problem. In that case, it's the difference in mounting processes between the two distros that appear to be issue.

To investigate then, it would be useful to compare the mounting processes of both systems by looking into the log files to detect the differences and perhaps find an error report in the ubuntu logs.

Below are some example commands that could be helpful. Not all may apply, for example, if no syslog package is installed, there won't be a /var/log/syslog file.

Also, adjust the commands to fit your system by using the correct mount point and device name in the commands. Bear in mind that there may be a lot of output, but what is of interest is the mounting of the particular disk, so looking for logs with its device name and mount point would be useful.

Code:
journalctl -b
journalctl -b -x -p 3 --no-pager

dmesg

less /var/log/kern.log
less /var/log/syslog
less /var/log/messages

To see what options MX uses to mount the drive, run:
Code:
mount
and perhaps use some of those options in a command to try and mount in ubuntu, in particular a rw option.

Check the permissions of the mount points in both distros e.g.:
Code:
ls -al /mnt

It may be that the apparmor settings in ubuntu are interfering with the mounting of an external drive. One can alter apparmor enforcement by setting it to "complain mode" globally so it doesn't enforce compliance for the current boot. To do that run, as root or sudo:
Code:
echo -n complain > /sys/module/apparmor/parameters/mode
See the manpage for apparmor for details. Then try and mount the external disk and see what happens.
This is what confuses me somewhat with Linux with various distros. I am not an avid terminal user and get confused with the syntax of the commands. I have run into a few issues with Mint MX and now Ubuntu, all debian systems as I understand it. With MX I had some issues and upgraded to MX 23 and then I could not get my Pantum printer configured, for love or money and just gave up. On top of that the system would just reboot whenever. I now try Ubuntu, and find my drives won't mount.
Anway what I get with mount
Mount points in Ubuntu



erik@erik-ThinkPad-W530:~$ ls -al /mnt

total 8

drwxr-xr-x 2 root root 4096 Feb 15 10:09 .

drwxr-xr-x 23 root root 4096 Mar 22 14:58 ..
and with MX
Mount points in MX



demo@mx1:~

$ ls -al /mnt

total 0

drwxr-xr-x 2 root root 3 May 18 2024 .

drwxr-xr-x 1 root root 220 Mar 23 00:26 .

The message I get when trying to mount in Ubuntu is
1742706280234.png


The Ubuntu disk manager tells me the file system on the external drive is NTSF, but that doesn't seem to matter with MX
 
MX has some cleverness going on there !
 
i have a 1TB disk mounted in Linux Mint....but...its file system is fuse

There are more than a few ntfs files scattered in amongst various other file types...ext4 etc
 
The message I get when trying to mount in Ubuntu is
View attachment 24796

The Ubuntu disk manager tells me the file system on the external drive is NTSF, but that doesn't seem to matter with MX
Thanks for the error message. It helps.

Becoming familiar with the terminal and commands also will help. It's the usual means of troubleshooting. Here are my suggestions:

If your system is doing automatic mounting when you plug in the disk or boot up, then for testing purposes it's best to turn that off. There should be a menu item in your DE where you can click it off but I can't say where.

Make sure you have these packages installed in the ubuntu installation:
fuse3
ntfs-3g
Since you accessed the disk from a live MX disk, these packages would have been present in the MX filesystem on the live disk, but you need to ensure that these packages are installed in the ubuntu installation on the machine in order to mount a disk with an ntfs filesystem. If they are not installed, install them.

Once installed, with automatic mounting turned off, try either of these commands in a terminal, as root or sudo. If one doesn't work try the other.
Code:
mount -t ntfs /dev/sdb2 /media/erik -o umask=000
mount -t auto /dev/sdb2 /mnt -o umask=000
If either works, then you can navigate to the respective directory in a terminal (i.e. to /mnt or to
/media/erik) or use a GUI file manager to gain access to the disk.
 
Thanks for the error message. It helps.

Becoming familiar with the terminal and commands also will help. It's the usual means of troubleshooting. Here are my suggestions:

If your system is doing automatic mounting when you plug in the disk or boot up, then for testing purposes it's best to turn that off. There should be a menu item in your DE where you can click it off but I can't say where.

Make sure you have these packages installed in the ubuntu installation:
fuse3
ntfs-3g
Since you accessed the disk from a live MX disk, these packages would have been present in the MX filesystem on the live disk, but you need to ensure that these packages are installed in the ubuntu installation on the machine in order to mount a disk with an ntfs filesystem. If they are not installed, install them.

Once installed, with automatic mounting turned off, try either of these commands in a terminal, as root or sudo. If one doesn't work try the other.
Code:
mount -t ntfs /dev/sdb2 /media/erik -o umask=000
mount -t auto /dev/sdb2 /mnt -o umask=000
If either works, then you can navigate to the respective directory in a terminal (i.e. to /mnt or to
/media/erik) or use a GUI file manager to gain access to the disk.
Thanks, I'll see what I can get right. In the mean time I have circumvented it by copying the required files from the external drive to a sd card in MX, formatted to fat32, with a usb card reader. Ubuntu does see that card and I managed to copy the files to my internal hard drive. The urgency has abated somewhat.
 
Yes!, I got it done. Thank you very much for your assistance in helping me sorting it out. The problem is with the ntfs file system and the manual mounting of the drive. MX and Ubuntu handle it differently and I had to create an external media directory. Used to hate DOS with MS. Loved Windows but due to Windows 11 upgrade am now trying Linux. Unfortunately have to get at least familiar with Terminal. So far so good. Linux does have a lot of support out there.
 


Staff online

Members online


Latest posts

Top