LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   reducing verbosity of some modules (https://www.linuxquestions.org/questions/linux-from-scratch-13/reducing-verbosity-of-some-modules-4175613156/)

jr_bob_dobbs 09-03-2017 07:02 AM

reducing verbosity of some modules
 
When booting my BLFS system, I often get text that "spams" the screen over the login prompt. Sometimes I'll stare at my computer like a ninny before I realize that it actually is waiting for the user name input. D'oh!

Sometimes, if I am in text mode (not in xorg) I'll get random messages that overlay whatever test is by the cursor. Makes text editing a bit fiddly.

The messages are usually of this sort (typed by hand from a screen shot, so there could be mistakes):
Code:

[  34.153687] iwlwifi 00:0d:00.0: L1 Enabled - LTR Enabled
[  34.369347] IPv6: ADDRCONF(NETDEV_UP): wlp13s0: link is not ready

That one is always present at boot-time. It can also be one the later random ones. wlp13s0 is the wifi device name and iwlwifi is the intel wifi driver module. Sometimes the random ones I think print something about USB or HID.

The messages do not seem to indicate real errors. Network and the USB continue to work. What I would like is to not have my login prompt obscured nor any other text while in the console after logging on.

How can I stop this text spammy-ness?

p.s. I once had something like this in Gentoo. At the time, the solution was to install a system logging package. I'm pretty sure the basic LFS install put in a logger. I know I have logs files and that they grow, since I have to run a logrotate script from time to time. So I am unsure as to a solution.

Thank you.

ondoho 09-03-2017 09:05 AM

i remember there were different solutions on different systems, but this has worked for me (recently):
https://superuser.com/a/351402

Luridis 09-03-2017 04:40 PM

Code:

cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd0,2)

menuentry "GNU/Linux, Linux 4.12.7-lfs-8.1-systemd" {
    linux /boot/vmlinuz-4.12.7-lfs-8.1-systemd root=/dev/sda2 ro loglevel=4
}
EOF


jr_bob_dobbs 09-04-2017 02:08 PM

I read the first reply, then followed the links and then read some man pages. I came up with a new /etc/sysctl.conf file that looked like this:
Code:

# Created by me, not mentioned in the standard [B]LFS book(s).  Our goal is to
# get it to stop usb and ilwwifi messages from going to the console.  To logs
# is ok

# four columns
# * CUR = current severity level; only messages more important than this level
#  are printed
# * DEF = default severity level assigned to messages with no level
# * MIN = minimum allowable CUR
# * BTDEF = boot-time default CUR

# possible values for each column
# 0 - emergency
# 1 - alert
# 2 - critical
# 3 - error
# 4 - warning
# 5 - notice
# 6 - informational
# 7 - debug This is too noisy

kernel.printk = 4        4        1        4

Rebooted. That worked, yay.

I came to post here... and then saw the second reply. Wow: one parameter passed to the kernel is much simpler.

Thank you both for the replies.

Luridis 09-05-2017 05:43 PM

Yea, it will work from there too. However, if you want the early printk messages to be reduced, before the rootfs is loaded to produce less output, you need to put it on the kernel command line.

The same post-boot file to edit for systemd users is /etc/systemd/system.conf


All times are GMT -5. The time now is 12:08 PM.