[Nexus S Q&A, Help & Troubleshooting] PattPatel:
Hi,

My Nexus S goes on bootloop because he can't write on /data, that results to be mounted as read-only.

This problem remains for each rom I tried to flash (I tried MIUI, AOKP, Cm9, Cm10, JB OTA from CWM)

On recovery the partition is writable and works fine

Hope you can help me, thanks.

"mount" output from Recovery with everything mounted:

~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
/dev/block/platform/s3c-sdhci.0/by-name/userdata on /data type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/platform/s3c-sdhci.0/by-name/system on /system type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/platform/s3c-sdhci.0/by-name/media on /sdcard type vfat (rw,nodev,noatime,nodiratime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,ioch****t=iso8859-1,shortname=mixed,errors=remount-ro)

"mount" output from Rom:

rootfs / rootfs ro,nodev,noatime,nodiratime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,nodev,noatime,nodiratime 0 0
sysfs /sys sysfs rw,nodev,noatime,nodiratime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0
/dev/block/mtdblock6 /efs yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 ro,nodev,noatime,nodiratime,barrier=0,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 ro,nosuid,nodev,noatime,nodiratime,barrier=0,nomblk_io_submit,data=ordered,noauto_da_alloc 0 0

LOGCAT:

--------- beginning of /dev/log/main
I/DEBUG ( 77): debuggerd: May 14 2012 19:13:44
E/installd( 84): Could not create directories; exiting.
E/keystore( 85): chdir: /data/misc/keystore: No such file or directory
--------- beginning of /dev/log/system
I/Vold ( 73): Vold 2.1 (the revenge) firing up
D/Vold ( 73): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
I/Netd ( 76): Netd 1.0 starting
D/Vold ( 73): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume( 73): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 1, PARTN 1
D/DirectVolume( 73): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 2, PARTN 2
D/DirectVolume( 73): DirectVolume::handlePartitionAdded -> MAJOR 179, MINOR 3, PARTN 3
D/Vold ( 73): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
W/Vold ( 73): Duplicate state (1)
W/Vold ( 73): Duplicate state (1)
W/Vold ( 73): Duplicate state (1)
W/Vold ( 73): Duplicate state (1)
I/ ( 81): ServiceManager: 0x1307910
D/AndroidRuntime( 80):
D/AndroidRuntime( 80): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 80): CheckJNI is OFF
I/SurfaceFlinger( 79): SurfaceFlinger is starting
I/SurfaceFlinger( 79): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/core.jar (/data/dalvik-cache/system@framework@core.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/core.jar'
D/libEGL ( 79): loaded /system/lib/egl/libGLES_android.so
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/core-junit.jar (/data/dalvik-cache/system@framework@core-junit.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/core-junit.jar'
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/bouncycastle.jar (/data/dalvik-cache/system@framework@bouncycastle.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/bouncycastle.jar'
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/ext.jar (/data/dalvik-cache/system@framework@ext.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/ext.jar'
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/framework.jar (/data/dalvik-cache/system@framework@framework.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/framework.jar'
D/libEGL ( 79): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/android.policy.jar (/data/dalvik-cache/system@framework@android.policy.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/android.policy.jar'
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/services.jar (/data/dalvik-cache/system@framework@services.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/services.jar'
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/apache-xml.jar (/data/dalvik-cache/system@framework@apache-xml.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/apache-xml.jar'
E/dalvikvm( 80): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 80): Unable to open or create cache for /system/framework/filterfw.jar (/data/dalvik-cache/system@framework@filterfw.jar@classes.dex)
D/dalvikvm( 80): Unable to process classpath element '/system/framework/filterfw.jar'
E/dalvikvm( 80): No valid entries found in bootclasspath '/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar'
E/dalvikvm( 80): VM aborting
F/libc ( 80): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
I/ ( 82): ServiceManager: 0x2eb958
D/libEGL ( 79): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL ( 79): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
I/AudioFlinger( 82): Loaded primary audio interface from LEGACY Audio HW HAL (audio)
I/AudioFlinger( 82): Using 'LEGACY Audio HW HAL' (audio.primary) as the primary audio interface
I/AudioFlinger( 82): Loaded a2dp audio interface from A2DP Audio HW HAL (audio)
D/AudioHardwareInterface( 82): setMode(NORMAL)
I/CameraService( 82): CameraService started (pid=82)
I/AudioFlinger( 82): AudioFlinger's thread 0x2ec958 ready to run
W/AudioFlinger( 82): Thread AudioOut_1 cannot connect to the power manager service
D/AudioHardware( 82): AudioStreamOutALSA::setParameters() routing=2
D/AudioHardware( 82): ### setVoiceVolume_l
I/AudioPolicyService( 82): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
I/SurfaceFlinger( 79): EGL informations:
I/SurfaceFlinger( 79): # of configs : 30
I/SurfaceFlinger( 79): vendor : Android
I/SurfaceFlinger( 79): version : 1.4 Android META-EGL
I/SurfaceFlinger( 79): extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer EGL_ANDROID_image_native_buffer
I/SurfaceFlinger( 79): Client API: OpenGL ES
I/SurfaceFlinger( 79): EGLSurface: 8-8-8-8, config=0x1
I/SurfaceFlinger( 79): OpenGL informations:
I/SurfaceFlinger( 79): vendor : Imagination Technologies
I/SurfaceFlinger( 79): renderer : PowerVR SGX 540
I/SurfaceFlinger( 79): version : OpenGL ES-CM 1.1
I/SurfaceFlinger( 79): extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_sprite GL_OES_point_size_array GL_OES_matrix_palette GL_OES_draw_texture GL_OES_query_matrix GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_texture_cube_map GL_OES_blend_subtract GL_OES_blend_func_separate GL_OES_blend_equation_separate GL_OES_stencil_wrap GL_OES_extended_matrix_palette GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_stencil8 GL_OES_compressed_ETC1_RGB8_texture GL_OES_mapbuffer GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_multi_draw_arrays GL_OES_required_internalformat GL_IMG_read_format GL_IMG_texture_compression_pvrtc GL_IMG_texture_format_BGRA8888 GL_EXT_texture_format_BGRA8888 GL_OES_egl_sync GL_IMG_vertex_array_object
I/SurfaceFlinger( 79): GL_MAX_TEXTURE_SIZE = 2048
I/SurfaceFlinger( 79): GL_MAX_VIEWPORT_DIMS = 2048 x 2048
I/SurfaceFlinger( 79): flags = 00010000
I/hwcomposer( 79): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**)::win-0 add[0] 4da5a000
I/hwcomposer( 79): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**)::win-0 add[1] 4dbd1000
I/hwcomposer( 79): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**)::win-0 add[2] 4dd48000
D/hwcomposer( 79): int hwc_device_open(const hw_module_t*, const char*, hw_device_t**):: success
D/libEGL ( 164): loaded /system/lib/egl/libGLES_android.so
D/libEGL ( 164): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL ( 164): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL ( 164): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
I/ServiceManager( 72): service 'media.audio_flinger' died
I/ServiceManager( 72): service 'media.player' died
I/ServiceManager( 72): service 'media.camera' died
I/ServiceManager( 72): service 'media.audio_policy' died
I/Netd ( 186): Netd 1.0 starting
I/ServiceManager( 164): Waiting for service media.audio_flinger...
I/ ( 185): ServiceManager: 0x1d958
I/AudioFlinger( 185): Loaded primary audio interface from LEGACY Audio HW HAL (audio)
I/AudioFlinger( 185): Using 'LEGACY Audio HW HAL' (audio.primary) as the primary audio interface
I/AudioFlinger( 185): Loaded a2dp audio interface from A2DP Audio HW HAL (audio)
D/AudioHardwareInterface( 185): setMode(NORMAL)
I/CameraService( 185): CameraService started (pid=185)
I/AudioFlinger( 185): AudioFlinger's thread 0x1e958 ready to run
W/AudioFlinger( 185): Thread AudioOut_1 cannot connect to the power manager service
D/AudioHardware( 185): AudioStreamOutALSA::setParameters() routing=2
D/AudioHardware( 185): ### setVoiceVolume_l
I/AudioPolicyService( 185): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
W/AudioFlinger( 185): Thread AudioOut_1 cannot connect to the power manager service
I/AwesomePlayer( 185): setDataSource_l('/system/media/boot_audio.mp3')
E/MediaPlayer( 164): error (1, -2147483648)
E/MediaPlayer( 164): start called in state 0
E/installd( 703): Could not create directories; exiting.
E/keystore( 704): chdir: /data/misc/keystore: No such file or directory
D/AndroidRuntime( 702):
D/AndroidRuntime( 702): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 702): CheckJNI is OFF
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/core.jar (/data/dalvik-cache/system@framework@core.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/core.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/core-junit.jar (/data/dalvik-cache/system@framework@core-junit.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/core-junit.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/bouncycastle.jar (/data/dalvik-cache/system@framework@bouncycastle.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/bouncycastle.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/ext.jar (/data/dalvik-cache/system@framework@ext.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/ext.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/framework.jar (/data/dalvik-cache/system@framework@framework.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/framework.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/android.policy.jar (/data/dalvik-cache/system@framework@android.policy.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/android.policy.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/services.jar (/data/dalvik-cache/system@framework@services.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/services.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/apache-xml.jar (/data/dalvik-cache/system@framework@apache-xml.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/apache-xml.jar'
E/dalvikvm( 702): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 702): Unable to open or create cache for /system/framework/filterfw.jar (/data/dalvik-cache/system@framework@filterfw.jar@classes.dex)
D/dalvikvm( 702): Unable to process classpath element '/system/framework/filterfw.jar'
E/dalvikvm( 702): No valid entries found in bootclasspath '/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar'
E/dalvikvm( 702): VM aborting

EDIT:

I've tried to restore my phone to stock through fastboot.

Result: Phone not booting and from CWM I am getting "Unable to mount system (invalid argument)"

:((((