1 (edited by RangerZ 2016-06-21 19:30:11)

Topic: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

NOTE:  I have changed the tittle after finding out that this is not specific to the above card. 
The original title was: PNY 64GB Micro-SD card not recognized in Kingstom MLWG2
-------------------------------
I have a new micro-sd card and am trying to configure it in a Kingston MLWG2.  The card is a 64GB PNY Turbo formatted as exFat.  I the device is not recognized under mount points.

I installed the kmod-fs-exfat then removed from Services=>Network shares and Mount Points other USB and SD cards that I have tested successfully.  I did not remove the actual folders from the router (/home1, /home2).   The prior SD card is an old Sandisk from a camera and formatted as FAT. 

I installed the card, booted the device and went to mount points.  The only entry under UUID is [long string of chrs](dev/mtdblock5, 14mb) which I installed before realizing it was not my device.  I then deleted the entry.

I removed the card to verify it's function under Windows.  I am able to find a "Device class guid" value in it's properties.  There was no label so I assigned one (MLWG2-SD).

The card is back in the MLWG2, but I am unable to get it recognized by using the "Device class guid" as the UUID (no brackets), the assigned 'MLWG2-SD' as the label or the Device /dev/sda1.  All cases result in a (not present) after the entry.

I see the following in the kernel log, which indicates the card appears to be recognized by the system. 

[   13.370000] exFAT: Version 1.2.9
[   13.730000] SCSI subsystem initialized
[   13.750000] usb-storage 1-1.1:1.0: no of_node; not parsing pinctrl DT
[   13.750000] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[   13.760000] scsi host0: usb-storage 1-1.1:1.0
[   13.770000] usbcore: registered new interface driver usb-storage
[   14.770000] scsi 0:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0208 PQ: 0 ANSI: 0
[   14.790000] sd 0:0:0:0: no of_node; not parsing pinctrl DT
[   15.010000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   15.110000] block: extroot: not configured
[   15.120000] mount_root: switching to jffs2 overlay
[   15.180000] sd 0:0:0:0: [sda] 125106176 512-byte logical blocks: (64.0 GB/59.6 GiB)
[   15.200000] sd 0:0:0:0: [sda] Write Protect is off
[   15.200000] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[   15.220000] sd 0:0:0:0: [sda] No Caching mode page found
[   15.230000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   15.250000]  sda: sda1
[   15.260000] procd: - early -
[   15.270000] procd: - watchdog -
[   15.290000] sd 0:0:0:0: [sda] Attached SCSI removable disk

Does anyone have any suggestions?

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

OpenWrt is a Linux distro.

Step up to an ext4 filesystem.

