Logging entire boot message or slowing the scrolling?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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?
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.
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.
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.
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?
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
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
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.