Partitioned SD card and SD card removed - Help - HTC Wildfire S

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...

Related

Issue with using clockworkmod to partition sd-ext on sdcard

I had really slow performance when using an a2sd ROM - (which redirected the /data/app, /data/app-private, and /data/dalvik-cache to /system/sd)
The issue was that clockwork recovery had formatted my sd card with a 1024 block size. Re-formatting it with a standard block size (4096) resulted in much better speeds for me..
(I re-formatted by running an ubuntu livecd, mounting and copying the contents of /dev/sda2, running mkfs.ext3 against /dev/sda2 (which was the second partition for my sd card..) - re-formatting it with a more standard block size of 4096, then copying the data back..)
Thought this might help somebody. You can see the block size of /system/sd (if you're using apps2sd with an external sd card partitioned..) by running 'adb df /system/sd' - if it shows (block size 4096) - you're good.. anything lower.. you might want to consider re-doing your setup..
-mark
PS - it might actually have been RA that formatted with the 1096 block size.. I honestly can't remember now which recovery I used to partition initially..

[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?

Nook Touch Partition Hacking

Folks are starting to look at the ST partition table and the file layout on the ST. This post is intended for other folks with power tools to think about.
My goals:
- expose the BN content (so I can read the New Yorker on my NC, mostly, but also so I can manage the library on my ST with Calibre as I do on the NC)
- understand how much room I have on the internal memory
- increase the amount of memory available for sideloading.
I got in well over my head during a conference call last week, but my ST is reborn and now able to do cool things.
However: I did not start from a factory fresh partitioning scheme, sadly. My first backup of the device went permanently offline (the disk and linux install containing it) and I was unable to return to it after I'd borked the ST pretty badly on the call. All I really was sure of was the partition order.
The tools:
- "noogie." Available and discussed at http://nookdevs.com/NookTouch_Rooting
- the rooting disk from http://forum.xda-developers.com/showthread.php?t=1132693 (currently at 1-6-24 - mad props to the folks who put that together!)
- a working Linux installation with USB support. Vmware player in Windows works just fine for this.
Note: currently, that third element is key; this is not intended as a walkthrough that tons of people could follow today, but to spark awareness of the technique - it seems possible that something very much like the DeanG scripts for redoing the NC partitions could emerge. Hint Hint.
First: the noogie disk is super cool. You boot from it and it mounts all of your ST partitions. So you can get a complete backup in linux (or Mac) by :
#dd if=/dev/sdX of=virigin.ST.img bs=1M
A true disk image backup.
You could (if you were patient) get the individual partitions as well - there is value in doing that, because within the first three partitions your serial number is stored. It's possible to restore this image to a different ST -- but then you've also transferred your serial number. whoops.
You can mount the partitions in linux and copy all the files from each of them as well.
After you have a backup, power off, insert the simple touch root disk, and power up. It will boot to a screen that reads "rooted forever" (as does Noogie) and after a pause, will continue booting as it does some setup.
You will wind up with ADB enabled over wifi by default and google apps installed.
You may also need to restart immediately -- I've found that sometimes after rooting, my s/n is all zeroes. Restarting clears that.
I also find that in order to get the Android marketplace working, I need to hunt down a copy of Vending.apk that is 2 meg (2,125,824 bytes on disk) in size and install it over the copy that touchnooter installs. I believe this one is the one that folks use for cm7?
The command to install it is:
#adb install -r Vending.apk
The -r is needed to avoid getting told the signature's bad. It's a reinstall flag.
So , once rooted, you have access to ADB and to fdisk for examining and changing disk layout.
The layout is interesting. Here's the issue: I know the order of the layout, but I screwed up my partition boundaries before I started, so the actual values here are from AFTER I finished:
(these values are from the fdisk display; they are not commands)
/dev/block/mmcblk0p1 c Win95 FAT 1-38
/dev/block/mmcblk0p2 c Win95 FAT 39-46
/dev/block/mmcblk0p3 83 Linux 47-141
/dev/block/mmcblk0p4 5 Extended 142-926
/dev/block/mmcblk0p5 83 Linux 142-285
/dev/block/mmcblk0p6 6 FAT16 406-807
/dev/block/mmcblk0p7 83 Linux 808-926
/dev/block/mmcblk0p8 83 Linux 286-405
It's partitions 5-8 that are interesting.
5 is /system, and I leave it untouched.
6 is /media - the area you can copy files to. 6 is -- on my device -- the SECOND to last PHYSICAL partition.
7 is /cache. It is the LAST physical partition.
8 is /data - and it is the 6th PHYSICAL partition.
The device restore scripts from BN don't care how big the partitions are, but they do care what ORDER they're in.
I will give my current partition table at the end - I want to avoid posting a (wrong) copy of what I thought I started with, because I screwed it up.
A stock ST writes your purchases to /data, not to /media.
It writes them to /data/media, in fact.
So, first question: what happens if you do an
#rm -r
inside /data/media, then
#cd ..
#rmdir media
then do
#ln -s media /media to so you wind up with
lrwxrwxrwx root root 2011-08-29 20:19 media -> /media
in your /data partition?
1) It works
2) restart, grab stuff from BN - and you see it from your desktop system. Your content is visible.
Win!
Ok, so the next thing is: bugger . I only have 240 M or so of room for stuff now? Eh?
shell back in and use fdisk to delete the partitions and rebuild them.
The order is key here. They are named as they're made, but you need them laid out out of physical order.
The following worked for me:
#fdisk /dev/block/mmcblk0
d6
d6
d6
Partitions 6, 7 and 8 are gone now.
Next, to create partitions of a useful size in the correct order
n
(creates p6)
406 807
n
(creates p7)
808
926
n
(creates p8)
286 405
write your changes from fdisk.
reboot.
But - now you've picked stuff and moved it around. It's a Really Good Idea to reformat the partitions before use.
The best way is probably to use the mkfs tools on the device.
Best way, schmest way. I booted to Noogie and used qtparted in linux so I had a gui to doublecheck my partition layout.
formatted these as ext3 for the Linux partitions at 7 and 8, and as fat16 for the win partition at 6.
It's entirely possible that you could format that as fat32, but it comes from the factory at fat16 so I stuck with that.
Power down, remove noogie, power up.
I got a "failed to install" followed by a reboot followed by being back in the OS.
I did not have to reroot to get my apps, but I did need to reroot to fix the marketplace - the /data partition being blown out meant that the Android market was crashing.
Now, to finish:
go back in via adb and reestablish the symlink (you just blew it out when you resized /data)
So:
shell in
#cd /data/media
#rm -r
(only inside /data/media, it WILL tear out any files it sees.) then
#cd ..
#rmdir media
then do
#ln -s media /media
And your stuff is put on the /media directory and can be managed properly.
I think this stuff may well be scriptable.
There's a great thread on the repartitioning that I found last night, making use of sfdisk rather than fdisk:
http://forum.xda-developers.com/showthread.php?t=1225196
As far as I know, swapping /data/media out to /media is new, but if it's not I apologize for being unaware of it.
So, here's the layout I finished with:
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 38 77808 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p2 39 46 16384 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p3 47 141 194560 83 Linux
/dev/block/mmcblk0p4 142 926 1607680 5 Extended
/dev/block/mmcblk0p5 142 285 294896 83 Linux
/dev/block/mmcblk0p6 406 807 823296 6 FAT16
/dev/block/mmcblk0p7 808 926 243696 83 Linux
/dev/block/mmcblk0p8 286 405 245728 83 Linux
Partition table entries are not in disk order
Can you please format your commands in such a way that they look correctly? Current formatting in the post with your commands seem strange and incorrect.
I think all are OK except the fdisk commands.
Unfortuantely, the fdisk commands are given inside of an ascii gui of sorts, to there's really no 'great' way to represent them, I don't think.
I've prepend the others with # so it's obvious they're shell commands.
How's about symlinking various things to a 2nd partition (ext4?) on the sdcard then?
gparted?
Has anybody tried gparted to resize the partitions? If it works it could be useful.
Have any one tried doing it on windows and using which software? I'm thinking of mini tool's partition manager. But i'm not sure. Anyone?
roustabout said:
#cd /data/media
#rm -r
(only inside /data/media, it WILL tear out any files it sees.) then
#cd ..
#rmdir media
then do
#ln -s media /media
And your stuff is put on the /media directory and can be managed properly.
Click to expand...
Click to collapse
Thanks a lot for this, but the second and last lines are wrong:
rm -r should be rm -r *
ln -s media /media should be ln -s /media media
Still, thanks for the idea!
I wonder if symlinking to the sdcard could fix the whole 'shelves don't work for sideloaded books on sdcards' problem.

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.

Read-only file system on microSD

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

Categories

Resources