Combatting ignorance since 2015.
(it's taking longer than I thought)


Be courteous to others. Search before posting

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

RangerZ wrote:

... 

...
[   15.180000] sd 0:0:0:0: [sda] 125106176 512-byte logical blocks: (64.0 GB/59.6 GiB)
[   15.200000] sd 0:0:0:0: [sda] Write Protect is off
[   15.200000] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[   15.220000] sd 0:0:0:0: [sda] No Caching mode page found
[   15.230000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   15.250000]  sda: sda1

...

Based on the above,  the kernel is recognizing the SD card at /dev/sda1. Haven't used exfat but what is the output of the following commands from a terminal window?

mount
mkdir /exfat
mount -t exfat /dev/sda1 /exfat
ls  /exfat

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

EXT4 is a fall back plan.  The device acts as a USB drive when powered off, and I get the fastest write speeds in this configuration (with the old SD card).  I expect EXT4 to not work with Windows, but have not tested it yet.

I have formatted my older SD card as exfat and having the exact same issue.  Logs look identical other than the drive size.  I have not found any complaints about exfat on CC15.05.

Running the commands creates a folder called exfat in the root of the device.  I do not see it in the mount point drop downs.  The results of the LS command are null.

root@MLWG2:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
root@MLWG2:~# mkdir /exfat
root@MLWG2:~# mount -t exfat /dev/sda1 /exfat
root@MLWG2:~# ls /exfat
root@MLWG2:~#
PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

5 (edited by Max Hopper 2016-06-21 07:54:28)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

This is a Linux topic.  Ergo, some knowledge of Linux, and here specifically its file systems, is required. That the mass storage is recognised by the device is sufficient for a casual enthusiast who would also understand the limitations of the Windoze file systems.

mount
rmdir /exfat <-- remove extraneous directory
mkdir /mnt/exfat
mount -t exfat /dev/sda1 /mnt/exfat
ls  /mnt/exfat

No experience with the GUI but convention is to mount under /mnt.

As for complaints and transfer rates, SD cards with the overhead of the required (consumer grade) adapter will under-perform directly connected, high-grade FSDs.

Combatting ignorance since 2015.
(it's taking longer than I thought)


Be courteous to others. Search before posting

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

RangerZ wrote:

...

root@MLWG2:~# mkdir /exfat
root@MLWG2:~# mount -t exfat /dev/sda1 /exfat
root@MLWG2:~# ls /exfat
root@MLWG2:~#

Based on no output from the
ls /exfat
command, I am surprised that you didn't get any error message from
mount -t exfat /dev/sda1 /exfat

Please issue the

mount -t exfat /dev/sda1 /exfat

again and then issue the

dmesg
command to see if there were any errors.

Also, issue the
mount
command without any parameters to see if /dev/sda1 is really mounted.

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

The results of the LS command were null as there was no files on the device.  I set up the device as a USB drive in Windows and added some content.  I can see the files and folders I added in the /mnt/exfat folder in putty.  I can not see the folder or files in Windows Explorer.

There was no entry created in fstab for the exfat device, so I added one (via the gui), but it shows as 'not present' even after restarting fstab:

config mount
    option enabled '0'
    option device '/dev/sda1/'
    option target '/mnt/exfat/'

I also added a an entry in samba (via the GUI) and the folder now shows in explorer, but not the contents.

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

RangerZ wrote:

The results of the LS command were null as there was no files on the device.  I set up the device as a USB drive in Windows and added some content.  I can see the files and folders I added in the /mnt/exfat folder in putty.  I can not see the folder or files in Windows Explorer.

There was no entry created in fstab for the exfat device, so I added one (via the gui), but it shows as 'not present' even after restarting fstab:

config mount
    option enabled '0'
    option device '/dev/sda1/'
    option target '/mnt/exfat/'

I also added a an entry in samba (via the GUI) and the folder now shows in explorer, but not the contents.

When you reboot, do you see the files when you do an

ls /mnt/exfat

command? If not, you may need to add

option fstype   'exfat'

to your fstab. If you can see the files after re-boot and issuing an ls /mnt/exfat command, then is sounds like you have some sort if samba/permissions issue. Sorry, I can't help you with that.

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

Also, I think you will need an option enabled '1' to automount the SD card after reboot.

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

@vernonjvs, sorry but I missed your 11:02 am post while I was writing mine. 

vernonjvs wrote:

Please issue the

mount -t exfat /dev/sda1 /exfat

again and then issue the

dmesg
command to see if there were any errors.

Also, issue the
mount
command without any parameters to see if /dev/sda1 is really mounted.

The results are, 

[ 1153.230000] [EXFAT] trying to mount...
[ 1153.260000] [EXFAT] mounted successfully

but I have the full log output if you think there might be something else of value, and

root@MLWG2:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /mnt/exfat type exfat (rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,namecase=1,errors=remount-ro)
root@MLWG2:~#

I assume this has some significance?  errors=remount-ro (last line far right).  I do not want read only, I want read\write, but I don't think that's the immediate issue. 

vernonjvs wrote:

When you reboot, do you see the files when you do an

ls /mnt/exfat

I do see the files listed in putty, not in Windows.

I added the options suggested for completeness with no difference.

I have set up 1/2 dozen or so USB and SD memory devices on VFAT and EXT3 on multiple devices and I have never had an issue with the device showing in mount points.  The exFAT fstab entry was created by plugging values (device vs UUID), not by system discovery.  The fact that 2 devices formatted as exFAT do not show I tend to think this is relevant.

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

After a day and a half of trying to get exFat to run on 2 devices unsuccessfully I gave up and formatted the device with FAT32 (go ahead Max and make noise).  It has worked fine on other devices and the only issue I have is a 4GB file size limit.  I guess I should transcode my 7.5 gb/hr video anyhow.

It took about 30 minutes to get all set up and tested. 

For those interested I have speed tested 2 different SD cards on the same device using Tutosofts' Lan Speed Test.

1 ~ 5yr old Sandisk 2GB SD card
Lan Speed Test (Mb/s)    write    read
LAN (wireless)            4.86    43.20
LAN (Wired)                8.08    87.767
USB                            31.2      87.22

2 - New PNY 64GB Turbo SDXC
Lan Speed Test (Mb/s)    write    read
LAN (wireless)            10.558    43.876
LAN (Wired)                59.024    91.827
USB                            78.129     160.866

In summary, exFat on CC 15.05 appears to be recognized in the kernel logs and can be mounted manually.  It can not be configured in Luci Mount Points and is not seen in Windows Explorer. 

As SD Cards over 64GB are delivered with exFAT file systems this is relevant information for users of this media.  The cards will work as FAT32 and EXT4.  As a Windows user FAT32 is less problematic.

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

As long as the card is mounted, why do you care if it is seen in LuCi mount points? What are you trying to do?

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

I do not.  It was more to give a sense of how the problem manifested itself.  I care that it is not seen in Windows Explorer.

The goal is to use this in a travel router, mostly as a source for DLNA, but also data over wifi (file share between colleagues).  File management will all be done on Windows clients.

I now realize I did not test mini-DLNA with exFAT.  I assumed that if I could not see it in Windows that this would not work, but that may not be true.  I will still need to manage files.

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

How are you using Windows Explorer to access the file? Samba? Do you want your colleagues to have read only access to your files or both read and write?

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

Using Samba.  If there is a better way to hook this to Windows Explorer, I am not aware.

Permissions are both read\write.  If I give them WLAN access to the device then I do not care what they see.  Generally a group of consultants at a client site who need to share work secure from the client (Project plans, notes, PPTs).  Do not always have access to the internet for Dropbox etc.  Passing USB drives is the norm today, it's slow and they do not always return.

It will need to work with Vista thru Win 10.  I have read the section in https://wiki.openwrt.org/doc/howto/cifs.server? under Troubleshooting, but not got there yet.

I see at the bottom of the page references to setting up individual user shares and this could be good for different projects (project = user), but this still may be overkill. 

If I partition the device, will it look like 2 drives (sda1, sda2)?  If so, and I want security, I assume I could set each with it's own?

Any idea how\if security impacts mini-DLNA?

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

Unsecured read only access is easy, Simply do the following:

cd /www
ln -s /mnt/exfat

Then the files can be accessed with any browser at the following URL
http://openwrt.lan/exfat
There are ways you can make this more professional.

If you install the openssh-sftp-server package, you can securely upload and download files with FileZilla.

For your clients who need read/write access, you may want to look into vsftp. Internet Explorer and Windows Explorer supports both ftp uploading and downloading.

Good Luck!

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

The sim link is very cool, thank you! 
I do know some HTML.  Can you please direct me to how I would edit the page?

Regarding the FTP tools, is the first secure (users\permissions, etc) and the other not?  Package descriptions are just the file name, and only vsftp has any info in OpenWrt https://wiki.openwrt.org/doc/howto/ftp.overview.  I expect installing them is easy, configuring them is not at all clear (at least so far).  I have found the home pages for both. 

Thanks for your help!

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

RangerZ wrote:

The sim link is very cool, thank you! 
I do know some HTML.  Can you please direct me to how I would edit the page?

The HTML directory listing is generated automatically by uHTTPd whenever you point it at a directory that does not contain an index.html file. Please see my post here for more details.

RangerZ wrote:

Regarding the FTP tools, is the first secure (users\permissions, etc) and the other not?

sftp is basically ftp over ssh and is secure. sftp is supported by filezilla but not Windows Explorer.

RangerZ wrote:

Package descriptions are just the file name, and only vsftp has any info in OpenWrt https://wiki.openwrt.org/doc/howto/ftp.overview.  I expect installing them is easy, configuring them is not at all clear (at least so far).  I have found the home pages for both.

FTP is insecure in a way (not encrypted) but is supported by any browser and Windows Explorer. You can set up username/password access but since the protocol is unencryoted, I don't recommend it. I have an anonymous vsftp server set up so people can download files from me and upload files to me without using a USB drive. Files can only be uploaded, but not downloaded from the incoming directory. Files can only be downloaded but not uploaded from the pub directory. If you are worried about packet sniffers, you can encrypt the files. You will then have a completely secure system with FTP. If you are interested, I can post my vsftp configuration files.

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

@vernonjvs, Thanks for the help and education, but this is probably overkill for my specific need.

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

@vernonjvs, I am running into issues with copying files from Windows Vista client to the SD card using Samba.  Files over 710MB seem to crash.

This got me thinking some more.  If I install openssh-sftp-server and use FileZilla (already installed) do I need Samba?  Also if I choose to go this route, does it matter how I format the SD card (ie can I use ext4 at this point)?  Will the symlink still work for a Windows user to be able to access files on the EXT4 formatted device?

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

RangerZ wrote:

@vernonjvs, I am running into issues with copying files from Windows Vista client to the SD card using Samba.  Files over 710MB seem to crash.

Expect pauses during uploads as the kernel flushes is cache to the SD card.

RangerZ wrote:

This got me thinking some more.  If I install openssh-sftp-server and use FileZilla (already installed) do I need Samba?

Don't know about your application. I don't use Samba.


RangerZ wrote:

Also if I choose to go this route, does it matter how I format the SD card (ie can I use ext4 at this point)?

Yes. I only use ext4 formatted SD cards, hard drives and USB falsh drives.

RangerZ wrote:

Will the symlink still work for a Windows user to be able to access files on the EXT4 formatted device?

Symlink will not have to change as long as your mount point doesn't change (I believe /mnt/exfat). However,  if you change your mount point (for example /mnt/ext4) you will have to change the symlink.

cd /www
rm exfat
ln -s /mnt/ext4

Good Luck!

Re: exFAT formatted Micro-SD card issues, CC15.05, Kingston MLWG2

vernonjvs wrote:
RangerZ wrote:

@vernonjvs, I am running into issues with copying files from Windows Vista client to the SD card using Samba.  Files over 710MB seem to crash.

Expect pauses during uploads as the kernel flushes is cache to the SD card.

The copy has a hard fail and gives the message.

There is a problem accessing [filename].
Make sure you are connected to the network and try again.

I have also noticed that the bigger the file, the longer it takes to start.

vernonjvs wrote:
RangerZ wrote:

This got me thinking some more.  If I install openssh-sftp-server and use FileZilla (already installed) do I need Samba?

Don't know about your application. I don't use Samba.

That was my basic question.  I can use one of the other methods to transfer files without Samba.

PC-Engines ALIX 2D13 CC 15.05 RC2 (Router - OpenVPN Server)
HooToo TM02 CC 15.05 (Travel Router - OpenVPN Client)
GLi-AR150 CC15.05/GLi 2.13 (Travel Router - OpenVPN Client)
Kingston MLWG2 CC15.05 (Travel Router - OpenVPN Client, mini-DLNA)