[Galaxy S I9000 General] Bnaya:
I've found a way to access "dead" internal sdcard. need help to make a permanent fix

I think i've accidentally discovered a way to restore access to dead internal sd card.

And sorry for my broken english :)

You can skip the story till the "*Punchline*"

So i got a i9000 to try and save.

He has no /dev/block/mmcblk0 when the microsd card was out and when the microsd was in, the microsd was the mmcblk0 instead of mmcblk1

So i've did the regular fix, made 2 partitions on the microsd. one for the usb storage and one for the /data

The device got back to life but still without the internal sd(as expected).

On /dev/block he has only the mmcblk0 via recovery or regular boot (Using adb shell)

Then i had a problem, the camera won't work. its had that message "insert sd card before using the camera"

And on logcat you see that error: "E/CameraStorage( 3950): Failed to create /storage/sdcard0/DCIM/100ANDRO"

Although the mmcblk0 is the microsd now, and there is no mmcblk1 the ROM (cm11 on that case)

mounted the microsd usb storage partition (mmcblk0p1) on /storage/sdcard1/ and not /storage/sdcard0/

(The mount of /data and /sdcard are made via lvm)

I've tried to manually mount /dev/block/mmcblk0p1 on /storage/sdcard0/ - didn't worked (don't rembere the error message )

Tried link /storage/sdcard0/ -> /storage/sdcard1/ got some error about file system link

And when tired to mkdir /storage/sdcard0/DCIM got readonly file system error.

So i've wanted to switch between them via the lvm mount in fstab (I didn't really know how to do so)

On the using adb shell (on the rom, not recovery) i've edited the /fstab.aries

and commnted the lines that starts with "devices/platform/s3c-sdhci"

My final fstab.aries:

http://pastebin.com/tEH042Jn

*Punchline*

Then i did "reboot recovery"

And on the recovery the internal sd card was back!!

i've managed to mount it and access the usb storage partition & data partition!

~ # ls /dev/block
dm-0 loop6 mmcblk1p1 mtdblock6 ram14 ram8
dm-1 loop7 mmcblk1p2 platform ram15 ram9
loop0 mmcblk0 mtdblock0 ram0 ram2 vold
loop1 mmcblk0boot0 mtdblock1 ram1 ram3 zram0
loop2 mmcblk0boot1 mtdblock2 ram10 ram4
loop3 mmcblk0p1 mtdblock3 ram11 ram5
loop4 mmcblk0p2 mtdblock4 ram12 ram6
loop5 mmcblk1 mtdblock5 ram13 ram7

And the microsd was pushed to be mmcblk1 as it should be.

The problem is that if you restart the device back to the ROM, the fstab.aries being overwritten and the the SD is gone again.

But if you edit the fstab.aries again and reboot directly to recovery you will get it again.

---

I don't know yet why that happening, maybe the voldmanaged/LVM mount configurations crashing the internal sd device on startup

But its looks like something that can be fixed!

I'll keep trying to fix that myself, but i'm sure there are gurus here that can do it!

Updates:

I'm copying the data from the internal sd to the micro sd and its have some bad blocks (not unexpected)

<3>[ 4321.898448] mmcblk0: error -110 transferring data, sector 4075478, nr 32, cmd response 0x900, card status 0x0
<3>[ 4321.899766] end_request: I/O error, dev mmcblk0, sector 4075478
<3>[ 4324.516733] mmcblk0: r/w command failed, status = 0x80900
<3>[ 4324.517935] end_request: I/O error, dev mmcblk0, sector 4075479
<3>[ 4324.518642] end_request: I/O error, dev mmcblk0, sector 4075486
<3>[ 4324.519796] end_request: I/O error, dev mmcblk0, sector 4075494
<3>[ 4324.520497] end_request: I/O error, dev mmcblk0, sector 4075502
<3>[ 4327.138573] mmcblk0: error -110 transferring data, sector 4075478, nr 8, cmd response 0x900, card status 0x80b00
<4>[ 4327.139838] mmcblk0: retrying using single block read
<3>[ 4329.756913] mmcblk0: error -110 transferring data, sector 4075478, nr 8, cmd response 0x900, card status 0x0
...

After the backup ill try to completely wipe the device & recreate the partitions