99

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?

Antony
  • 1,383
  • 3
  • 14
  • 19

5 Answers5

113

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
Pierz
  • 3,063
  • 1
  • 25
  • 15
61

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
Mughil
  • 1,622
24

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.

Serge Stroobandt
  • 5,268
  • 1
  • 48
  • 59
6

I am using sudo dmesg -T --color=always --level=err,warn | more to see kernel errors and warnings

Shobeira
  • 153
0

Trying to add to previous useful answers, boot log is populated with many rows. Only a few of then will help you fixing the issue. Filter the reading of the most appropriate log file with grep may speed up your research. In my case, issue keyword was "hid", so gave me the very rows I was interested in:

a@acero:~$
journalctl -b  | grep hid
Jul 01 07:40:50 acero kernel: hid: raw HID events driver (C) Jiri Kosina
Jul 01 07:40:50 acero kernel: i2c_hid_acpi i2c-SYNA7DB5:01: failed to reset device: -61
Jul 01 07:40:50 acero kernel: i2c_hid_acpi i2c-SYNA7DB5:01: failed to reset device: -61
Jul 01 07:40:50 acero kernel: i2c_hid_acpi i2c-SYNA7DB5:01: failed to reset device: -61
Jul 01 07:40:50 acero kernel: i2c_hid_acpi i2c-SYNA7DB5:01: failed to reset device: -61
Jul 01 07:40:50 acero kernel: i2c_hid_acpi i2c-SYNA7DB5:01: can't add hid device: -61
Jul 01 07:41:05 acero kernel: hid-generic 0003:10C4:8108.0001: input,hidraw0: USB HID v1.11 Mouse [YSPRINGTECH USB OPTICAL MOUSE] on usb-0000:03:00.3-2/input0

Augusto
  • 457