I can not mount the exFAT SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I can not mount the exFAT SD card

Jump to solution
4,368 Views
Takashi_Kashiwagi
Senior Contributor I

Hi community.

I have using EVK board (8MMINI-LPD4) with fsl-image-qt5-validation-imx(4.14-sumo).

As the title says, the exFAT SD card could not be mounted, does anyone know How to Mount exFAT SD Card?

What I did:

  • added <IMAGE_INSTALL_append += " fuse-exfat exfat-utils"> to site.conf
  • added the following line to fstab
/dev/mmcblk1p1       /media/card          auto       defaults,sync,noauto  0  0

  

mount command is OK, but I can not access mountpoint.

root@imx8mmevk:~# ls /media/card
ls: cannot access '/media/card': Transport endpoint is not connected

dmesg is as follows.

root@imx8mmevk:~# dmesg | grep mmc1
[ 2.307196] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA
[ 2.492272] mmc1: host does not support reading read-only switch, assuming write-enable
[ 2.711695] mmc1: new ultra high speed SDR104 SDHC card at address 59b4
[ 2.712296] mmcblk1: mmc1:59b4 SMI 14.9 GiB
root@imx8mmevk:~#

Best Regards,

T.Kashiwagi

Tags (1)
0 Kudos
1 Solution
3,824 Views
Takashi_Kashiwagi
Senior Contributor I

Hi all.

I understand how to avoid it. See thread below.

linux - Automount USB drives with systemd - Server Fault 

As a result, the following three files were required.

  • /usr/local/bin/usb-mount.sh
  • /etc/systemd/system/usb-mount@.service
  • /etc/udev/rules.d/99-local.rules

Using the sh file, I can mount / unmount as follows.

root@imx8mm-var-dart:~# /usr/local/bin/usb-mount.sh add mmcblk1p1
Mount point: /media/mmcblk1p1
FUSE exfat 1.2.3
**** Mounted /dev/mmcblk1p1 at /media/mmcblk1p1 ****
root@imx8mm-var-dart:~# vi /media/mmcblk1p1/hoge.txt
root@imx8mm-var-dart:~# /usr/local/bin/usb-mount.sh remove mmcblk1p1
**** Unmounted /dev/mmcblk1p1
**** Removing mount point /media/mmcblk1p1
root@imx8mm-var-dart:~#

Best Regards,

T.Kashiwagi

View solution in original post

0 Kudos
7 Replies
3,825 Views
Takashi_Kashiwagi
Senior Contributor I

Hi all.

I understand how to avoid it. See thread below.

linux - Automount USB drives with systemd - Server Fault 

As a result, the following three files were required.

  • /usr/local/bin/usb-mount.sh
  • /etc/systemd/system/usb-mount@.service
  • /etc/udev/rules.d/99-local.rules

Using the sh file, I can mount / unmount as follows.

root@imx8mm-var-dart:~# /usr/local/bin/usb-mount.sh add mmcblk1p1
Mount point: /media/mmcblk1p1
FUSE exfat 1.2.3
**** Mounted /dev/mmcblk1p1 at /media/mmcblk1p1 ****
root@imx8mm-var-dart:~# vi /media/mmcblk1p1/hoge.txt
root@imx8mm-var-dart:~# /usr/local/bin/usb-mount.sh remove mmcblk1p1
**** Unmounted /dev/mmcblk1p1
**** Removing mount point /media/mmcblk1p1
root@imx8mm-var-dart:~#

Best Regards,

T.Kashiwagi

0 Kudos
3,824 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Victor

 

Thank you for responding.

I will try it and write a post when I understand something.

Best Regards,

T.Kashiwagi

0 Kudos
3,824 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Victor

Thank you for responding.

I confirmed fdisk and df. By the result, mmcblk1p1 is existed but "Transport endpoint is not connected".

Do I need other settings?

root@imx8mmevk:~# fdisk -lu /dev/mmcblk1
Disk /dev/mmcblk1: 15 GiB, 16030629888 bytes, 31309824 sectors
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: dos
Disk identifier: 0x1199e995

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 31309823 31301632 14.9G 7 HPFS/NTFS/exFAT
root@imx8mmevk:~# df -h
df: /media/card: Transport endpoint is not connected
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.6G 1.3G 179M 89% /
devtmpfs 660M 4.0K 660M 1% /dev
tmpfs 980M 0 980M 0% /dev/shm
tmpfs 980M 8.5M 971M 1% /run
tmpfs 980M 0 980M 0% /sys/fs/cgroup
tmpfs 980M 4.0K 980M 1% /tmp
tmpfs 980M 228K 980M 1% /var/volatile
/dev/mmcblk2p1 64M 22M 43M 34% /run/media/mmcblk2p1
tmpfs 196M 88K 196M 1% /run/user/0
root@imx8mmevk:~#

Best Regards,

T.Kashiwagi

0 Kudos
3,824 Views
b36401
NXP Employee
NXP Employee

Please check if the issue connected exactly to exfat.
I mean please try to create some other filesystem (for example ext3) on a card and mount it.

0 Kudos
3,824 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Victor

 

Thank you for responding.

FAT32 was able to "mount" as follows.

Are there any other points to check?

root@imx8mmevk:~# fdisk -lu /dev/mmcblk1
Disk /dev/mmcblk1: 15 GiB, 16030629888 bytes, 31309824 sectors
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: dos
Disk identifier: 0x1199e995

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 31309823 31301632 14.9G c W95 FAT32 (LBA)
root@imx8mmevk:~# ls /mnt
root@imx8mmevk:~# mount /dev/mmcblk1p1 /mnt
root@imx8mmevk:~# ls /mnt
System Volume Information
root@imx8mmevk:~# cd /mnt
root@imx8mmevk:/mnt# touch test.txt
root@imx8mmevk:/mnt# ls -al
total 20
drwxr-xr-x 3 root root 8192 Apr 16 10:35 .
drwxr-xr-x 22 root root 4096 Apr 16 09:45 ..
drwxr-xr-x 2 root root 8192 Jul 23 2019 System Volume Information
-rwxr-xr-x 1 root root 0 Apr 16 10:35 test.txt
root@imx8mmevk:/mnt#

Best Regards,

T.Kashiwagi

0 Kudos
3,824 Views
b36401
NXP Employee
NXP Employee

It seems there is something wrong with filesystem driver.
Please try play with exfat-utils and fuse-exfat packages refering to this article:
https://community.nxp.com/docs/DOC-94850

0 Kudos
3,824 Views
b36401
NXP Employee
NXP Employee

Please make sure that the card has right partition table.
I mean "fdisk -lu /dev/mmcblk1" should tell that /dev/mmcblk1p1 exists there.

0 Kudos