This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

FAT-fs (mmcblk0p1): Volume was not properly unmounted message

Other Parts Discussed in Thread: AM3354

I'm seeing the following message every time our custom AM3354 board boots up:

[    7.188690] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Taking a look online I found a number of references to this type issue and they suggested shutting down using a script using dosfstools. I didn't see that in the original TI SDK7 EVM file system, so I was wondering what is the correct way to shut down to avoid this type of issue.

 

Any input?

  • I generally shutdown my board with "shutdown -hP now". There's also an icon in the Matrix GUI for shutting down from the touchscreen (under "System"?) though I don't generally use that one.
  • Brad, Thanks for the input. What is your "shutdown" linked to?

    My original shutdown was:

    [root /]# ls -al /sbin/shutdown
    lrwxrwxrwx    1 root     root            17 Feb 19  2015 /sbin/shutdown -> shutdown.sysvinit


    That (on our board) seems to get "stuck" when issuing the "shutdown -hP now" command.

    [root /]# shutdown -hP now
    INIT: Sending processes the TERM signal
    INIT: Sending processes the KILL signal
    Executing: /etc/rc0.d/K03mcpd
    Stopping: mcp
    stopped /usr/bin/mcp (pid 1295)
    Waiting 120 seconds for mcp to exit.
    mcp exited.
    Stopping syslog-ng:.
    Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 1287)
    .
    Stopping system message bus: Stopping internet superserver: xinetd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: save_state:1580: No soundcards found...
    Deconfiguring network interfaces... Stopping PVR
    rmmod: ERROR: Module bufferclass_ti is not currently loaded
    INIT: no more processes left in this runlevel
    
    

    Then never moves past that. If I pull the power at this point and reboot it will show the same "Volume was not properly unmounted" message at next power up.

    I've also tried "busybox poweroff -d 0 -f"

    That results in just one message:

    [  174.695713] reboot: System halted

    And the sytem doesn't move after that, and again I have to pull the power cable. On the next power up I still see the same unmounted message.

    Brad, when you issue the command does the system fully shutdown? ie does the screen go dark and the LEDs stop.. does the board fully power down? It never does for me.

    Same problem with the "reboot" command.

  • Mike Worster said:

    My original shutdown was:

    [root /]# ls -al /sbin/shutdown
    lrwxrwxrwx    1 root     root            17 Feb 19  2015 /sbin/shutdown -> shutdown.sysvinit

    That looks like the same one as I'm using:

    root@am335x-evm:~# which shutdown
    /sbin/shutdown
    root@am335x-evm:~# ls -al /sbin/shutdown
    lrwxrwxrwx    1 root     root            23 Mar 31 02:34 /sbin/shutdown -> /sbin
    /shutdown.sysvinit

    Here's what I see:

    root@am335x-evm:~# shutdown -hP now
    INIT: Sending processes the TERM signal

    Broadcast message from root@am335x-evm (ttyO0) (Sat Apr  5 01:26:12 2014):
    The system is going down for system halt NOW!
    INIT: Sending processes the KILL signal
    UIM SYSFS Node Found at /sys/./devices/kim.12/install
    Stopping uim-sysfs daemon.
    mkdir: can't create directory '/var/lib/dropbear': Read-only file system
    Stopping telnet daemon.
    Stopping system message bus: Stopping syslogd/klogd: stopped syslogd (pid 1369)
    stopped klogd (pid 1372)
    done
    Stopping thttpd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: save_state:1608: Cannot open /var/lib/alsa/asound.state for w
    riting: Read-only file system
    Deconfiguring network interfaces... ifdown: interface eth0 not configured
    done.
    Stopping PVR
    Error: Module bufferclass_ti is not currently loaded
    Stopping Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 1414)
    lighttpd.
    Stopping Matrix GUI application.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the followin GPLv3 packages:
            binutils-symlinks
            binutils
            gdbserver

    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    Sending all processes the TERM signal...
    Error VT_WAITACTIVE failed
    : Interrupted system call
    Sending all processes the KILL signal...
    /etc/rc0.d/S25save-rtc.sh: line 13: /etc/timestamp: Read-only file system
    urandom stop: failed.
    Unmounting remote filesystems...
    Deactivating swap...
    Unmounting local filesystems...
    [  165.180808] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    [  167.286354] reboot: System halted

    Mike Worster said:
    Brad, when you issue the command does the system fully shutdown? ie does the screen go dark and the LEDs stop.. does the board fully power down? It never does for me.

    This actually depends on the board.

    • EVM: Screen and LEDs stay on.  I usually flip the power switch off-on to turn back on.
    • BeagleBone Black: Everything turns off.

    Mike Worster said:
    Same problem with the "reboot" command.

    Here's what I see on a reboot:

    root@am335x-evm:~# reboot
    INIT: Sending processes the TERM signal

    Broadcast message from root@am335x-evm (ttyO0) (Sat Apr  5 01:30:15 2014):
    The system is going down for reboot NOW!
    INIT: Sending processes the KILL signal
    UIM SYSFS Node Found at /sys/./devices/kim.12/install
    Stopping uim-sysfs daemon.
    mkdir: can't create directory '/var/lib/dropbear': Read-only file system
    Stopping telnet daemon.
    Stopping system message bus: Stopping syslogd/klogd: stopped syslogd (pid 1361)
    stopped klogd (pid 1362)
    done
    Stopping thttpd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: save_state:1608: Cannot open /var/lib/alsa/asound.state for w
    riting: Read-only file system
    Deconfiguring network interfaces... ifdown: interface eth0 not configured
    done.
    Stopping PVR
    Error: Module bufferclass_ti is not currently loaded
    Stopping Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 1404)
    lighttpd.
    Stopping Matrix GUI application.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the followin GPLv3 packages:
            binutils-symlinks
            binutils
            gdbserver

    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    Sending all processes the TERM signal...
    Error VT_WAITACTIVE failed
    : Interrupted system call
    Sending all processes the KILL signal...
    /etc/rc6.d/S25save-rtc.sh: line 13: /etc/timestamp: Read-only file system
    urandom stop: failed.
    Unmounting remote filesystems...
    Deactivating swap...
    Unmounting local filesystems...
    [  295.669464] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    Rebooting... [  297.769754] reboot: Restarting system
    CCCCCCCC
    U-Boot SPL 2013.10-g78d8ebd (Mar 30 2014 - 20:46:34)
    reading args
    [snip -- normal boot sequence]

  • Ok, well one thing I see in your log vs. mine is you have a message about "Unmounting remote/local filesystems..."

    I found these are printed from /etc/init.d/umountfs and /etc/init.d/umountnfs.sh which I did not have on my system. I added them and the associated symlinks in rc0.d and rc6.d and I see the messages now, but I'm getting a different result:

    [root /]# shutdown -hP now
    INIT: Sending processes the TERM signal
    INIT: Sending processes the KILL signal
    Executing: /etc/rc0.d/K03mcpd
    Stopping: mcp
    stopped /usr/bin/mcp (pid 1264)
    Waiting 120 seconds for mcp to exit.
    mcp exited.
    Stopping syslog-ng:.
    Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 1256)
    .
    Stopping system message bus: Stopping internet superserver: xinetd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: save_state:1580: No soundcards found...
    Deconfiguring network interfaces... Stopping PVR
    rmmod: ERROR: Module bufferclass_ti is not currently loaded
    Unmounting remote filesystems...
    Deactivating swap...
    Unmounting local filesystems...
    mount: / is busy
    INIT: no more processes left in this runlevel

    Seems the mount commands fail on my system, at least partially, and I never make it to the final kernel messages about the system being halted.

  • I found the hault script and added that as well as the rc0.d link, and my shutdown looks a little better now:

    [root /]# shutdown -hP now
    INIT: Sending processes the TERM signal
    INIT: Sending processes the KILL signal
    Executing: /etc/rc0.d/K03mcpd
    Stopping: mcp
    stopped /usr/bin/mcp (pid 1259)
    Waiting 120 seconds for mcp to exit.
    mcp exited.
    Stopping syslog-ng:.
    Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 1251)
    .
    Stopping system message bus: Stopping internet superserver: xinetd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: save_state:1580: No soundcards found...
    Deconfiguring network interfaces... Stopping PVR
    rmmod: ERROR: Module bufferclass_ti is not currently loaded
    Unmounting remote filesystems...
    Deactivating swap...
    Unmounting local filesystems...
    mount: / is busy
    [   47.508777] reboot: System halted
    


    However I still see:
     
     

    [ 7.541942] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.


    on the next power up after issuing a "shutdown -hP now" command. Any idea why I can't run the unmount scripts cleanly as you can?

  • The "mount: / is busy" message is a bit suspicious. Sounds like there is still a file open somewhere.

    Also, even once you get past that issue I am not sure if those messages will instantly go away or if they will stay until you run a chkdsk. In other words, I think if you started with a clean file system and always shutdown properly then I don't believe you would ever see that message. Once it comes up I'm not sure if it goes away on a reboot or if you need to "fix" the file system first.