[Android Q&A, Help & Troubleshooting] markus-s2:
EDIT: The problem has vanished for me when installing firmware "KE7" rather than "KE2". Lesson learnt: even if a stock (!) firmware version is recommended as a stable fallback in recovery tutorials, it might still be that it causes fundamental problems that do not occur elsewhere. Going back to an old, well-tested built of firmware is not better than any other attempt at fixing things. Problems on Android-based systems are not fixed by analysing/understanding the issue but by wiping/reflashing/reformatting until a stable solution is found.

I am running Android 2.3.3 using Samsung stock firmware "KE2" and a CFRoot kernel on a Galaxy SII (I9100). I have wiped and reflashed the device multiple times.

Problem: The internal SD card is not mounted, and not available in any application (cannot install apps, cannot see free memory on SD card in settings).

Diagnosis:

Using adb I see that the sdcard is mounted under /mnt/secure. Relevant output of "mount":

/dev/block/vold/179:11 on /mnt/secure/staging type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,discard)

The SD card works and can be read and written (as root accessing /mnt/secure/). It can be mounted manually under /mnt/sdcard.

I couldn't spot relevant data in dmesg, the only mentioning of the device is in the lines:

<3>[ 1.691465] init: [disk_config] :::: /dev/block/mmcblk0p11 (vfat):::::
<3>[ 1.692752] init: [disk_config] vfat_identify -> ok

The output of "logcat Vold:I *:S" is:

--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
I/Vold ( 2566): Vold 2.1.1 (the revenge) firing up
I/Vold ( 2566): Volume::setState -> Volume sdcard /mnt/sdcard state changed from -1 (Initializing) to 0 (No-Media)
I/Vold ( 2566): Volume::setState -> Volume sdcard1 /mnt/sdcard/external_sd state changed from -1 (Initializing) to 0 (No-Media)
I/Vold ( 2566): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 0 (No-Media) to 2 (Pending)
I/Vold ( 2566): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 2 (Pending) to 1 (Idle-Unmounted)
W/Vold ( 2566): Duplicate state (1)
I/Vold ( 2566): /dev/block/vold/179:11 being considered for volume sdcard
I/Vold ( 2566): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 1 (Idle-Unmounted) to 3 (Checking)
I/Vold ( 2566): discard -> /system/bin/discard_util -s 1000 /dev/block/vold/179:11
I/Vold ( 2566): discard OK
I/Vold ( 2566): NetlinkHandler::onEvent ->[switch] from uevent
I/Vold ( 2566): Filesystem check completed OK
I/Vold ( 3636): Vold 2.1.1 (the revenge) firing up
I/Vold ( 3636): Volume::setState -> Volume sdcard /mnt/sdcard state changed from -1 (Initializing) to 0 (No-Media)
I/Vold ( 3636): Volume::setState -> Volume sdcard1 /mnt/sdcard/external_sd state changed from -1 (Initializing) to 0 (No-Media)
I/Vold ( 3636): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 0 (No-Media) to 2 (Pending)
I/Vold ( 3636): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 2 (Pending) to 1 (Idle-Unmounted)
W/Vold ( 3636): Duplicate state (1)
I/Vold ( 3871): Vold 2.1.1 (the revenge) firing up
I/Vold ( 3871): Volume::setState -> Volume sdcard /mnt/sdcard state changed from -1 (Initializing) to 0 (No-Media)
I/Vold ( 3871): Volume::setState -> Volume sdcard1 /mnt/sdcard/external_sd state changed from -1 (Initializing) to 0 (No-Media)
I/Vold ( 3871): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 0 (No-Media) to 2 (Pending)
I/Vold ( 3636): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 1 (Idle-Unmounted) to 2 (Pending)
I/Vold ( 3871): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 2 (Pending) to 1 (Idle-Unmounted)
I/Vold ( 3636): Volume::setState -> Volume sdcard /mnt/sdcard state changed from 2 (Pending) to 1 (Idle-Unmounted)
W/Vold ( 3871): Duplicate state (1)
W/Vold ( 3636): Duplicate state (1)
E/Vold ( 3871): Unable to start CommandListener (No such file or directory)

Related threads:

There are but a few threads with slightly similar topics, but none of them provided answers: [Q] Phone doesn't recognize USB internal storage as SD Card, [Q] i9000 - internal sdcard gone - problems with boot / external sdcard mounting, [Solved] sdcard unmounted or not present,

Any pointers how I can further diagnose this are appreciated (helping me to help myself). I am not aware of any more logs that could be relevant. Thanks!