Re: bug: sd card not unmounting
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 m...@dmatthews.org ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
2011-03-09@20:26 Neil Jerram > Interesting. Is there a way to check for the "filesystem was not > unmounted cleanly" status without removing the uSD and taking it to > another computer? > >Neil yes, you can play with the usb file storage gadget module. ==> /opt/qtmoko/bin/usb-mass-storage-on.sh it should be quite the same as accessing the uSD as inserted into an usb reader. (btw there is a known bug with g_file_storage module in v33 and you could get a kernel panic) -- ALFA21 IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
On 9 March 2011 20:07, dmatthews.org wrote: > I think I should add to my own post to mention that I briefly tried the > January SHR testing a few weeks ago. That had the same problem ie (even) a > clean shutdown -> fsck reporting improper unmounting of the uSD. Interesting. Is there a way to check for the "filesystem was not unmounted cleanly" status without removing the uSD and taking it to another computer? Neil ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
I think I should add to my own post to mention that I briefly tried the January SHR testing a few weeks ago. That had the same problem ie (even) a clean shutdown -> fsck reporting improper unmounting of the uSD. 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 I assume both distros are using the same kernel, so my guess is there is a problem there. > root@moke:~# /etc/init.d/qpe stop > -bash: /etc/init.d/qpe: No such file or directory > root@moke:~# /etc/init.d/qtmoko stop > root@moke:~# killall atd > atd: no process found > root@moke:~# hwclock -r > Wed Mar 9 19:29:45 2011 -0.155039 seconds > root@moke:~# date > Wed Mar 9 19:29:55 UTC 2011 > root@moke:~# -- David Matthews m...@dmatthews.org ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
> mmh.. I can't say anything on this topic... I've never tried nand since > om2008 :P > maybe it's a bug specific for nand users with a uSD partition? > yes maybe - I always use the nand though and this did not happen with v26 > please try this: > log-in via usb-ssh on your moko > /etc/init.d/qpe stop (or through the gui "shutdown qt extended") > killall atd > hwclock -r (check if the result is ok) > date (verify it's the same value) > root@moke:~# /etc/init.d/qpe stop -bash: /etc/init.d/qpe: No such file or directory root@moke:~# /etc/init.d/qtmoko stop root@moke:~# killall atd atd: no process found root@moke:~# hwclock -r Wed Mar 9 19:29:45 2011 -0.155039 seconds root@moke:~# date Wed Mar 9 19:29:55 UTC 2011 root@moke:~# Regards -- David Matthews m...@dmatthews.org ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
> > no, not here. > > I've v33 and works for me! (full installation on uSD with 3 > > partitions: storage/rootfs/swap) > > My roofs is on nand; the rootfs unmounts cleanly, but not the uSD based > partition that I automount on /media/card mmh.. I can't say anything on this topic... I've never tried nand since om2008 :P maybe it's a bug specific for nand users with a uSD partition? > > rather, are you 100% sure about your hardware clock? otherwise system > > vs rtc clock skews may trigger a check of the filesystem! > > > > I don't think this can explain it, but to check I did this:- > > 1. I shutdown the neo and fsck the uSD in a laptop > 2. this reports a filesystem that was not unmounted properly - same as I get > on the Neo > 3 I put the card back in the neo and start up and fsck - I have a clean > filesystem on the uSD for the first time after a shutdown/reboot! > > I think this is clear evidence of an unclean shutdown and it only happens > since I upgrade to v33 - I don't think there is any hardware issue here. > I think this does not exclude my hypothesis because if time delta between mount and the previous umount is greater than X days, extfs forces a filesystem check. please try this: log-in via usb-ssh on your moko /etc/init.d/qpe stop (or through the gui "shutdown qt extended") killall atd hwclock -r (check if the result is ok) date (verify it's the same value) regards -- ALFA21 IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
> no, not here. > I've v33 and works for me! (full installation on uSD with 3 > partitions: storage/rootfs/swap) My roofs is on nand; the rootfs unmounts cleanly, but not the uSD based partition that I automount on /media/card > rather, are you 100% sure about your hardware clock? otherwise system > vs rtc clock skews may trigger a check of the filesystem! > I don't think this can explain it, but to check I did this:- 1. I shutdown the neo and fsck the uSD in a laptop 2. this reports a filesystem that was not unmounted properly - same as I get on the Neo 3 I put the card back in the neo and start up and fsck - I have a clean filesystem on the uSD for the first time after a shutdown/reboot! I think this is clear evidence of an unclean shutdown and it only happens since I upgrade to v33 - I don't think there is any hardware issue here. -- David Matthews m...@dmatthews.org ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: bug: sd card not unmounting
no, not here. I've v33 and works for me! (full installation on uSD with 3 partitions: storage/rootfs/swap) rather, are you 100% sure about your hardware clock? otherwise system vs rtc clock skews may trigger a check of the filesystem! regards. On Wed, Mar 9, 2011 at 6:36 PM, dmatthews.org wrote: > I do think this is a bug new in v33 > > as described below any shutdown/reboot, whether from commandline or gui, > means that a fsck of the card reports it was not cleanly unmounted. > > I ran > > lsof | grep /media/card > > to show no open files - but this is too regular (100% reproducible) and never > happened after a clean shutdown on v26. In any case the system should force a > close of any unopen files and an umount before it shuts down. > >> > I automount a sd card partition (ext2); the system does not seem to >> > unmount it cleanly. It makes no difference whether I halt or reboot >> > either from the gui or commandline; when the neo comes back up if I >> > fsck the card it reports that it was not unmounted cleanly. >> > >> > > > > > -- > David Matthews > m...@dmatthews.org > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
bug: sd card not unmounting
I do think this is a bug new in v33 as described below any shutdown/reboot, whether from commandline or gui, means that a fsck of the card reports it was not cleanly unmounted. I ran lsof | grep /media/card to show no open files - but this is too regular (100% reproducible) and never happened after a clean shutdown on v26. In any case the system should force a close of any unopen files and an umount before it shuts down. > > I automount a sd card partition (ext2); the system does not seem to > > unmount it cleanly. It makes no difference whether I halt or reboot > > either from the gui or commandline; when the neo comes back up if I > > fsck the card it reports that it was not unmounted cleanly. > > > -- David Matthews m...@dmatthews.org ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community