Find the answer to your Linux question:
Results 1 to 5 of 5
I have had problems with SD and USB memory cards/sticks. The most common problem is with the devices coming up in 'read only' mode. I have had this problem and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    189

    Read only filesystem, where is this determined


    I have had problems with SD and USB memory cards/sticks. The most common problem is with the devices coming up in 'read only' mode. I have had this problem and no one can advise me why they end up mounted this way. I know that when problems occur they sometimes wind up in read only mode but where is this stored and how can I change it? I've tried the mount with the remount option and changed the setting to read, write but it won't buy it. I feel if I can find the root of the problem maybe I can fix the problem or change the configuration some way to alleviate the current problem.

    I am using a USB to card device, which is mounted in the case and plugs into the internal USB connection. I have written to other SD cards, so I'm confident the the problem is not hardware since there isn't much to these devices. I also have an external, same type of device for doing the same thing and it shows the same problem. I know the device has a write protect switch, that I've changed and no change in the result.

    So the bottom line is, how does the system decide to write protect and when it does, where does it keep this information? Is it in some memory location or in a file? How can I 'look at' this information or status? 'df' doesn't show this information, but something must show the status of this device for me to get the error. Anyone, please advise... Thanks

    Jack

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Mount permissions should be shown for filesystems in the /etc/fstab or /etc/mtab files. What's on the SD and USB memory sticks? Type of filesystem? How are you coming up with the error.

  3. #3
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    189
    yancek, Yes, that's what I thought, but if you just stick one in, it doesn't seem to write anything to the fstab file. Usually the SD is clean and I've used it before to run a speed test on it which requires the disk utility in Debian. Other times it has a boot image of Debian Linux for another operating system, with a fat and an ext2 partition. Now and then it comes up in write only mode and I get the error reflected by the Debian Disk utility, and when I do, I've tried to move it to another port with the same problem. Sometimes... This is the problem and why I want to understand why and how it turns up in write only mode.

    I am going to try, next is to add an entry in the fstab file and see if that fixes the problem permanently. I got this error after using 'dd' to attempt to copy a Debian Linux image to an DreamPlug computer and use it to boot from. I got the same "device is write only" error. After this error I changed the write tab to write protect and retried it, but same then back and the same. Later, after dinner, I unmounted it and plugged it into another card reading device, where the 'dd' copy worked properly and it installed on the DreamPlug without a problem. It does this and I can't figure out where or what the intermittent is.

    That's why the question of when it determines it and where does it keep this information? It would be nice to look before the headache arises and try other things, but until I get a better handle on what it's doing and why I really can't do much. The hardware is virtually new, but it has worked and I'm betting on something in software tagging this as write only and it sticking, so where is that happening?

    Thanks for the suggestions, I will keep my ear open and hope someone comes up with an area that it is stored or something. I can write a program to display this information if I can find where it is and what structure it exists.

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    yancek, Yes, that's what I thought, but if you just stick one in, it doesn't seem to write anything to the fstab file
    You should see the changes in /etc/mtab. I have a number of partitions auto-mounted on boot and have entries for them in /etc/fstab. There are also entries for them in /etc/mtab. If I open /etc/mtab to see what is mounted then plug in an external drive or flash drive, I will see them in mtab. I don't have automount set on my machine and I am using KDE and dolphin filemanager so I need to click on the entry for a partition on the external or flash in dolphin. After doing that, the new partitions show up as entries in /etc/mtab.

    If you used dd to copy a Debian image in iso 9660 format, that will be read only to my knowledge. Not sure if I'm understanding what you are trying to do here.

    If you have a boot image

  5. #5
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    189
    yancek, Thanks, maybe that's what I'm looking for, maybe I do have some kind of strange hardware problem... I did see the device show up in mtab when I stuck in in the reader...

    Code:
    /dev/sdc2 /media/cd3457fe-9da2-4014-967d-808d816f1a50 ext2 ro,nosuid,nodev,uhelper=udisks 0 0
    Check this out... This is in another reader that I have in my cubbudard and it shows this when I plug it in...

    Code:
    /dev/sde2 /media/cd3457fe-9da2-4014-967d-808d816f1a50 ext2 rw,nosuid,nodev,uhelper=udisks 0 0
    That's why I'm having so much trouble, is that it's configure, some how, as read only.. What would be the difference between the two readers? Why would it mount one way on one and another way on the other? Any ideas?

    I have looked at the third field and don't know and can't find the definitions of either nosuid, nodev and uhelper, do you know? I looked in /proc/filesystems and it doesn't help either, as there is less than a couple of dozen, but many are prefixed with 'nodev'... I'm in a group called 'dev', do you think there is a connection?

    What I'm up to is developing on a 'plug computer' known as the DreamPlug which is a very small computer that we are trying to make a system of these or a group of 'mesh web servers' I think they call them under the Freedom Box name. They are running a version of Debian Linux and the device can boot off an SD or USB memory stick. So I'm building the image on my i386 then 'dd' it over to the SD or USB stick and then sneakernet over to the DreamPlug for testing, where it boots the new image and we can debug the code on the actual hardware.

    So it looks like I have a problem with one of my interface boards... Wonder if it's in warranty? Anyway thanks for the help... I'll leave this open for a few days to see if anyone can tell me why it would do this, I doubt it's hardware, but it's possible. I don't know if I know how to check for that, except exchange it. Also, it makes you wonder why there is an fstab file, if mtab has up to date information in it...

    Thanks so much... You deserve a pat on the back..

    Jack

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •