LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-11-2020, 12:31 PM   #1
Jon Wilder
LQ Newbie
 
Registered: Jul 2015
Posts: 17

Rep: Reputation: Disabled
LFS systemd Kernel Console Messages


I just finished up a LFS systemd build. It all works great except the kernel console messages overwriting the console prompt. I can stop it by typing dmesg -n 1 but I'm looking for a solution to disable them altogether on startup.

Prior to doing a systemd build of LFS, I had done a systemv build which did not have this issue.

Does anyone happen to know how to do that?

Last edited by Jon Wilder; 07-11-2020 at 12:32 PM.
 
Old 07-11-2020, 08:52 PM   #2
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
Yeah, if you go lfs you use sysvinit. Otherwise what's the point? If you do want to go hardcore, you'd need to figure out why it's using tty1 as console, which is ultimately the reason why it does so. It's still linux after all. In a way.
 
Old 07-12-2020, 07:06 PM   #3
Jon Wilder
LQ Newbie
 
Registered: Jul 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tinfoil3d View Post
Yeah, if you go lfs you use sysvinit. Otherwise what's the point?
Apparently you miss the point of Linux and open source altogether. And that point is freedom...and choices.

Quote:
Originally Posted by tinfoil3d View Post
If you do want to go hardcore, you'd need to figure out why it's using tty1 as console, which is ultimately the reason why it does so.
Thanks for the tip.

Quote:
Originally Posted by tinfoil3d View Post
It's still linux after all. In a way.
How is it only Linux "in a way"?
 
Old 07-12-2020, 11:47 PM   #4
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
I do, it's obviously your own choice to abandon certain freedoms using systemd
What I don't get is are ALL severities of messages get printed or only certain critical ones? Maybe you can try telling the kernel to use a certain console=X?
 
Old 07-14-2020, 08:28 AM   #5
arch-linq
Member
 
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,BLFS
Posts: 110

Rep: Reputation: Disabled
A minor annoyance of systemd that I never looked into. I'm sure it's easy enough to find on goog. A systemd/kernel cmd line tweak or such. Maybe ask in lfs-support mail. Doubt Doug the sysd dev even knows it happens. Sysvinit is nasty crusty slow old.....vs sysd but I digress. Tinfoil is afraid the PTB will soon confiscate his sysv build. Gimme that....too much freedom! ;p

Last edited by arch-linq; 07-14-2020 at 08:32 AM.
 
Old 07-31-2020, 09:41 PM   #6
Jon Wilder
LQ Newbie
 
Registered: Jul 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks to tinfoil3d...

On the Raspberry Pi, kernel command line options are passed to the kernel through a file on the boot partition named cmdline.text. I had copied the entire /boot directory (kernel images, firmware files, config.txt and cmdline.txt) from a working Raspbian distribution. console=tty1 is one of Raspbian's default kernel command line options.

I did a complete LFS rebuild and finished it this morning. After copying the /boot files from the working Raspbian distro, I edited cmdline.txt by taking out console=tty1. This build booted right up with no kernel console messages at all.

The thing I find interesting is that Raspbian boots with console=tty1 on the kernel command line, yet Raspbian does not show continuous kernel console logging so they must be suppressing it after the boot sequence in a config file somewhere.
 
Old 08-01-2020, 09:46 AM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Don't know if its the same with systemd but for sysv I had to add 'kernel.printk = 3 4 1 3' to /etc/sysctl.conf to stop iptables flooding the console with messages ( pi4 )
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 9.0 systemd: Does the LFS partition need to be a GPT or can it be msdos? davecan Linux From Scratch 3 01-08-2020 12:14 PM
systemd - no kernel messages in journald Pivek1986 Debian 4 11-10-2014 10:37 PM
log messages spamming console, systemd, consolekit, Peterius Debian 2 05-13-2014 01:00 PM
Clean up your LFS boot-time console messages stoat Linux From Scratch 1 09-28-2012 11:54 AM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration