I'm not quite sure.. but There's a possibility.
As for the script, you should only need to drop it in /etc/init.d/
It should say something like
unmount /data
mount /dev/mmcblk0pX /data -t ext4... (exact sintax here may differ)
If your kernel doesn't support init.d scripts, you migth try using a install-recovery.sh script, wich is the work-around for samsung stock kernels for example.