Where can I find the log files for mounting disks?

101,352

Solution 1

I'd guess /var/log/dmesg

You can find all logs that mention mounting or ext4 like this:

grep -e mount -e ext4 -lR /var/log 2> /dev/null

dmesg seemed to be the most relevant to me. And there are archived versions (dmesg.*).

Solution 2

You can find aditional information in syslog

grep 'Mounted' /var/log/syslog*

or find mounted and unmounted logs

grep 'Mounted\|Unmounted' /var/log/syslog*
Share:
101,352

Related videos on Youtube

winchendonsprings
Author by

winchendonsprings

Updated on September 18, 2022

Comments

  • winchendonsprings
    winchendonsprings almost 2 years

    I understand if I boot from a live cd I can see all the system logs under System > Administration > File Log Viewer

    I have a major error with a disk not mounting and I want to trace i tback to the last time it did work and what may have corrupted the ext4 filesystem on it.

    So within the File Log Viewer Where do I start examining?

    • user941105
      user941105 about 13 years
      Are you only looking at the logs that were generated by the LiveCD starting up? Or are you looking at the logs on the host filesystem?
    • Rinzwind
      Rinzwind about 13 years
      ah you can also just search all the logs from commandline: cd /var/log/ and do a grep -R mount * (assuming you want to see all lines that contain mount).
  • Sindarus
    Sindarus almost 5 years
    I know this has been downvoted because it does not allow to see when a disk has last been successfully mounted (as was asked), but you can still find some interesting debugging info there as why a disk was not mounted or why it was automatically unmounted.
  • linuxUser123
    linuxUser123 about 4 years
    I am a beginner and somehow this command was easier to use.
  • R B
    R B almost 4 years
    I voted for this response because I didn't find /var/log/dmesg in Ubuntu Studio 18.04. I did find a mount error code in /var/log/syslog; unfortunately, it didn't reveal anything I didn't already know.