SD card suddenly read-only

Willy K. Hamra w.hamra1987 at gmail.com
Tue Oct 14 00:06:08 UTC 2008


Dotan Cohen wrote:
> 2008/10/14 Willy K. Hamra <w.hamra1987 at gmail.com>:
>> cherryfinals wrote:
>>> --- On Mon, 10/13/08, Dotan Cohen <dotancohen at gmail.com> wrote:
>>>
>>>> From: Dotan Cohen <dotancohen at gmail.com>
>>>> Subject: SD card suddenly read-only
>>>> To: "kubuntu-users." <kubuntu-users at lists.ubuntu.com>
>>>> Date: Monday, October 13, 2008, 7:27 PM
>>>> I have been moving files back and forth between an PDA (Dell
>>>> Axim) and
>>>> my personal computer (the Kubuntu machine) via SD card all
>>>> day.
>>>> Suddenly, the Kubuntu machine insists that the card is
>>>> read-only and
>>>> will not write to it. Even reseting the machine and
>>>> switching card
>>>> readers does not help. The Axim still writes to the card
>>>> just fine.
>>>> What could be the cause?
>>>>
>>>> Thanks in advance.
>>>>
>>> Did you accidentally slip the little slide lock on the side of the
>> card? I've done that a couple of times, when in a hurry.
>>> Stan
>> don't think so, since Axim is still writing to it.
>> check your mounts. type "mount" in konsole and see it's mount options,
>> is there an "ro" option? if yes, umount it, and try to manually mount it
>> with the "rw" option, the command should look like:
>> sudo mount /dev/ur_sd_card /media/somewhere_here -o rw
>> you can of course add the "-t file)system" option if you want.
>> now see if you can writ to it.
>>
>> as to why this might happen? sometimes, if a filesystem is improperly
>> unmounted, unplugged without safely removing first, and the filesystem
>> is a non-linux filesystem like FAT or NTFS, the system gets scared that
>> there might be corruption on the filesystem, and since such fs don't
>> have a proper fsck program in linux, they get mounted as read-only to
>> prevent further damage. if you type "dmesg | tail" after plugging your
>> card, you should see some info about this read-only mount, and it's
>> reasons. sometimes, like NTFS, you might need to use the force option in
>> order to mount an improperly unmounted fs as rw, so the command will end
>> with "-o rw,force".
>> hope this helps you.
> 
> hardy2 at hardy2-laptop:~$ dmesg | tail
> [ 1904.925562] sd 2:0:0:3: Attached scsi generic sg5 type 0
> [ 1907.366009] FAT: Filesystem panic (dev sdb1)
> [ 1907.366016]     fat_get_cluster: invalid cluster chain (i_pos 0)
> [ 1907.366020]     File system has been set read-only
> [ 1927.067153] FAT: Filesystem panic (dev sdb1)
> [ 1927.067160]     fat_get_cluster: invalid cluster chain (i_pos 0)
> [ 2090.004226] FAT: Filesystem panic (dev sdb1)
> [ 2090.004233]     fat_get_cluster: invalid cluster chain (i_pos 0)
> [ 2112.759870] FAT: Filesystem panic (dev sdb1)
> [ 2112.759877]     fat_get_cluster: invalid cluster chain (i_pos 0)
> 
> The economy is bad, but that should make the SD card feel more
> comfortable that I will not replace him. Why is it panicing then?
> 

it looks like a corruptio in the filesystem. do you have a windows
machine? theyusually handle fat filesystems better, you can put it
there, and run chkdsk on it.
or you can use fsck.vfat in kubuntu (not sure if it's good, never tried
it before), but remember to umount it first.

sudo umount /dev/sdb1
sudo fsck.vfat /dev/sdb1 -v -r
(-r will run it in interactive repair mode)

if this doesn't solve it, i guess you're only option is

sudo umount /dev/sdb1
sudo mount /dev/sdb1 /somewhere -o rw,force
(use at your own risk)

-- 
Willy K. Hamra
Manager of Hamra Information Systems
Co. Manager of Zeina Computer & Billy Net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: w_hamra1987.vcf
Type: text/x-vcard
Size: 130 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20081014/5b35293b/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20081014/5b35293b/attachment.sig>


More information about the kubuntu-users mailing list