[HD2 Android NAND Development] THANHVO31:
I just modify his script and it works perfectly im my ROM (Runny Mikhei V2.1 + marc v0.1.2) to change I/O scheduler on the fly.

credit to Cilraaz

#!/system/bin/sh

# Version: 2
# Author: Cilraaz
# Download location: http://xdaforums.com/showthread.php?p=19441500#post19441500

clear
echo "Cilraaz's Scheduler Changer"
echo "by Cilraaz of XDA-Developers Forums"
echo
echo "Current I/O Schedulers"

# Cycle blocks to check current scheduler
for i in mmcblk0 mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5
do
case "$i" in
"mmcblk0") echo -n " $i: "
;;
"mtdblock0") echo -n " $i: "
;;
"mtdblock1") echo -n " $i: "
;;
"mtdblock2") echo -n " $i: "
;;
"mtdblock3") echo -n " $i: "
;;
"mtdblock4") echo -n " $i: "
;;
"mtdblock5") echo -n " $i: "
;;
*) echo -n "$i: "
;;
esac

# Pull raw scheduler info
allSched=`cat /sys/block/$i/queue/scheduler`

# Parse only the active scheduler
currSched=`expr match "$allSched" '.*\[\(.*\)\].*'`
echo "$currSched"

# If we're looking at the system block,
# set variables for later use
if [ "$i" = "mtdblock0" ]; then
mainSched=$currSched
otherFront=`expr match "$allSched" '\(.*\)\[.*\].*'`
otherBack=`expr match "$allSched" '.*\[.*\]\(.*\)'`
otherScheds=`echo $otherFront $otherBack`
scheds=`echo $currSched $otherScheds`
fi
done

# Display alternate scheduler possibilities
#echo
#echo -n "Alternate Schedulers: "
#for x in $otherScheds; do
#	echo -n "$x "
#done
#echo
#unset x
unset i

# Create dynamic menu
echo
echo "Choose which I/O Scheduler to use:"
echo "1. $mainSched (currently used)"
i=2
for x in $otherScheds; do
echo "$i. $x"
i=`expr $i + 1`
done
unset x
echo
echo -n "Enter your choice: "
read choice

# Make dynamic menu options work
while [ $choice -lt $i ]; do
if [ $choice -eq 1 ]; then
setting=$mainSched
break
else
j=2
for x in $otherScheds; do
if [ $choice -eq $j ]; then
setting=$x
break
fi
j=`expr $j + 1`
done
fi
if [ $choice -eq $j ]; then
break
fi
done
if [ $choice -ge $i ]; then
echo
echo "Invalid option"
echo "Exiting"
exit 1
fi
unset i
unset j
unset x

# Create the /data script that does the
# work, and acts as boot script
cat > /data/99CilSchedChanger.sh <<EOF
#!/system/bin/sh
default="$setting"
allScheds="$scheds"
sched=\$default
# Check for CLI input
if [ \$# -eq 0 ]; then
sched=\$default
else
for z in \$allScheds; do
if [ \$1 == "\$z" ]; then
sched="\$1"
fi
done
unset z
fi

# Set scheduler accordingly
echo
echo "New I/O Schedulers"
for j in mmcblk0 mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5
do
echo \$sched > /sys/block/\$j/queue/scheduler
case "\$j" in
"mmcblk0") echo -n " \$j: "
;;
"mtdblock0") echo -n " \$j: "
;;
"mtdblock1") echo -n " \$j: "
;;
"mtdblock2") echo -n " \$j: "
;;
"mtdblock3") echo -n " \$j: "
;;
"mtdblock4") echo -n " \$j: "
;;
"mtdblock5") echo -n " \$j: "
;;
*) echo -n "\$j: "
;;
esac
allSched=\`cat /sys/block/\$j/queue/scheduler\`
currSched=\`expr match "\$allSched" '.*\[\(.*\)\].*'\`
echo "\$currSched"
done
unset j
echo
echo "Complete!"
EOF

# Give /data script execute permissions
chmod 777 /data/99CilSchedChanger.sh

# Run the /data script
/data/99CilSchedChanger.sh

# Print reminder to set it to run on boot
echo
echo "Be sure to have /data/99CilSchedChanger.sh"
echo "run on boot to ensure the change sticks!"
echo "This can be done with an app like"
echo "Script Manager."