Amending fstab file


Dave18

Member
Joined
Mar 16, 2003
Messages
352
Age
49
I'm encountering problems whereby mounted SD cards are read only to everyone other than root. As they are fat32 I can't change permissions through chmod.


A quick google search suggests adding this line to fstab


/dev/sda4 /windows/RW vfat rw,fat=32,umask=000,noexec,quiet 1 1


I'm pretty sure I can just add the line as is so could anybody tell me what I need to change on the Pandora fstab to incorporate this fix?


Thanks


Dave
 
As far as i can remember mounting is handled by udev. I'm not sure to which extend (or if at all) /etc/fstab is having an influence on this for SD-cards. When you insert a card an udev-trigger is called which mounts the card as "/media/...". I fiddled around with this mechanism in order to disable it within my mount-menu.pnd.


The related lines are in "/etc/udev/rules.d/60-persistent-storage.rules" (search for "mmcblk").


So searching for udev-related HowTos on the web might help you. I found this ArchWiki-article, which also mentions the use of "umask", so this indeed might be a way to solve it. It even seems like you can specify a line that sets umask only for cards with vfat/ntfs. At least the following line which was taken from the mentioned side seems to set some mount-options for cards with these filesystems:



Code:
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"


But there is probably more to it than just adding a similar line. Unfortunately i can't give you an exact description as I'm not firm in udev-configuration myself. Maybe I am even totally wrong and doing it the udev-way is not recommended. So carefully try around and make backups of the changed config-files. Someone else following the thread, who has more experience in this?
 
Last edited by a moderator:
This could be a sign of a corrupted file on your SD Card (as I'm sure you know, Linux is more careful about this than Microsoft Windows, and will mount the entire card as ready-only when it notices corruption) - before going as far as modifying fstab, it might be worth checking the card on another machine, first, with dosfsck or similar (depending on what OS you use).


Also, if you don't mind, I'm going to move this over to the Support section - it seems that it would fit better there. :p
 
If you type



Code:
dmesg


is a shell just after loading the card, it may give some indication about what it is trying to do.
 
Back
Top