LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 05-14-2008, 02:09 AM   #1
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 37
Logging entire boot message or slowing the scrolling?


Hi as you know, the boot message which I think is both bios messages and linux messages scroll quite quickly.

I know that you can get quite a bit of info from dmesg.

Is there a way to log the entire message in one log or be able to slow the boot message?
Your help would be much appreciated.
Thanks
okos
 
Old 05-14-2008, 02:15 AM   #2
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64 14.0
Posts: 981

Rep: Reputation: 88
Quote:
Originally Posted by okos View Post
Hi as you know, the boot message which I think is both bios messages and linux messages scroll quite quickly.

I know that you can get quite a bit of info from dmesg.

Is there a way to log the entire message in one log or be able to slow the boot message?
Your help would be much appreciated.
Thanks
okos
Not sure why anyone would want to slow the boot up process, most want to speed it up.

Read this, I believe you can find your answer here:

http://www.linfo.org/dmesg.html

Very bottom:

Code:
The output of dmesg is maintained in the log file /var/log/dmesg, and it can thus also be easily viewed by reading that file with a text editor, such as vi or gedit, or with a command such as cat, e.g.,

    cat /var/log/dmesg | less
 
Old 05-14-2008, 02:33 AM   #3
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 37
Thanks for the info but the dmesg does not print the entire boot message.
That is what Im after.

Im not looking for a slower boot except to scan for specific issues.
 
Old 05-14-2008, 02:39 AM   #4
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64 14.0
Posts: 981

Rep: Reputation: 88
Quote:
Originally Posted by okos View Post
Thanks for the info but the dmesg does not print the entire boot message.
That is what Im after.

Im not looking for a slower boot except to scan for specific issues.
dmesg does log the entire boot once the kernel is selected from either lilo or grub.

From the link I previously posted:
Invoking dmesg without any of its options (which are rarely used) causes it to write all the kernel messages to standard output. This usually produces far too many lines to fit into the display screen all at once, and thus only the final messages are visible.
Maybe your not posing the question the way you are thinking it?
 
Old 05-14-2008, 03:16 AM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,381

Rep: Reputation: Disabled
Well, dmesg will only log the kernel messages. All the output of the programs and scripts that run during startup are not logged.
What you can do (as long as boot in console mode - runlevel 3) is wait until the command prompt appears, and then use <Shift> <PgUp> to inspect the text that had already scrolled off the console screen.

Eric
 
Old 05-14-2008, 03:19 AM   #6
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64 14.0
Posts: 981

Rep: Reputation: 88
Quote:
Originally Posted by Alien Bob View Post
Well, dmesg will only log the kernel messages. All the output of the programs and scripts that run during startup are not logged.
What you can do (as long as boot in console mode - runlevel 3) is wait until the command prompt appears, and then use <Shift> <PgUp> to inspect the text that had already scrolled off the console screen.

Eric
As usual, Bob is right.............
 
Old 05-14-2008, 06:16 AM   #7
Rupa
Member
 
Registered: Apr 2008
Location: Berlin, Germany
Distribution: Slackware, Debian, NetBSD
Posts: 80

Rep: Reputation: 25
Simply press the Scroll-Lock-Key while booting and everything halts until you press it again. It's as simple as this.
 
Old 05-14-2008, 10:15 AM   #8
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
a serious audit weakness

Quote:
Originally Posted by Rupa View Post
Simply press the Scroll-Lock-Key while booting and everything halts until you press it again. It's as simple as this.
Both Bob and Rupa are correct and just highlight the fundamental problem that if one does not intervene manually either during the boot and initialisation processes or at least before starting any other activity, the complete information on what has occurred from boot during the initiation processes up until the log-in prompt has been lost.

In short: there is a serious audit weakness - no permanent record of what has occurred is made.

All events that occur on the system from boot upto the login prompt should be logged to a file - the question is: how to do this?

Last edited by harryhaller; 05-14-2008 at 10:34 AM.
 
Old 05-14-2008, 12:55 PM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,381

Rep: Reputation: Disabled
Quote:
Originally Posted by harryhaller View Post
All events that occur on the system from boot upto the login prompt should be logged to a file - the question is: how to do this?
What you ask for is near impossible. There is a time in the beginning of the boot where there is no medium mounted where the logs can be written to.


Eric
 
Old 05-14-2008, 03:05 PM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,945

Rep: Reputation: Disabled
bootlogd(8) is what you're after, I believe.
 
Old 05-14-2008, 06:25 PM   #11
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 37
Hi
First of all thanks for all of the responses.

