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?

1
  • 5
    This looks like a login problem rather than boot problem…
    – Melebius
    Nov 10, 2015 at 11:10

5 Answers 5

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
2
  • How can I save it to a file.
    – Lokesh
    Jan 3, 2017 at 11:41
  • 1
    @Lokesh journalctl -b > logsfielname.txt
    – Noman Gul
    Oct 6, 2020 at 16:36
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
3
  • Hi I keep getting login incorrect or permission denied???? Thanks
    – Antony
    Dec 29, 2011 at 15:09
  • can you proivde the log file.
    – Mughil
    Dec 29, 2011 at 16:39
  • 2
    @Antony use sudo e.g. sudo more /var/log/boot.log
    – Player1
    May 9, 2020 at 21:38
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.

1
  • Thanks but from antony@antony I get Login incorrect.
    – Antony
    Dec 29, 2011 at 14:20
6

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

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
 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .