Linux mount command question for USB drive containing ext4 and NTFS partitions

I have a USB flash drive that has a small NTFS partition, and the rest is ext4.

When I plug it in to my MX Linux box, the ext4 partition mounts, automatically.
But I cannot figure out how to mount the NTFS partition (I need to copy a file from the NTFS partition to the ext4 partition).

Both “gparted” and “lsblk --fs” see and report on the NTFS partition. So it is just a matter of using the “mount” command (or some other command or GUI that someone can recommend).

I ran:
$ man mount
…and it gave me a headache.

I ran:
$ mount -U someUUIDnumber (that I copied/pasted from the lsblk --fs output).
That complained about not being found in /etc/fstab. And that is where the trail turns cold.

How do I mount USB flash drive’s NTFS partition?

This is a pretty good tutorial: How to Mount NTFS Partition in Linux {Read-only & Read-and-Write}

1 Like

Two issues (or points of information).

  1. When I plug in a flash drive that is 100% NTFS, I do not have to do anything. It just mounts automatically.

  2. That tutorial does not address my specific issue.
    For example, it states to run:

$ sudo mount -t ntfs /dev/sdb1 /mnt/ntfs1
…where /mnt/ntfs1 will be the mount point.

However, the problem is with:
/dev/sdb1

That represents the entire drive. But I need to mount only the NTFS partition of the drive.

In any event, I tried every combination of /dev/sdb (and /dev/sdb1, etc), to no avail.
In each case, it complains “can’t find in /etc/fstab”

check lsblk to see which partitions the disk has. it could well be /dev/sdb2
here is a lsblk printout of an ntfs drive mounted under debian (that I am plotting for a friend):

sdh 8:112 0 16.4T 0 disk
├─sdh1 8:113 0 16M 0 part
└─sdh2 8:114 0 16.4T 0 part /mnt/disk12

In my case it is “sdc” (in my examples above, I wrote “sdb”, but only because I was quoting the article from the link that @chrisfarmer gave me).

In my case, the flash drive is: sdc
sdc1 is the NTFS partition that I want to mount.
sdc2 is the ext4 partition that mounts automatically.

Maybe linux is confused with the mixed partition layout.
Does sudo mount -t ntfs /dev/sdc1 /mnt/ntfs1 work?
if not did you install the Fuse and ntfs-3g as outlined in the article?
Also try to unmount the ext4 partition before trying to mount the NTFS partition.

Perhaps. But Linux should not have difficulty with this.

No. It complains about /etc/fstab.

No, because as I understand it, that is for NTFS support.
But when I plug in a 100% NTFS drive, it mounts. So I would rather not install anything until I am sure that doing so will resolve the problem.

Yes, I did that. The results stay the same.

I posted the same question in:
forum.mxlinux.org

No one has yet to reply.

can you post the output of cat /etc/fstab? and sudo fdisk -l as well

1 Like

Is there any possibility that the partition is not ntfs or somehow corrupted?

1 Like

The pasted text looks sloppy. But I cannot figure out how to upload text files.
I have seen other people post logs that include scroll bars. I cannot figure out how that is done.

/etc/fstab:
# Pluggable devices are handled by uDev, they are not in fstab
UUID=90336ac2-f5b2-4b19-9baa-e1b0c756c7d9 / ext4 noatime 1 1
UUID=78e2c94d-0e41-42e7-8e0a-108b7346f219 swap swap defaults 0 0
UUID=A4B2-148A /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0

/etc/mtab:
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10142864k,nr_inodes=2535716,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=2036848k,mode=755 0 0
/dev/sdb2 / ext4 rw,noatime,stripe=8191 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
securityfs /sys/kernel/security securityfs rw,relatime 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=5751400k 0 0
/dev/sdb1 /boot/efi vfat rw,noatime,fmask=0113,dmask=0002,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
rpc_pipefs /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
cgroup /sys/fs/cgroup tmpfs rw,relatime,size=12k,mode=755 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/run/cgmanager/agents/cgm-release-agent.systemd,name=systemd 0 0
tmpfs /run/user/115 tmpfs rw,nosuid,nodev,relatime,size=2036844k,mode=700,uid=115,gid=124 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=2036844k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sdc2 /media/chia/T5-ext4 ext4 rw,nosuid,nodev,relatime,errors=remount-ro,stripe=8191 0 0
/dev/sda6 /media/chia/Data fuseblk ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdd1 /media/chia/easystore fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

