LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-08-2020, 12:16 AM   #1
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Rep: Reputation: Disabled
Unhappy how to change "welcome to linux" message on boot in LFS systemd 9.1


i have sucessfully booted LFS 9.1 Systemd but while booting the system shows welcome to linux message. Is there any way to edit that message.

screenshot:
Click image for larger version

Name:	Screenshot_2020-04-08_10-37-45.png
Views:	431
Size:	55.7 KB
ID:	32929
 
Old 04-08-2020, 12:49 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,810
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Does /etc/motd exist? If yes, what does it contain?
 
Old 04-08-2020, 01:04 AM   #3
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by mrmazda View Post
Does /etc/motd exist? If yes, what does it contain?
sorry that file doesnot exist in my lfs. do i have to create one?

i think that file is to show message of the day which is shown only after boot.

i need to to change the message before the cheking drivers and all. In kali linux the "welcome to linux!" message is replaced by something like "Kali rolling main" with this red color

Last edited by extrimis; 04-08-2020 at 01:08 AM.
 
Old 04-08-2020, 03:01 AM   #4
extrimis
Member
 
Registered: Apr 2020
Location: India
Distribution: Kali Linux
Posts: 35

Original Poster
Rep: Reputation: Disabled
Changing "Welcome to Linux ! message"

at last i figured it out. the message was actually printed by systemd. the message can be changed by editing /src/core/main.c in systemd source

and just recompile the systemd and reinstall grub by grub-install command

the function is given below

int status_welcome(void) {
int r;
_cleanup_free_ char *pretty_name = NULL, *ansi_color = NULL;

r = parse_env_file("/etc/os-release", NEWLINE,
"PRETTY_NAME", &pretty_name,
"ANSI_COLOR", &ansi_color,
NULL);
if (r < 0 && r != -ENOENT)
log_warning("Failed to read /etc/os-release: %s", strerror(-r));

return status_printf(NULL, false, false,
"\nWelcome to \x1B[%sm%s\x1B[0m!\n",
isempty(ansi_color) ? "1" : ansi_color,
isempty(pretty_name) ? "Linux" : pretty_name);
}
 
  


Reply

Tags
boot, linux from scratch, systemd



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
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
How to change Welcome Message on Pure-ftpd ?? nmella Linux - Software 0 02-03-2004 02:10 PM
how to change ssh welcome message jolly Linux - General 1 04-13-2003 08:58 AM
change welcome message syphon00 Linux - Networking 14 09-06-2002 11:55 AM

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

All times are GMT -5. The time now is 11:23 AM.

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