Read-only file system on microSD - General Accessories

Hi everybody..
I have a strange and boring issue with my micro SD card that I use with my smartphone.. Today, while I was reading a PDF book the phone freezes it self: the only solution was to reboot it!
But.. WOW; 'till that moment the phone doesn't recognize my micro-SD any more!! It doesn't give warnings or messages.. nothing.. the only problem is that my SD card is inserted but the phone won't read it..
I mount the micro sd into my Slackware laptop and it still have partitions but they are all read-only! Every thing I try to do (copy files, move, delete etc) fails with a read-only warning!
So I try to format all from the scratch.. but it is not possible!! It doesn't let me format my SD for the same reason: read-only file system!!
WOW!! It's absurd!!
What can I do? is there a solution for that?
I tried to use fsck, badblocks, mkfs but nothing helped!
fdisk -l output
Code:
Disk /dev/sdb: 15.9 GB, 15918432256 bytes
255 heads, 63 sectors/track, 1935 cylinders, total 31090688 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: 0x00031a4f
Device Boot Start End Blocks Id System
/dev/sdb1 1 29027343 14513671+ c W95 FAT32 (LBA)
/dev/sdb2 29027344 31027343 1000000 83 Linux
/dev/sdb3 31027344 31090687 31672 82 Linux swap
I have a FAT partition for data, a ext2 one used with Link2sd and a swap one.
This is the result I got when trying to format the second partition..
Code:
# mkfs.ext2 /dev/sdb2
mke2fs 1.41.14 (22-Dec-2010)
/dev/sdb2: Read-only file system while setting up superblock

The same to me. Wish a help!! Thanks

Related

[Q] SD Card blank or has unsupported file system

I have a HTC Desire Z Model A7272 with the microSD microSDHC SanDisk 8 GB Class 4.
CyanogenMod 7.0.3
After rooting and installing CyanogenMod 7.0.3, I went to Settings -> Storage -> Erase SD Card. Doing that showed two confirmation screens Erase SD Card -> Erase everything and then the notification bar said:
Code:
SD card safe to remove
Blank SD card
Opening the notification bar sais:
Code:
Blank SD card
SD Card blank or has unsupported file system
with the option Format SD card. Doing that, enters the circle again, displaying one after another:
Code:
SD card safe to remove
Blank SD card
SD Card blank or has unsupported file system
Same with Settings -> Storage -> Mount SD Card and Erase SD Card.
After Googling and Reading I booted ClockworkMod Recovery:
ClockworkMod Recovery 3.0.2.4
There I did mounts and storage -> mount /sdcard, which resulted in:
Code:
Error mounting /sdcard!
Same with mounts and storage -> format /sdcard:
Code:
Formatting /sdcard...
Error mounting /sdcard!
Skipping format...
The option advanced -> Partition SD Card only displays ext sizes until 4 GB, my card is 8 GB.
So I enter the shell:
Android Debug Bridge version 1.0.26 shell
VBusyBox v1.16.2androidfull
Boot Log sais:
Code:
# [I]dmesg[/I]
<6>[ 4.893951] mmc2: new high speed SDHC card at address e624
<6>[ 4.894866] mmcblk1: mmc2:e624 SU08G 7.40 GiB
<6>[ 4.895202] mmcblk1: p1
List the partition table:
Code:
# [I]fdisk -l /dev/block/mmcblk1[/I]
Disk /dev/block/mmcblk1: 7948 MB, 7948206080 bytes
256 heads, 63 sectors/track, 962 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 * 1 963 7760896 c Win95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 255, 63) logical=(0, 32, 33)
Partition 1 has different physical/logical endings:
phys=(1023, 255, 63) logical=(962, 138, 10)
Trying to mount it by hand:
Code:
# [I]mount -v -t vfat /dev/block/mmcblk1p1 /mnt/sdcard[/I]
mount: mounting /dev/block/mmcblk1p1 on /mnt/sdcard failed: Invalid argument
System call trace of that:
Code:
# [I]strace mount -v -t vfat /dev/block/mmcblk1p1 /mnt/sdcard[/I]
stat64("/dev/block/mmcblk1p1", {st_mode=S_IFBLK|0600, st_rdev=makedev(179, 33), ...}) = 0
mount("/dev/block/mmcblk1p1", "/mnt/sdcard", "vfat", MS_VERBOSE, ""...) = -1 EINVAL (Invalid argument)
write(2, "mount: mounting /dev/block/mmcbl"..., 77mount: mounting /dev/block/mmcblk1p1 on /mnt/sdcard failed: Invalid argument
) = 77
mprotect(0x40008000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0x40008000, 4096, PROT_READ) = 0
munmap(0x40008000, 4096) = 0
SYS_248(0xffffffff, 0x1000, 0xafd46300, 0xafd46300, 0xffffffff <unfinished ... exit status 255>
Unfortunately, the following programs I am used to by Linux are not available on my phone: blkid, fsck, mkfs.
I tried creating a new partition table with one primary partition over the entire size. Neither ClockworkMod Recovery nor CyanogenMod wanted to format or mount this. However, one of them changed the partition table back to what can be seen above.
Unfortunately, I can not currently put the card into another device to debug/format/mount it there.
Any idea how I can debug this further on my phone?
from the formating going on your phone, it seems to say skipped the format. i suggest to format the sd card on your computer to fat32. also if your computer detects errors on the sd card, you can debug them on your computer then reformat it. just remeber to back up your stuff
I didn't have another device. That was my problem.
So I dug one up (some Samsung, non-Android), put it in there, formatted it, put it back in mine and it worked!
Cool for problem solved, but I am still wondering what the cause of this was and how to fix it.
The partition table is still looking exactly the same:
Code:
# [I]fdisk -l /dev/block/mmcblk1[I]
Disk /dev/block/mmcblk1: 7948 MB, 7948206080 bytes
256 heads, 63 sectors/track, 962 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 * 1 963 7760896 c Win95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 255, 63) logical=(0, 32, 33)
Partition 1 has different physical/logical endings:
phys=(1023, 255, 63) logical=(962, 138, 10)
So my questions remain:
1. Why were both CyanogenMod 7.0.3 and ClockworkMod Recovery 3.0.2.4 unable to format and/or mount the card? Where is the exact bug?
2. How to fix this software so we don't need another device?
ilf_ said:
I didn't have another device. That was my problem.
So I dug one up (some Samsung, non-Android), put it in there, formatted it, put it back in mine and it worked!
Cool for problem solved, but I am still wondering what the cause of this was and how to fix it.
The partition table is still looking exactly the same:
Code:
# [I]fdisk -l /dev/block/mmcblk1[I]
Disk /dev/block/mmcblk1: 7948 MB, 7948206080 bytes
256 heads, 63 sectors/track, 962 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk1p1 * 1 963 7760896 c Win95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 255, 63) logical=(0, 32, 33)
Partition 1 has different physical/logical endings:
phys=(1023, 255, 63) logical=(962, 138, 10)
So my questions remain:
1. Why were both CyanogenMod 7.0.3 and ClockworkMod Recovery 3.0.2.4 unable to format and/or mount the card? Where is the exact bug?
2. How to fix this software so we don't need another device?
Click to expand...
Click to collapse
Did you try
#parted /dev/block/mmcblk1p1
in clockwork recovery?
I suggest getting a new card. Either of the cards in my signature are good, and PNY's 8GB Class 4 card is a good backup card.
Im having the same problem. I have an atrix. WHAT DO I DO
I'm having the same issue and have tried formatting through clockwork, the current rom i'm using, and windows. The sdcard still cannot be mounted. I've tried searching throught the forums and haven't found anything that helped. Hoping someone might have some suggestions other than buying a new sdcard...thanks
also, how do u type in commands while in recovery?

[Q] SD Card write speed dropped!

