echo "Saving ramdisk to flash, please do not remove power until finished."
dd if=/dev/zero of=/zerofiller > /dev/null 2>&1
rm -f /zerofiller
mount -o remount,ro rootfs /

insmod /tssdcard.ko >/dev/null 2>&1
insmod /ts7800_nand.ko >/dev/null 2>&1

grep -e '/dev/tssdcardb4 /mnt/root' /proc/mounts > /dev/null 2>&1
if [ "$?" -eq 0 -a -e /dev/tssdcardb3 ]; then
  dd if=/dev/ram0 of=/dev/tssdcardb3 >/dev/null 2>&1
fi

#mtdcp /dev/ram0 2 0 >/dev/null 2>&1
dd if=/dev/ram0 of=/dev/mtdblock2 >/dev/null 2>&1

mount -o remount,rw rootfs /

