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*
Related videos on Youtube
Author by
winchendonsprings
Updated on September 18, 2022Comments
-
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 about 13 yearsAre 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 about 13 yearsah you can also just search all the logs from commandline:
cd /var/log/
and do agrep -R mount *
(assuming you want to see all lines that contain mount).
-
-
Sindarus almost 5 yearsI 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 about 4 yearsI am a beginner and somehow this command was easier to use.
-
R B almost 4 yearsI 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.