[Android Q&A, Help & Troubleshooting] sooorajjj:
thanks that works :)

yesterday i made a ramdisk of my own for cm10.1 but it dont boot

i get this in logcat

here is my init.e0.rc script

import init.e0.usb.rc

on early-init

mount debugfs debugfs /sys/kernel/debug
chmod 666 /proc/cmdline

on init
export TMPDIR /data/local/tmp
mkdir /storage 0775 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
mkdir /storage/usbdisk0 0000 system system
symlink /mnt/sdcard /sdcard
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1

# Backward compatibility
symlink /system/bin /bin
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard1 /mnt/external_sd
symlink /storage/sdcard1 /external_sd
symlink /storage/usbdisk0 /mnt/usbdisk
symlink /storage/usbdisk0 /usbdisk

exec /sbin/setup_fs \
/dev/block/platform/msm_sdcc.3/by-num/p16 \
/dev/block/platform/msm_sdcc.3/by-num/p18 \
/dev/block/platform/msm_sdcc.3/by-num/p23 \
no_reboot

#LGE_CHANGE_S [jyothishre.nk@lge.com] 20120926:Use setup_fs to create Filesystem
on fs
# mount mmc partitions
mkdir /system
mkdir /persist 0771 system system
mkdir /persist-lg 0771 system system
mkdir /mpt 0771 system system
mount_all /fstab.e0

wait /dev/block/mmcblk0p15
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p15 /persist
exec /system/bin/e2fsck -p /dev/block/mmcblk0p15
mount ext4 /dev/block/mmcblk0p15 /persist nosuid nodev data=ordered,barrier=1

wait /dev/block/platform/msm_sdcc.3/by-num/p18
exec /system/bin/e2fsck -fy /dev/block/platform/msm_sdcc.3/by-num/p18
mount ext4 /dev/block/platform/msm_sdcc.3/by-num/p18 /persist-lg nosuid nodev barrier=1

wait /dev/block/platform/msm_sdcc.3/by-num/p23
exec /system/bin/e2fsck -fy /dev/block/platform/msm_sdcc.3/by-num/p23
mount ext4 /dev/block/platform/msm_sdcc.3/by-num/p23 /mpt nosuid nodev barrier=1

# LGE_CHANGE_E [jyothishre.nk@lge.com] 20120215
on post-fs
## murali.raramiah@lge.com [2011-07-26] - Referred from Victor model
start rmt_storage
# msm specific files that need to be created on /data

on post-fs-data
mkdir /data/radio 0770 radio radio
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media

#+s LGBT_COMMON_FUNCTION_BRINGUP - jeonghoon.lim@lge.com 2011-12-10
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth #moved from init.rc - jeonghoon.lim@lge.com
#+e LGBT_COMMON_FUNCTION_BRINGUP

mkdir /data/misc/wifi 0775 wifi radio
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp

# Create the directory used by CnE subsystem
mkdir /data/connectivity 0771 system system
chown system system /data/connectivity

# Create directory used by audio subsystem
mkdir /data/misc/audio 0770 audio audio

## Sensors daemon stuff
mkdir /data/misc/sensor 2755 system compass

# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown system system /persist
chmod 0771 /persist

chown system system /mpt
chmod 0771 /mpt

chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
# Chown polling nodes as needed from UI running on system server
chown system system /sys/devices/platform/msm_sdcc.1/polling
chown system system /sys/devices/platform/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_sdcc.3/polling
chown system system /sys/devices/platform/msm_sdcc.4/polling

# // U0 public AAT jini1711@lge.com 20120303 [START] KCAL problem fix
chown system system /sys/devices/platform/msm_fb.525057/mdp_kcal
# // U0 public AAT jini1711@lge.com 20120303 [END]
chmod 0755 /sys/devices/platform/msm_fb.525057/mdp_kcal
#Write Permissions to Owner & Group. Make system as Owner & Group.
chmod 0664 /sys/devices/platform/msm-battery/chg_current_change
chown system system /sys/devices/platform/msm-battery/chg_current_change
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
mkdir /data/system 0775 system system

#Create directories for wiper services
mkdir /data/wpstiles/ 0755 shell
mkdir /data/wiper 0755 location qcom_oncrpc

#Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 system system

#Create directories for QuIPS
mkdir /data/misc/quipc 0770 gps system

#Create directories for Location services
mkdir /data/misc/location 0770 gps gps
mkdir /data/misc/location/mq 0770 gps gps
mkdir /data/misc/location/xtwifi 0770 gps gps

#Create directory from IMS services
mkdir /data/shared 0755

#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf

# Create /data/time folder for time-services
mkdir /data/time/ 0700 system system
mkdir /data/fpri 0777 system system
copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0640 /data/dontpanic/last_kmsg

mkdir /data/audio/ 0770 media audio

# Create directories for wiper services
mkdir /data/wpstiles/ 0755 shell
mkdir /data/wiper 0755 location qcom_oncrpc

# Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 gpsone_d qcom_oncrpc

# Create directory from IMS services
mkdir /data/shared 0755

# Log Service [START]
mkdir /data/logger 0771 system system
chown system system /data/logger
chmod 0771 /data/logger
# Log Service [END]

# Dummy file, to keep the API happy. The default firmware does both modes
write /data/misc/wifi/fwpath ""
chmod 0666 /data/misc/wifi/fwpath

mkdir /data/logger 0771 system system
chown system system /data/logger
chmod 0771 /data/logger

copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0640 /data/dontpanic/last_kmsg

# Sooraj: vold fix for data partiton (to allow encryption)
setprop vold.post_fs_data_done 1

on boot
# bluetooth
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state

# turn off bluetooth at startup
write /sys/class/rfkill/rfkill0/state 0

#port-bridge
chmod 0660 /dev/smd0
chown system system /dev/smd0

# Remove write permissions to video related nodes
chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d

# Change owner and group for media server and surface flinger
chown media system /sys/devices/virtual/graphics/fb1/format_3d

#For netmgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/usb_composite/rmnet_smd_sdio/transport

#Create QMUX deamon socket area
mkdir /dev/socket/qmux_radio 0770 radio radio
chmod 2770 /dev/socket/qmux_radio
mkdir /dev/socket/qmux_audio 0770 media audio
chmod 2770 /dev/socket/qmux_audio
mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
chmod 2770 /dev/socket/qmux_bluetooth
mkdir /dev/socket/qmux_gps 0770 gps gps
chmod 2770 /dev/socket/qmux_gps

setprop wifi.interface wlan0

# Allow QMUX daemon to assign port open wait time
chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait

setprop ro.telephony.call_ring.multiple false

#To allow interfaces to get v6 address when tethering is enabled
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2

# To prevent out of order acknowledgements from making
# connection tracking to treat them as not belonging to
# the connection they belong to.
# Otherwise, a weird issue happens in which some long
# connections on high-throughput links get dropped when
# an ack packet comes out of order
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
write /proc/sys/vm/vfs_cache_pressure 100

chown system system /sys/class/input/input1/range
chown system system /sys/class/input/input1/bandwidth
chown system system /sys/class/input/input1/mode
chown system system /sys/class/input/input1/value
chown system system /sys/class/input/input1/delay
chown system system /sys/class/input/input1/update
chown system system /sys/class/input/input1/selftest
chown system system /sys/class/input/input1/offset_filt_x
chown system system /sys/class/input/input1/offset_filt_y
chown system system /sys/class/input/input1/offset_filt_z
chown system system /sys/class/input/input1/fast_calibration_x
chown system system /sys/class/input/input1/fast_calibration_y
chown system system /sys/class/input/input1/fast_calibration_z
chown system system /sys/class/input/input1/eeprom_writing
chown system system /sys/class/input/input1/softreset
chown system system /sys/bus/i2c/drivers/proximity_gp2ap/3-0044/enable
chown system system /sys/bus/i2c/drivers/proximity_gp2ap/5-0044/enable
chmod 0666 /sys/bus/i2c/drivers/proximity_gp2ap/3-0044/enable
chmod 0666 /sys/bus/i2c/drivers/proximity_gp2ap/5-0044/enable

#For bridgemgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport

chmod 0664 /sys/class/leds/lcd-backlight/alc
chown system system /sys/class/leds/lcd-backlight/alc
chmod 0664 /sys/class/leds/lcd-backlight/brightness
# rmt-storage
chown system system /sys/devices/platform/rs300000a7.65536/send_sync
chmod 0764 /sys/devices/platform/rs300000a7.65536/send_sync

#write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
#write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
#write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
#write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 25000

#chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chown system /sys/devices/platform/rs300000a7.65536/force_sync
chown system /sys/devices/platform/rs300000a7.65536/sync_sts
chown system /sys/devices/platform/rs300100a7.65536/force_sync
chown system /sys/devices/platform/rs300100a7.65536/sync_sts
#chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy

# ondemand governor boostpulse
chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse

# Fix FFC
write /proc/sys/kernel/randomize_va_space 1

service ril-daemon1 /system/bin/rild -c 1
class main
socket rild1 stream 660 root radio
socket rild-debug1 stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw qcom_oncrpc diag

service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
class core
user root
disabled

on property:bluetooth.hciattach=true
start hciattach

on property:bluetooth.hciattach=false
setprop bluetooth.status off

## LGE_CHANGE_S, U0-SENSOR [seven.kim@lge.com] 2011-09-96
# compass/accelerometer daemon for e0
service sensord /system/bin/sensord
user system
group compass misc input
class core
oneshot
## LGE_CHANGE_E

