How do I add the "Read Only" and "UTF-8" option when automounting a USB or SD card?

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add the "Read Only" and "UTF-8" option when automounting a USB or SD card?

Jump to solution
201 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Community!

We have using IMX8MM and yocto Linux 4.19.

I want to add the "Read Only", "Sync"  and "UTF-8" option when automounting a USB / SD card.

(ex : $ mount -o ro,sync,utf8 ~~ ~~)

 

Is there any good solution?

 

----

I modified the line 

MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"

in "automount" function in "/etc/udev/scripts/mount.sh".But it didn't work.

 

Takashi Kashiwagi

Best Regards,

0 Kudos
1 Solution
188 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Takashi

 

this is general linux question and may be recommended to post it on kernel mail list :

http://vger.kernel.org/vger-lists.html

 

Best regards
igor

View solution in original post

0 Kudos
3 Replies
189 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Takashi

 

this is general linux question and may be recommended to post it on kernel mail list :

http://vger.kernel.org/vger-lists.html

 

Best regards
igor

0 Kudos
184 Views
Takashi_Kashiwagi
Senior Contributor I

Hi igor-san

 

thank you for your reply.

First,  I will check the kernel mail list.

 

Best Regards,

Takashi Kashiwagi

0 Kudos
105 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Community.

I forgot to write the solution, so I will write it.

 

The files to be modified are the following files.
"sources / poky / meta / recipes-core / udev / udev-extraconf / mount.sh"

 

I added the "ro, utf8, sync" option to the "mount" command in the above file.

 

Best Regards,

T.Kashiwagi

0 Kudos