title: insmod helloworld in init.rc before filesystems have mounted on Android
body: <p>I am trying to modify the init.rc file on Nexus 7 device which is rooted.
  I want to insmod a simple hello world module <em>before</em> my /userdata/ partition is mounted.
  Things I have tried:</p>
  
  <ol>
  <li><p>Extracted the boot.img from the device, extracted the ramdisk, made changes to the init.rc (which do not work), recreated the boot.img (using mkbootimg tool) and then flashed it on the device again</p></li>
  <li><p>I have placed my hello.ko compiled for the kernel at 2 places: one is the current directory in which init.rc is placed, so that I can do something like insmod hello.ko and it will find it. Secondly, I created /lib/modules/ directory and placed it inside that</p></li>
  <li><p>In my init.rc I have placed the insmod /lib/modules/hello.ko right after on_boot.
  I have also changed the init.flo.rc and placed the insmod before and after ./mount_all which mounts the file system.
  However, I do not see my module loading at all.
  The permissions set were 0644 ( I tried with 0777 too)</p></li>
  <li><p>I created init.d inside /etc/folder and placed a loadmodule.sh which does an insmod /lib/modules/hello.ko and that module loads but once the boot process has completed.</p></li>
  </ol>
  
  <p>I ideally want to do it right before mounting the /userdata/ partition.</p>
  
  <p>Can someone help me with this?</p>
  
  <p>My device is a Nexus 7, with flo_kernel and rooted, busybox installed, etc.</p>