LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   SD Card Read only Weirdness. (https://www.linuxquestions.org/questions/linux-hardware-18/sd-card-read-only-weirdness-888747/)

business_kid 06-28-2011 07:21 AM

SD Card Read only Weirdness.
 
My Android w/CM-6.0 went a bit belly up recently, and one of the funny things it did was make all the sd cards I used in it read only to pcs, although it could read/write them OK. Observe the following

Code:

su
Password:
bash-4.1# umount /dev/sdb1
bash-4.1# umount /dev/sdb2
umount: /dev/sdb2: not mounted
bash-4.1# fdisk /dev/sdb
You will not be able to write the partition table.[###:-O??]

Command (m for help): p

Disk /dev/sdb: 1995 MB, 1995440128 bytes
64 heads, 63 sectors/track, 966 cylinders, total 3897344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000caf3b

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1            131    1943359      971614+  6  FAT16
/dev/sdb2        1951488    3894911      971712  83  Linux

I am new to fdisk with root permissions being shoved aside and told it's read only. So I got even more drastic
Code:

bash-4.1# dd if=/dev/zero of=/dev/sdb bs=512 count=3897344
dd: opening `/dev/sdb': Read-only file system
bash-4.1# shred /dev/sdb
shred: /dev/sdb: failed to open for writing: Read-only file system
bash-4.1#

This one is 2 gig, value near zero. I also have a 4G and a 16G. The Android seems to have no difficulty. I'm talking to the sdcard atm via an sdcard reader which did not previously exhibit this behaviour.

Any other ideas??

Linux.tar.gz 06-28-2011 10:48 AM

I usually left 4M blank space at the beginning and end of a SD card, like the official SD consortium formatter does.

SD problems are very common.

business_kid 06-29-2011 03:05 AM

I got this as one large vfat partition, and simply slimmed it to put on ext, so I doubt if I have mucked things up that way. Perhaps I left no space at the end, but that sort of thing usually looks after itself.


All times are GMT -5. The time now is 08:18 AM.