You are not logged in.

#1 2021-12-15 20:55:38

ib
Member
Registered: 2021-12-11
Posts: 25

How to read the kernel boot log

When I boot linux, I see some kind of message, but everything goes very quickly and I don't have time to read it. The Ctrl+S keys do not pause the download at that moment, I tried boot_delay but did not help. journalctl -b does not print this log, and I also have a laptop keyboard that cannot be scrolled up in tty

Last edited by ib (2021-12-15 20:56:52)

Offline

#2 2021-12-15 21:03:16

seth
Member
Registered: 2012-09-03
Posts: 66,079

Re: How to read the kernel boot log

https://bbs.archlinux.org/viewtopic.php?id=269770

Boils down to "Why" - what do you actually want to achieve here?

Offline

#3 2021-12-15 21:03:31

loqs
Member
Registered: 2014-03-06
Posts: 18,475

Re: How to read the kernel boot log

When you ran `journctl -b` was that as root or a member of the groups adm,  wheel or systemd-journal?

Offline

#4 2021-12-15 21:35:02

ib
Member
Registered: 2021-12-11
Posts: 25

Re: How to read the kernel boot log

loqs wrote:

When you ran `journctl -b` was that as root or a member of the groups adm,  wheel or systemd-journal?

root user.
The problem is that this log does not show the message in the border that when the kernel is loaded, the rest are there

Offline

#5 2021-12-15 21:48:16

seth
Member
Registered: 2012-09-03
Posts: 66,079

Re: How to read the kernel boot log

The bootloader?
Record the boot w/ a camera - it'll show you what you want and us what you're talking about.

Offline

#6 2021-12-15 22:01:39

AndroGR
Member
From: Athens, Greece.
Registered: 2021-10-15
Posts: 53

Re: How to read the kernel boot log

ib wrote:

When I boot linux, I see some kind of message, but everything goes very quickly and I don't have time to read it. The Ctrl+S keys do not pause the download at that moment, I tried boot_delay but did not help. journalctl -b does not print this log, and I also have a laptop keyboard that cannot be scrolled up in tty

Install plymouth and add text only. Not sure if its going to be the best idea for what you're asking, but the messages will be displayed.,


Arch | AMD Ryzen 5 1500X | AMD Radeon RX550 4GB | 16GB RAM (3200Mhz) | KDE Plasma | Linux Zen / Custom Kernel

Offline

#7 2021-12-15 22:19:22

ib
Member
Registered: 2021-12-11
Posts: 25

Re: How to read the kernel boot log

seth wrote:

https://bbs.archlinux.org/viewtopic.php?id=269770

Boils down to "Why" - what do you actually want to achieve here?

The log is as it was originally, along with the [OK] and other
I enabled syslog-ng and made a configuration like this:

destination d_boot { file("/var/log/boot.log"); };
filter f_boot   { facility(local7); };
log { source(src); filter(f_boot); destination(d_boot); };

But the file did not even appear

Offline

#8 2021-12-15 22:28:41

ib
Member
Registered: 2021-12-11
Posts: 25

Re: How to read the kernel boot log

Here
5uazw0j.png
this is the warning

Offline

#9 2021-12-15 22:37:46

seth
Member
Registered: 2012-09-03
Posts: 66,079

Offline

#10 2021-12-15 22:46:19

ib
Member
Registered: 2021-12-11
Posts: 25

Re: How to read the kernel boot log

I need all boot output to be written to a log file, warning for now for example

Offline

#11 2021-12-16 04:55:09

NuSkool
Member
Registered: 2015-03-23
Posts: 269

Re: How to read the kernel boot log

$ cat boot.log.1
------------ Sun Dec 12 00:04:21 PST 2021 ------------
:: running hook [udev]
:: Triggering uevents...
:: running hook [plymouth]
:: performing fsck on '/dev/sda1'
Root-sda1: clean, 509537/4866048 files, 6405902/19456000 blocks
:: mounting '/dev/sda1' on real root
:: running late hook [plymouth]
:: running cleanup hook [udev]

Welcome to Arch Linux!

[  OK  ] Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/modprobe.

I get something like that in my boot.log, but I don't recall exactly how I got it. I'll have to look into it if you don't get it figured out. Going off memory, and as someone else posted, plymouth in txt mode (does nothing except provide log) was part of it, but I had to add something to initramfs through mkinitcpio.conf to capture more than just 2 or 3 lines of the kernel stuff. Possibly add a kernel parameter for log level as well?

The warning is just a rw root deal in initranfs. You don't want fsck running twice though. I think I setup mine to fsck in initramfs only.





EDIT: Add notes.

Here's some notes you may find useful.

## Added the fsck hook per: https://bbs.archlinux.org/viewtopic.php?id=167631
## This allows fsck on root during initramfs.
## This requires setting rw on kernel parameter line in grub.
## Also set 0 on root in /etc/fstab to eliminate running fsck twice.
##
## Added plymouth hook for logging boot messages only, in /var/log/boot.log
## No efforts were made (or wanted) except adding it to hooks, to function.
## As a result, it does nothing except create the log.
## QUOTE: In either text or graphics mode, the boot messages are completely occluded.
## After the root file system is mounted read-write, the messages are dumped to /var/log/boot.log.
## Also, the user can see the messages at any time during boot up by hitting the escape key.
## https://www.freedesktop.org/wiki/Software/Plymouth/

Last edited by NuSkool (2021-12-16 05:20:02)


Scripts I Use                                                 :  https://github.com/Cody-Learner
grep -m1 'model name' /proc/cpuinfo    : AMD Ryzen 7 8745HS w/ Radeon 780M Graphics
grep -m1 'model name' /proc/cpuinfo    : Intel(R) N95
grep -m1 'model name' /proc/cpuinfo    : AMD Ryzen 5 PRO 2400GE w/ Radeon Vega Graphics

Offline

#12 2021-12-16 09:21:07

seth
Member
Registered: 2012-09-03
Posts: 66,079

Re: How to read the kernel boot log

The message is from the initramfs and we're still at "why? what do you **actually** want to do"

journald is not the best logger in the world, for syslog-ng you probably missed https://wiki.archlinux.org/title/Syslog … ntegration and this will not log the bootloader and I'm less than sure about the initramfs - you'll probably need the systemd hook in your initramfs.
This is gonna be quite a hazzle and you'll get much faster to the relevant information by just pointing your camera at the screen.

Offline

#13 2021-12-16 19:33:15

Maniaxx
Member
Registered: 2014-05-14
Posts: 758

Re: How to read the kernel boot log

You can add 'rd.log' to the kernel cmdline to get initramfs log into kmsg (journalctl -t initramfs).
https://man.archlinux.org/man/mkinitcpio.8

For full tty1 logging i havn't found a solution yet. I've tried a kernel serial console (console=ttyS10) with an initramfs socat hook (socat -s -dd -u /dev/ttyS10 create:/run/initramfs/tty1.log &) but the output file is always empty. Not sure how to get a proper serial loopback here.

Last edited by Maniaxx (2021-12-16 19:55:48)


sys2064

Offline

Board footer

Powered by FluxBB