bug: sd card not unmounting

dmatthews.org mail at dmatthews.org
Thu Mar 10 14:36:27 CET 2011


Here's a way to work around this problem which from discussion effects only a nand install and  must be (I think) a kernel bug.  Save this as clean_shutdown.sh and follow the commented instructions:-
_________________________________________________________________________ 
#!/bin/bash

#put this in /opt/qtmoko/bin/, make executable then:-
#ln -s /opt/qtmoko/bin/clean_shutdown.sh /opt/qtmoko/bin/halt
#ln -s /opt/qtmoko/bin/clean_shutdown.sh /opt/qtmoko/bin/reboot
#ln -s /opt/qtmoko/bin/clean_shutdown.sh /opt/qtmoko/bin/shutdown

COMMAND=`basename $0`
if [ "$COMMAND" == "shutdown" ];    then
   ARG0=$1
   ARG1=$2
fi

grep /media/card /proc/mounts > /dev/null
if [ $? -eq 0 ]	   ;then
   umount -f /media/card
fi

/sbin/$COMMAND $ARG0 $ARG1
_________________________________________________________________________

I've tested this by halt/reboot from the neo's terminal and using the gui. It will not work (unadapted) if you are logged in via ssh as /opt/qtmoko/bin is then not in your PATH; from the neo's gui it is first in the PATH, so that ensures the halt/reboot commands get filtered by this script before passing to the real commands in /sbin.

Obviously, as is, this is qtmoko only, but there is probably a possible similar strategy on SHR

>To summarize my experience:-
>qtmoko v26 - this problem does not happen
>SHR testing - I first see this issue
>back to qtmoko v26 - problem goes away
>qtmoko v33 -the same problem comes back


-- 
David Matthews
mail at dmatthews.org



More information about the community mailing list