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.
EDIT: not fully solved; there is (at time of writing) still an issue about bootlogd buffering until the logfile is accessible but that's probably as far as we are going to get for now, until someone peeks into the bootlogd source code.
Is it possible to review boot messages after boot?
Kernel messages are available via dmesg (and many are logged early in the rc.M script by the /bin/dmesg -s 65536 > /var/log/dmesg) but many console boot messages are not kernel messages. During boot, messages can be viewed using Shift+PgUp but when the rc.S script finishes, init starts an agetty on tty1 which prints a login prompt. Then tty1 is no longer the console and Shift+PgUp cannot be used to scroll back through the boot messages. Any delayed boot messages do not have effective carriage returns so "marquee" across the screen, one following another, a line below.
Is it possible to leave tty1 as the console by de-configuring the tty1/agetty line in inittab, thus allowing Shift+PgUp to be used to scroll back through older messages and allowing proper horizontal alignment for delayed boot messages?
I would try it but the inittab line x1:4:respawn:/etc/rc.d/rc.4 runs /usr/X11R6/bin/xdm and this grabs the first unused tty<n>. The xdm man page and xdm config file comments do not reveal whether it is possible to make xdm use a specific tty<n>.
Another solution may be something like the sysvinit binary that intercepts all console writes and then dumps them to log at the end of the boot process but if it were that easy or useful it would already be done and publicised (wouldn't it?).
I did have that in mind when I wrote "Another solution may be something like the sysvinit binary ..." but that was for ubuntu and may not readily port to Slackware and there might anyway be a better solution on Slackware ...
Slackware's stock init scripts don't provide any means of capturing the output, AFAIK -you'd have to edit them and add a bunch of pipe->tee statements to capture it.
I thought I recalled this thread from the distant past. Seems to be right up your alley. You can also use scroll lock during boot to pause the boot process and read the lines, but of course that wouldn't help you see the message post-boot.
Most of those messages belong to the kernel. I got tired of getting so much output during boot, so nowadays I pass the "quiet" option to the kernel. You get much less text but errors are still printed if found. This makes it possible to read boot messages without any problems and locate possible error messages much more easily. My two cents. After all, all "normal" kernel messages are still available in dmesg after the boot process has finished, if you want to read something from them.
Most of those messages belong to the kernel. I got tired of getting so much output during boot, so nowadays I pass the "quiet" option to the kernel. You get much less text but errors are still printed if found. This makes it possible to read boot messages without any problems and locate possible error messages much more easily. My two cents. After all, all "normal" kernel messages are still available in dmesg after the boot process has finished, if you want to read something from them.
I thought I recalled this thread from the distant past. Seems to be right up your alley. You can also use scroll lock during boot to pause the boot process and read the lines, but of course that wouldn't help you see the message post-boot.
Thanks T3slider
Interesting thread. In the absence of any suggestions about de-configuring the tty1/agetty line in inittab and making xdm use another tty<n>, I tried bootlogd but it didn't work. Here are the pertinent steps ("pertinent steps" means "stumbling around, wildly trying different things" is omitted).
Modified rc.S, adding at the beginning:
Code:
#@ Start console logging
if [ -x /sbin/bootlogd ]; then
/sbin/bootlogd
fi
Created empty /var/log/boot root:root 644 (because experiments showed bootlogd does not create this file if it does not exist)
Booted using a GRUB kernel line with the usual vga=791 removed (because netsearching suggested bootlogd doesn't work with framebuffers. KISS)
Checked /var/log/syslog, messages, debug. No clues.
Killed bootlogd and ran /sbin/bootlogd -d ( -d keeps it in foreground). No output.
Killed bootlogd and ran /sbin/bootlogd
echo foo /dev/console; sleep 2; echo bar /dev/console
Checked /var/log/boot. Messages!
Maybe bootlogd can't find the console device when started from the rc.S but can when started from the console itself. Here's from the man page: "There is no standard way to find out the real console device if you have a new-style /dev/console device (major 5, minor 1). Bootlogd tries to parse the kernel command line, looking for console= lines and deducts the real console device from that. If that syntax is ever changed by the kernel, or a console-type is used bootlogd does not know about, bootlogd will not work". That suggests solution by adding a console= to the kernel command line, presumably via the kernel line in grub's menu.lst, but what value to use?
Regards "Scroll lock", it works well except when messages come too many and too fast just before rc.S ends and the command prompt appears. One workaround would be to put some sleep commands in rc.S.
You can pause the boot process anytime by pressing one of the keys "scroll lock" or "break" (sorry, can't remember which one). So you can watch and read the messages you want, continue, pause again, ...
You can pause the boot process anytime by pressing one of the keys "scroll lock" or "break" (sorry, can't remember which one). So you can watch and read the messages you want, continue, pause again, ...
Thanks Rupa, that works. There are several workarounds in the post that smoker linked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.