- OLDROOT=`cat /etc/fstab | grep " / " | cut -d" " -f1`;
- NEWROOT=`df | grep " /$" -m1 | cut -d" " -f1`;
+ ROOTPOS=`expr index "$CMDLINE" root=`
+ NEWROOT=`echo ${CMDLINE:$ROOTPOS} | cut -d"=" -f2 | cut -d" " -f1`;
+ OLDROOT=`cat /etc/fstab | grep -m1 " / " | cut -d" " -f1`;