# Triggered by the KEY_VOLUME_DOWN+KEY_MENU keycodes
service bugreport /system/bin/logwrapper /system/bin/dumpstate -d -v -o /storage/sdcard0/bugreports/bugreport
keycodes 114 139
class main
disabled
oneshot

service setapversion /system/bin/lgapversion
class main
disabled
oneshot

on property:gsm.version.baseband=""
start setapversion

## WLAN
service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
# user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot

service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
# user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot

on property:init.svc.wpa_supplicant=stopped
stop dhcpcd

on property:bluetooth.isEnabled=true
start btwlancoex
write /sys/class/bluetooth/hci0/idle_timeout 7000

service hwprops /system/bin/hwprops
class main
oneshot

on property:wlan.driver.status=loading
write /sys/devices/platform/msm_sdcc.2/polling 1
on property:wlan.driver.status=failed
write /sys/devices/platform/msm_sdcc.2/polling 0
on property:wlan.driver.status=unloaded
write /sys/devices/platform/msm_sdcc.2/polling 0
on property:wlan.driver.status=ok
write /sys/devices/platform/msm_sdcc.2/polling 0

service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
disabled
oneshot

service dhcpcd_wlan0 /system/bin/dhcpcd -aBKAL
class late_start
disabled
oneshot

service iprenew_bt-pan /system/bin/dhcpcd -n
disabled
oneshot

service iprenew_wlan0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot

service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class late_start
user root
disabled
oneshot

service qmiproxy /system/bin/qmiproxy
class core
user radio
group radio qcom_diag

service qmuxd /system/bin/qmuxd
class core
user radio
group radio audio bluetooth gps qcom_diag

service netmgrd /system/bin/netmgrd
class core

## TEMPORARY. WE NEED AN FSTAB TO USE mount_all
on property:dev.bootcomplete=1
start setapversion
class_start late_start

service hciattach /system/bin/logwrapper /system/bin/sh /system/etc/init.qcom.bt.sh
class main
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled

service hostapd /system/bin/hostapd -dddd /data/misc/wifi/hostapd.conf
class late_start
user root
group root
oneshot
disabled

service charger /charger
class charger
user root
group root
oneshot

on property:init.svc.charger=running
exec /system/bin/chgchk

# suhui.kim@lge.com for bluez logs
#service bluetoothd /system/bin/bluetoothd -n
service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -n -d
class late_start
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc net_bt_stack
disabled

#LGE_CHANGE_S[jyothishre.nk@lge.com]20121005:Adding logger support
service logcat-main /system/bin/logcat -v time -b main -f /data/logger/main.log -n 4 -r 4096
class late_start
disabled
oneshot

on property:persist.service.main.enable=1
start logcat-main

on property:persist.service.main.enable=0
stop logcat-main

service logcat-system /system/bin/logcat -v time -b system -f /data/logger/system.log -n 4 -r 4096
class late_start
disabled
oneshot

on property:persist.service.system.enable=1
start logcat-system

on property:persist.service.system.enable=0
stop logcat-system

service logcat-radio /system/bin/logcat -v time -b radio -f /data/logger/radio.log -n 4 -r 4096
class late_start
disabled
oneshot

on property:persist.service.radio.enable=1
start logcat-radio

on property:persist.service.radio.enable=0
stop logcat-radio

service logcat-events /system/bin/logcat -v time -b events -f /data/logger/events.log -n 4 -r 4096
class late_start
disabled
oneshot

on property:persist.service.events.enable=1
start logcat-events

on property:persist.service.events.enable=0
stop logcat-events

service log-kernel /system/bin/logcat_kmsg /data/logger/kernel.log 4096 4
class late_start
disabled
oneshot

on property:persist.service.kernel.enable=1
start log-kernel

on property:persist.service.kernel.enable=0
stop log-kernel
#LGE_CHANGE_E[jyothishre.nk@lge.com]20121005:Adding logger support

# Values from the original post_boot scriptage
on property:dev.bootcomplete=1
start qcom-post-boot

but iam sure " sh " is symlinked inside /system/bin/ :(

any workaround for this issue

does the /system have to be mounted "On early-fs" (instead of "On fs")......?

this is fstab.e0 that i use

# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.3/by-num/p14 /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.3/by-num/p16 /cache ext4 nosuid,nodev,barrier=1 wait,check
/dev/block/platform/msm_sdcc.3/by-num/p21 /data ext4 nosuid,nodev,noauto_da_alloc,barrier=1 wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.3/by-num/p9 /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.3/by-num/p17 /recovery emmc defaults defaults
/devices/platform/msm_sdcc.3/mmc_host auto auto defaults voldmanaged=sdcard:auto,noemulatedsd
/devices/platform/msm_sdcc.1/mmc_host auto auto defaults voldmanaged=extra-sd:auto,noemulatedsd
/devices/platform/msm_hsusb_host.0/usb1 auto auto defaults voldmanaged=usbdisk0:auto
/dev/block/zram0 none swap defaults zramsize=67108864