Quote:
Originally Posted by rworkman View Post
bootlogd(8) is what you're after, I believe.
I read the man page. I tried the following command:
Code:
bootlogd -l /var/log/boot
And I got the following error.
Quote:
bootlogd: cannot find console device 136:1 in /dev
According to the man page:
Quote:
Bootlogd runs in the background and copies all strings sent to the /dev/console device to a logfile. If the logfile is not accessible, the messages will be kept in memory until it is.
Im sorry but I am not sure how to get it to work.

There is /dev/console on my slackware system. I guess that is where all of the boot messages are printed at boot.

Adding bootlogd -l /var/log/boot to the beginning of the rc3.d would not help would it?

Thanks for the help.

Last edited by okos; 05-14-2008 at 06:27 PM.
 
Old 05-15-2008, 12:42 AM   #12
Stroker
Member
 
Registered: Dec 2006
Location: The Nature Coast
Distribution: Slackware 01001101
Posts: 83

Rep: Reputation: 18
.

WARNING: I'm a Linux greenhorn. If you follow my advice you better have your seatbelt fastened, tray locked in the upright position, and barf bag in hand.

Quote:
Originally Posted by okos View Post
I read the man page. I tried the following command:
Code:
bootlogd -l /var/log/boot
And I got the following error.
I'm guessing that you tried the command from an xterm. I believe you have to use a real console.


Quote:
Originally Posted by okos View Post
Adding bootlogd -l /var/log/boot to the beginning of the rc3.d would not help would it?
rc3.d is a directory. If you mean rc.M, I'd say not. You'd want it logging messages way before that, e.g., rc.S prints a number of useful messages. It defaults to /var/log/boot so you shouldn't need the -l flag. My guess would be to add it at the top of inittab something like this:?

bl::sysinit:/sbin/bootlogd

I'D WAIT FOR SOMEONE THAT ACTUALLY HAS A CLUE TO GIVE A THUMBS-UP OR THUMBS-DOWN ON THAT BEFORE TRYING IT.
 
Old 05-15-2008, 12:49 AM   #13
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,945

Rep: Reputation: Disabled
Add that bootlogd line to the top of /etc/rc.d/rc.S (right below the comment block).
 
Old 05-15-2008, 01:53 PM   #14
Stroker
Member
 
Registered: Dec 2006
Location: The Nature Coast
Distribution: Slackware 01001101
Posts: 83

Rep: Reputation: 18
Quote:
Originally Posted by rworkman View Post
Add that bootlogd line to the top of /etc/rc.d/rc.S (right below the comment block).
I read that bootlogd is a security risk because it will continue to log all activity on
the boot console including login information.

Perhaps adding it to rc.S this way so it can be activated only when needed by [un]setting it's exe bit?

if [ -x /sbin/bootlogd ]; then
/sbin/bootlogd
fi

Considering that you don't really want bootlogd running after boot completes, it
seems like the correct way would be to have the login prompt kill bootlogd.
I don't know how or where one would do that though.
 
Old 05-15-2008, 02:10 PM   #15
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,945

Rep: Reputation: Disabled
Quote:
Originally Posted by Stroker View Post
I read that bootlogd is a security risk because it will continue to log all activity on
the boot console including login information.

Perhaps adding it to rc.S this way so it can be activated only when needed by [un]setting it's exe bit?

if [ -x /sbin/bootlogd ]; then
/sbin/bootlogd
fi

Considering that you don't really want bootlogd running after boot completes, it
seems like the correct way would be to have the login prompt kill bootlogd.
I don't know how or where one would do that though.

Interesting; I don't ever recall noticing any login info in the file it creates, but there's a fair chance I didn't look far enough - I was always wanting something from *early* in the boot process.

If that's actually a problem (and perhaps even if it isn't), the best way to handle it would probably be a 'killall bootlogd' as the last line in /etc/rc.d/rc.local

-RW
 
  


Reply

Tags
boot, logging


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Password expiration message after logging on? as400 Solaris / OpenSolaris 4 05-13-2007 02:10 AM
Error Message Logging In troeth Ubuntu 1 01-29-2006 02:05 PM
Alsa driver slowing down boot ben_build#2.1.0 Mandriva 0 12-26-2004 09:07 AM
kernel 2.6.8 fedora message logging todd_seiler Fedora 5 09-19-2004 11:01 PM
Creating message after logging into runlevel 3. darksky Red Hat 6 09-01-2003 09:22 PM


All times are GMT -5. The time now is 12:40 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration