My Linux boot fails often. I have removed quiet from my boot options so I can see what's going on. Basically after showing a bunch of [pass] messages, it hangs. It does not hang every time. Now I know dmesg is the way I can see boot messages.

But I want to look at the boot messages of the previous boot and not the current boot (because this one booted normally, while last one hanged).

Also are there any other logs I can look at to find the problem? I am using Ubuntu Natty 11.04. Should I recompile my kernel with debugging support? Is that the only way to debug this issue?

Finally, is this what is called a kernel panic (soft / hard or something)?


/var/log/messages (or /var/log/syslog on some systems) is the main system log file - look there. Depending on configuration options, it can contain same, more or less information than dmesg shows. Also, it is continuous by default (appended, not replaced at each boot).

Whether or not you'll need to recompile your kernel to solve the problem depends on what you can already find there and in other app-specific logs.

Kernel panic is a symptom of a serious system problem. So serious that the kernel is not equipped with means to go about it. This can be triggered by many various issues of various kinds: including driver bugs, severe hardware failures, bugs in base system programs, rarely userspace applications.

  • In my installation the file was called syslog and not messages in the folder /var/log. I have found the message : could not open output file /dev/xconsole before every hang of the kernel.
    – AnkurVj
    Oct 3 '11 at 15:36
  • Ok, thanks for telling about syslog alternative name. Added to the answer for reference. I hope you managed to solve the problem. Oct 4 '11 at 6:13
  • /var/log/syslog and /var/log/messages are not the same file, and one should not under normal circumstances exist without the other. They're both generated by the syslog daemon(like rsyslog). Usually syslog will contain most if not all messages, whereas messages will be more filtered. See your syslog config (probably /etc/rsyslog.conf) for more details.
    – gamen
    Oct 4 '11 at 10:18
  • 1
    @gamen Not exactly. This depends on the program that handles system messages (logger daemon). Your description and the files you refer to indicate that your system uses rsyslog. Another popular one is syslog-ng. But in each case, the exact file names and their roles depend on the configuration. So there are no general "normal circumstances" and /var/log/messages can be, and often is, the main system log. Oct 4 '11 at 13:22
  • @roz yes, by finding the message before system crashed in syslog and searching for a solution on google, I managed to solve the problem
    – AnkurVj
    Oct 4 '11 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.