Well, I got a new Class 10 SD card, Transcend, from an online shop.
First few days it gave me great speeds. ~15mbps. Now, I'm getting not more than 4mbps!
I guess this happened mostly after using Data2SD or Partitioning the SD card
Anyone has any clue?
Hi,
I'd suggest formatting your memory card, then re-partitioning/re-doing whatever you've done to it.
Sent from my very dumb HTC Wildfire S (Stock Euro 2.3.5)
Did that a couple of times already
Well then I really don't know, sorry ...
Sent from my very dumb HTC Wildfire S (Marvel - Stock Euro 2.3.5)
Try using an SD Card reader and check its speed on your PC so that you know whether it's the card or the phone.
Then try a fresh ROM without Data2SD and check the speed.
Do each of the tests more than once cause sometimes there can be anomalies.
Same problem here
Bout a Samsung class 10 ,16gb sdhc and transfered some files to test the speed on my computer
I got 21mb write and 24mb read speed just as it said on the box
made partitions with Minitool to creat ext4 at a 32 cluster size
next thing you know even in windows my speed went down to 1mb/ and 2mb/sec
Anyone know whats going on here ?
Partition Alignment
SharpKami said:
Bout a Samsung class 10 ,16gb sdhc and transfered some files to test the speed on my computer
I got 21mb write and 24mb read speed just as it said on the box
made partitions with Minitool to creat ext4 at a 32 cluster size
next thing you know even in windows my speed went down to 1mb/ and 2mb/sec
Anyone know whats going on here ?
Click to expand...
Click to collapse
There are several factors that could play into it here.
How are you accessing the microSDHC? USB cable to phone / plugged with card reader?
Can you test with a more reliable tool, like CrystalDiskMark?
Windows may be buffering the transfer and giving wrong numbers.
It could be that Minitool did not align the partition(s) properly, as it would have done for built-in SSDs.
Did you shrink the (first) FAT32 partition and create the ext4 at 'the end' of the available space?
On my WFS + SanDisk 16GB, Class 10, I created the partitions with CWM, and DATA2SD (Data2sdV2withA2sdremover_by_jikantaru) had to recreate the ext3 partition, because it was improperly aligned. This is from the data2whateverlog.txt:
Code:
=============================
Fri Nov 2 10:44:17 PDT 2012
=============================
+++ Your Partition(s) are NOT aligned and data2whatever modified them:
----------------------------------------------------------------------
+++ Your SD-Ext Partition started at sector: 29617188
=> your SD-ext partition was NOT 1024k aligned
and it should start at following sector: 29618176
+++ Your Swap Partition started at sector: 30617188
=> your Swap partition was NOT 1024k aligned
and it should start at following sector: 30617600
+++ OLD Partition table of your SD-Card:
----------------------------------------
__________________________fdisk_Partition_table_____________________________
Disk /dev/block/mmcblk0: 15.9 GB, 15931539456 bytes
255 heads, 63 sectors/track, 1936 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 29617187 14808593+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 29617188 30617187 500000 83 Linux
/dev/block/mmcblk0p3 30617188 31116287 249550 82 Linux swap
____________________________________________________________________________
+++ The Partitiontable has been modified
----------------------------------------
__________________________fdisk_Partition_table_____________________________
Disk /dev/block/mmcblk0: 15.9 GB, 15931539456 bytes
255 heads, 63 sectors/track, 1936 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 29617187 14808593+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 29618176 30617599 499712 83 Linux
/dev/block/mmcblk0p3 30617600 31116287 249344 83 Linux
____________________________________________________________________________
+++ The SD-ext partition got formated with EXT3 afterwards:
-----------------------------------------------------------
_________________________mke2fs+tune2fs_output______________________________
Filesystem label=userdata
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
124928 inodes, 499712 blocks
0 blocks (0%) reserved for the super user
First data block=1
Maximum filesystem blocks=524288
61 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
tune2fs 1.41.6 (30-May-2009)
Creating journal inode: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.6 (30-May-2009)
Filesystem volume name: userdata
Last mounted on: <not available>
Filesystem UUID: 5e4066d3-bb6c-4ef9-8081-03c03cecfce7
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal dir_index filetype sparse_super
Filesystem flags: unsigned_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 124928
Block count: 499712
Reserved block count: 0
Free blocks: 475708
Free inodes: 124917
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2048
Inode blocks per group: 256
Filesystem created: Fri Nov 2 17:44:20 2012
Last mount time: n/a
Last write time: Fri Nov 2 17:44:44 2012
Mount count: 0
Maximum mount count: 31
Last checked: Fri Nov 2 17:44:20 2012
Check interval: 15552000 (6 months)
Next check after: Wed May 1 17:44:20 2013
Reserved blocks uid: 0 (user unknown)
Reserved blocks gid: 0 (group unknown)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 611421e5-1bfd-44b8-95d8-8af4c40c053b
Journal backup: inode blocks
____________________________________________________________________________
+++ Filesystem check found no errors - no log attached
-------------------------------------------------------
I checked the speed with RoboCopy over USB to the WFS, it was about 4MB/s.
CrystalDiskMark reports 4.5MB/s write speed over the same connection (with 5 runs of 100MB data).
Try using SD-Booster app
You're right litemaster ! my windows was showing the wrong figures while transferring files .
i tried the sd tester and booster ,speed results weren't all that bad , 10mb read /10mb write.
and in windows it shows 2mb but file transfers at a much higher rate some times 30mb/sec.
Appreciate your your help buddy and Eduardo
P.S... By the way , given the results , this samsung class 10 isnn't that bad. Bought it for £12.00 from amazon.

SD Card Is Damaged error, but card is OK

Does anyone know what Android is doing to check the external SD card before producing the error that the SD card is damaged? I get that error after every reboot the card card is then fully functional (camera can write to it, file browsers can access it). I have reformatted the card in the phone and in Windows 7. Here is the output from fsck from a linux box:
[email protected]:/media$ sudo fsck -v /dev/sdb1
fsck from util-linux 2.19.1
dosfsck 3.0.9 (31 Jan 2010)
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
32768 bytes per cluster
596 reserved sectors
First FAT starts at byte 305152 (sector 596)
2 FATs, 32 bit entries
1944576 bytes per FAT (= 3798 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 4194304 (sector 8192)
486032 data clusters (15926296576 bytes)
63 sectors/track, 255 heads
2048 hidden sectors
31114240 sectors total
Checking for unused clusters.
Checking free cluster summary.
/dev/sdb1: 1 files, 2/486032 clusters
Time to reflash the ROM maybe? (Diet ICS) I'd just like to know what command is being run to trigger the error. It is a 16GB card formated as fat32
ok, while I was spinning my wheels someone else had posted in the Diet ICS thread that this is apparently a known issue with the toggles being used.
I had to make sure my card was formatted to FAT32 for it to recognize my card. try that.
MentalDragon said:
I had to make sure my card was formatted to FAT32 for it to recognize my card. try that.
Click to expand...
Click to collapse
In this case it was specific to the ROM and reflashing the theme fixed it. While I was trying to figure out what was going on and ended up posting this question, someone else was already posting the fix.

Partitioned SD card and SD card removed - Help

The SD card was removed while the device was running.
The device is running CM 7.2 and the SD card was partitioned to extend the internal memory.
Now, everything is out of whack.
The call log is gone, the texts are gone, I have no contacts, I have no favorites.
The widgets are gone, the home screen icons are gone.
Actually it'd be better to say what's still there: The apps themselves and some file content (pictures, videos, downloads) are there.
How do I rectify this and safe my data. I wouldn't mind migrating it to a new device as I have a new device.
Please advice if you can
what method did you use to partition your card ? some leave user data on internal memory some move that too on to external. i don't know if there's any PC software that can see your 2nd partition if you put your SDcard into a card reader on a PC for backing up.
3mel said:
what method did you use to partition your card ? some leave user data on internal memory some move that too on to external.
Click to expand...
Click to collapse
I don't know for sure but I think it was Data2SD from the package Data2sdV2withA2sdremover_by_jikantaru.zip
It is a 2 GB SD card and the phone shows an internal storage of 473 MB and 1,39 GB on the SD card.
3mel said:
i don't know if there's any PC software that can see your 2nd partition if you put your SDcard into a card reader on a PC for backing up.
Click to expand...
Click to collapse
I inserted it in a Ubuntu computer and got some output.
This is the relevant output from Ubuntu
Code:
[email protected]:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p1 1.4G 1.4G 21M 99% /media/ubuntu/F031-5199
/dev/mmcblk0p2 465M 393M 73M 85% /media/ubuntu/userdata
Code:
[email protected]:~$ sudo fdisk -l
Disk /dev/mmcblk0: 1.9 GiB, 2002780160 bytes, 3911680 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
Disklabel type: dos
Disk identifier: 0x000ccb88
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 1 2912109 2912109 1.4G c W95 FAT32 (LBA)
/dev/mmcblk0p2 2912256 3911679 999424 488M 83 Linux
Code:
[email protected]:~$ sudo ls /media/ubuntu/F031-5199
AI Factory Stats LOST.DIR Safety Guide
Android media ScanToPDF_Free
aScreenshot miniclipId.txt SmsContactsBackup
busybox-stericson My Documents svox
clockworkmod My files System Volume Information
data Notifications TitaniumBackup
data2whateverlog.txt Pictures tmp
DCIM Quick Start Guide toolbox-stericson
download reboot-stericson User Manual
ezPDFReader Ringtones
kindle rosie_scroll
[email protected]:~$ sudo tail /media/ubuntu/F031-5199/data
Code:
[email protected]:~$ sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
mmcblk0
├─mmcblk0p1 vfat F031-5199 /media/ubu
└─mmcblk0p2 ext3 userdata 6f6684d8-78c2-40b6-ae72-d9b089f623a1
Both partitions are still there and accessible. I did run fsck but it did not help with the lost thing (texts, etc.)
somebody else had trouble with that method a cm10.1 thread. I would have said try flashing it again but I don't know that method...

Hard Bricked Galaxy S3 SPH-L710

I've read a number of forum posts about how to unbrick a hardbricked galaxy S3 and followed them all and even tried countless times the same method as is suggested, yet I can't get my phone to boot at all. Anyone out there have any advice? I rooted my phone just fine and then flashed Android_Revolution_HD-SGS3_53.0.zip onto it through clockwork mod. Everything appeared to be installing fine and when it came time to reboot, clockwork mod notified me that something appeared wrong in my boot file and I may lose root priveledges. It then asked if I wanted clockwork mod to fix it and I unfortunately said yes. The screen immediately went pitch black and nothing I have tried gets it to show any signs of life.
I have a 64 GB micro SD that I've used with the command
Code:
sudo dd if=Desktop/debrick_sph_l710.img of=/dev/mmcblk0
I then check it with
Code:
sudo fdisk -l /dev/mmcblk0
and get
Code:
GPT PMBR size mismatch (30777343 != 122241023) will be corrected by w(rite).
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Disk /dev/mmcblk0: 58.3 GiB, 62587404288 bytes, 122241024 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
Disklabel type: gpt
Disk identifier: 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Device Start End Sectors Size Type
/dev/mmcblk0p1 8192 131071 122880 60M Microsoft basic data
/dev/mmcblk0p2 131072 131327 256 128K unknown
/dev/mmcblk0p3 131328 131839 512 256K unknown
/dev/mmcblk0p4 131840 132863 1024 512K unknown
/dev/mmcblk0p5 132864 136959 4096 2M unknown
/dev/mmcblk0p6 136960 137983 1024 512K unknown
/dev/mmcblk0p7 137984 158463 20480 10M unknown
/dev/mmcblk0p8 158464 159487 1024 512K unknown
/dev/mmcblk0p9 159488 160511 1024 512K unknown
/dev/mmcblk0p10 160512 180991 20480 10M Linux filesystem
/dev/mmcblk0p11 180992 208895 27904 13.6M Linux filesystem
/dev/mmcblk0p12 208896 215039 6144 3M unknown
/dev/mmcblk0p13 215040 221183 6144 3M unknown
/dev/mmcblk0p14 221184 3293183 3072000 1.5G Linux filesystem
/dev/mmcblk0p15 3293184 28958719 25665536 12.2G Linux filesystem
/dev/mmcblk0p16 28958720 28975103 16384 8M Linux filesystem
/dev/mmcblk0p17 28975104 30695423 1720320 840M Linux filesystem
/dev/mmcblk0p18 30695424 30715903 20480 10M unknown
/dev/mmcblk0p19 30715904 30736383 20480 10M unknown
/dev/mmcblk0p20 30736384 30748671 12288 6M Linux filesystem
/dev/mmcblk0p21 30748672 30754815 6144 3M unknown
/dev/mmcblk0p22 30754816 30754831 16 8K unknown
/dev/mmcblk0p23 30754832 30765071 10240 5M Linux filesystem
The phone acts no differently with the flashed sd card than it does without it. Is the only way to fix it with a JTAG?
U need 16gb sd card, debrick image for your phone. Then you can boot into download mode and flash in odin! Get a high quality 16gb card
hilla_killa said:
U need 16gb sd card, debrick image for your phone. Then you can boot into download mode and flash in odin! Get a high quality 16gb card
Click to expand...
Click to collapse
I'm using a 32 GB SanDisk micro sd, could it just be that all the debrick images I've used are just the wrong ones?
Its possible but i think if your phone is 16gb than you need 16gb sd

Categories

Resources