/proc/mounts:
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10142864k,nr_inodes=2535716,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=2036848k,mode=755 0 0
/dev/sdb2 / ext4 rw,noatime,stripe=8191 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
securityfs /sys/kernel/security securityfs rw,relatime 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=5751400k 0 0
/dev/sdb1 /boot/efi vfat rw,noatime,fmask=0113,dmask=0002,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
rpc_pipefs /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
cgroup /sys/fs/cgroup tmpfs rw,relatime,size=12k,mode=755 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/run/cgmanager/agents/cgm-release-agent.systemd,name=systemd 0 0
tmpfs /run/user/115 tmpfs rw,nosuid,nodev,relatime,size=2036844k,mode=700,uid=115,gid=124 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=2036844k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sdc2 /media/chia/T5-ext4 ext4 rw,nosuid,nodev,relatime,errors=remount-ro,stripe=8191 0 0
/dev/sda6 /media/chia/Data fuseblk ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdd1 /media/chia/easystore fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

lsblk -i --fs:
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
|-sda1 ntfs Recovery 56EAD3C9EAD3A391
|-sda2 vfat FAT32 30D3-D0B9
|-sda3
|-sda4 ntfs OS 66EAD724EAD6EF75
|-sda5 ntfs Apps A648D48E48D45F1D
`-sda6 ntfs Data F070E10A70E0D7FC 103.2G 74% /media/chia/Data

sdb
|-sdb1 vfat FAT32 EFI System A4B2-148A 251.8M 0% /boot/efi
|-sdb2 ext4 1.0 rootMX21 90336ac2-f5b2-4b19-9baa-e1b0c756c7d9 207.2G 3% /
-sdb3 swap 1 swapMX 78e2c94d-0e41-42e7-8e0a-108b7346f219 [SWAP] sdc |-sdc1 ntfs Samsung T5 2TB 6CF69770F6973972 -sdc2 ext4 1.0 T5-ext4 5f2664d0-59ad-4904-83a9-b9c9870040ed 1.7T 0% /media/chia/T5-ext4
sdd
`-sdd1 ntfs easystore A204EF2304EEF8E5 16.4T 0% /media/chia/easystore

Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6CB75BD9-209B-4FDE-9B98-F517ACA1D930

Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1226751 202752 99M EFI System
/dev/sda3 1226752 1259519 32768 16M Microsoft reserved
/dev/sda4 1259520 135045119 133785600 63.8G Microsoft basic data
/dev/sda5 135045120 155525119 20480000 9.8G Microsoft basic data
/dev/sda6 155525120 976771071 821245952 391.6G Microsoft basic data

Disk /dev/sdb: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: 100_MTFDDAV256TB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: D766C2BC-1759-40DC-ACE1-0FAFFE7A31F6

Device Start End Sectors Size Type
/dev/sdb1 2048 526335 524288 256M EFI System
/dev/sdb2 526336 483325951 482799616 230.2G Linux filesystem
/dev/sdb3 483325952 500103167 16777216 8G Linux filesystem

Disk /dev/sdc: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Portable SSD T5
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x285fd6bd

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 1038335 1036288 506M 7 HPFS/NTFS/exFAT
/dev/sdc2 1038336 3907028991 3905990656 1.8T 83 Linux

Disk /dev/sdd: 16.37 TiB, 18000207937536 bytes, 35156656128 sectors
Disk model: easystore 264D
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6F5E73A9-5238-4FA6-9B10-24B9E4A102B2

Device Start End Sectors Size Type
/dev/sdd1 2048 35156654079 35156652032 16.4T Microsoft basic data

Yes. You nailed it.

I plugged the offending drive into my Windows PC, and Windows recommended that it scan the drive. It then asked for permission to fix the drive. After that, my MX Linux box mounts both the ext4 partition and the NTFS partition.

But shame on the Linux OS for not being helpful.

Thanks everyone!

3 Likes

I don’t recommend using /dev/sdxx in fstab, especially for USB drives. There is no guarantee that they will be recognized by the system in the same order at the next boot, and will inevitably be assigned a different path.

I would use the disk ID… That’s always consistent because it’s unique to each device. You can find the ID for a corresponding /dev/sdxx disk with this command…

ls -l /dev/disk/by-id/ | grep /dev/sdxx

(replace sdxx with the actual drive)

Then change the mount entry in fstab:

/dev/disk/by-id/usb-WD_easystore_2647_575856324142303850344350-0:0 /home/username/chiaplots auto nosuid,nodev,nofail,x-gvfs-show 0 0

Replacing the portion after /dev/disk/by-id/ (usb-WD_easystore_2647_575856324142303850344350-0:0) with the drive ID from the first command, and of course your mount directory too.

One thing to note… If you’re running any multi-miner software that uses Docker (i.e. Machinaris), the containers can keep the device busy even after un-mounting. I recommend a full restart after configuring fstab to ensure everything is working.

1 Like

No need for any more troubleshooting. It needed a file system check and repair.

Windows detected it and fixed it.
Linux just ignored it and offered no help.

1 Like