15

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?

Mateo
  • 8,064
  • 9
  • 57
  • 78
winchendonsprings
  • 2,172
  • 6
  • 27
  • 40
  • 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? – idbrii May 05 '11 at 20:40
  • 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). – Rinzwind May 05 '11 at 20:46

2 Answers2

12

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.*).

idbrii
  • 3,162
  • 2
  • 25
  • 38
8

You can find aditional information in syslog

grep 'Mounted' /var/log/syslog*

or find mounted and unmounted logs

grep 'Mounted\|Unmounted' /var/log/syslog*
poluxgt
  • 81
  • 1
  • 1
  • 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. – Sindarus Jul 04 '19 at 18:08
  • I am a beginner and somehow this command was easier to use. – linuxUser123 Jun 23 '20 at 14:40
  • 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. – R B Jul 04 '20 at 15:18