65

I want to find the cause of a boot problem I have tried ls -ltr /var/log from antony@antony which gives me login incorrect can someone tell me what command to use to see what has upset the boot thanks

NB when trying some commands from antony@antony then password I get login incorrect. Is that right?

  • 4
    This looks like a login problem rather than boot problem… – Melebius Nov 10 '15 at 11:10
78

For systemd based versions of Ubuntu (15.04 onwards) you'll need to use the journalctl command to view the current boot log messages (as mentioned in this answer, and here for more info on how to enable them for previous boots):

journalctl -b
| improve this answer | |
  • How can I save it to a file. – Lokesh Jan 3 '17 at 11:41
  • 1
    @Lokesh journalctl -b > logsfielname.txt – Noman Gul Oct 6 at 16:36
55

You can use two log files to view the boot problem.

/var/log/boot.log  ---  System boot log

/var/log/dmesg     ---  print or control the kernel ring buffer
| improve this answer | |
  • Hi I keep getting login incorrect or permission denied???? Thanks – Antony Dec 29 '11 at 15:09
  • can you proivde the log file. – Mughil Dec 29 '11 at 16:39
  • @Antony use sudo e.g. sudo more /var/log/boot.log – Player1 May 9 at 21:38
18

To view kernel messages...

dmesg

or to page through the messages...

dmesg | less

The program helps users to print out their kernel messages. Instead of copying the messages by hand, the user only needs to enter at the console: $ dmesg > kernel.messages and mail the kernel.messages file to whoever can debug their problem.

| improve this answer | |
  • Thanks but from antony@antony I get Login incorrect. – Antony Dec 29 '11 at 14:20

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.