LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-27-2024, 06:13 AM   #1
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Rep: Reputation: Disabled
SD card became read only mode after update


Hello!
Im using slackware current. When update the system around 20 march my sd cards became read only mode. The same card is read write mode on another machine also with slackware but without this update.
Can someone tell me which package may occurs the problem just to downgrade to previous version.

Till now i try these without success:
dosfsck -a /dev/mmcblk0p1
hdparm -r0 /dev/mmcblk0p1
always return: readonly = 1 (on)

its not about permissions because root also cant write on sd cards
in /var/log/messages find this:
from 20 march kernel: mmcblk0: mmc0:59b4 5cMJR 59.7 GiB
and on march 21: kernel: mmcblk0: mmc0:59b4 5cMJR 59.7 GiB (ro)

USB flash drives are not affected.
 
Old 03-27-2024, 07:03 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
probably the card died. Probably there is another error, which will force the system to set it read only. You need to check the logs.
 
Old 03-27-2024, 07:11 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,304

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I don't think it's a package. There's often a setting in /etc/fstab in the option "errors=remount,ro" for sd cards. If the card is going belly-up, this preserves the readable data.

The larger sd cards (≅30mm×20mm) can have little switches to physically set r/w or read only. sd cards don't live long and should not be rewritten frequently.
 
Old 03-27-2024, 07:15 AM   #4
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Original Poster
Rep: Reputation: Disabled
Sorry guys none of this cause the problem. As i said its not only one card and several cards which suddenly became read only after update. And the same card is working perfectly in read/write mode on another slackware machine which has not updated.
 
Old 03-27-2024, 08:39 AM   #5
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Original Poster
Rep: Reputation: Disabled
Its totally strange but when i switch to windows 10 pro and then the sd card was read only too, but when i do safety remove it and insert it again suddenly it became writable as it should be. Its very strange because now in slackware is also writable... And all other card became writable.
If someone have the similar problem may try to fix it by this way. I don't know what is happening at the end.
 
Old 03-27-2024, 08:59 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
for me it looks like you removed the card from the reader without umounting it (or something similar).
 
Old 03-27-2024, 09:35 AM   #7
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
for me it looks like you removed the card from the reader without umounting it (or something similar).
It's not the case. Why in another PC also with slackware the same sd card working in writable mode?
 
Old 03-27-2024, 10:38 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,304

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
Originally Posted by KorialStrasZ View Post
It's not the case. Why in another PC also with slackware the same sd card working in writable mode?
That's an interesting question, but only you have the answer in your hands. Check the obvious stuff like /etc/fstab, & less obvious stuff , (e.g. kernel settings or version, dodgy sdcard socket or usb plug). You're not telling us. Have you inserted the card into both, run 'sudo dmesg |tail -n 20' and compared outputs?

You can read the sdcard, so I'm not too worried if you have to use another PC to do it while you compare settings. Does it work on a liveslak usb?

Last edited by business_kid; 03-27-2024 at 10:39 AM.
 
Old 03-27-2024, 01:32 PM   #9
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
That's an interesting question, but only you have the answer in your hands. Check the obvious stuff like /etc/fstab, & less obvious stuff , (e.g. kernel settings or version, dodgy sdcard socket or usb plug). You're not telling us. Have you inserted the card into both, run 'sudo dmesg |tail -n 20' and compared outputs?

You can read the sdcard, so I'm not too worried if you have to use another PC to do it while you compare settings. Does it work on a liveslak usb?
fstab is not the problem
dodgy sdcard socket or usb plug - not the problem now it works on both pc, if the socked/plug is broken will never work until repair.
sudo dmesg |tail -n 20' and compared outputs? - now i cant do that because cards start work as normal on both pc and if the problem with read only mode happen again i will see if there is any difference in logs. As i see only difference before was this "(ro)" from my first post.
kernel settings or version - kernel is the same version
Something happen during insert the card in windows and cant figure it out, but now works in writable mode on both pcs.
 
Old 03-27-2024, 03:09 PM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,304

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
Originally Posted by KorialStrasZ
Something happen during insert the card in windows and cant figure it out, but now works in writable mode on both pcs.
Great! So now you apply Rule #1 of maintenance
Code:
If it works, don't fix it!
My guess is windows may have done something to the format, especially if it's FAT formatted. Try umounting the disk and running these next time if the problem recurs
  1. fsck.vfat -a /dev/mmcblk0
    # Fix the dirty bit and write. Remount.If there's still an issue
  2. sudo mount -o remount,rw /dev/mmcblk0
At least you might get an intelligent error, which is always useful.
 
Old 03-27-2024, 11:46 PM   #11
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Original Poster
Rep: Reputation: Disabled
Yes i will try. But the most curious thing is that the same cards which now is working perfectly:
1. Work in slackware pc1 in read only mode, and i cant remount in read-write mode because it always says sd card is read-only mode. Cant remove dirty bit because it again says sd card is read-only mode.
2. The same sd cards work in slackware on PC2 in read-write mode without any problems. So if the problem is in the way sd cards are unplugged, dirty bit, file system or something similar... Should they work perfectly on another PC also with slackware? Something missing...
And if the problem start again will try to find out what is the missing peace...
BTW do you have an idea how can i recreate the problem just with one sd card for testing?
 
Old 03-28-2024, 01:55 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
probably you have a problem with a reader, not the sd card itself. Or just it wasn't inserted properly. Or something else happened.
 
Old 03-28-2024, 01:13 PM   #13
KorialStrasZ
LQ Newbie
 
Registered: Feb 2012
Distribution: Slackware Current
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
probably you have a problem with a reader, not the sd card itself. Or just it wasn't inserted properly. Or something else happened.
Not possible. If the reader was the problem it cant be fixed by itself. Now the same reader and the same CARDS is working as it should - in read-write mode.
 
  


Reply

Tags
read only, sd card



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows folders became read-only shmu26 Linux - Newbie 10 11-28-2018 01:29 AM
Suddenly my home became read-only ahc_fan Slackware 3 02-26-2016 06:59 PM
USB Became read only mid-copy? iamchairs Linux - Desktop 4 08-04-2013 03:59 AM
[SOLVED] External USB Hard Drive became read only nutjob16 Linux - Newbie 7 08-22-2010 11:48 AM
web server (fedora core 5) became read-only file system after i upload a file nggs8411 Linux - Server 1 03-26-2007 09:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration