Printing Bootscript error messages to file

Gerard Beekmans gerard at
Tue Oct 9 21:27:21 PDT 2001

On Tue, Oct 09, 2001 at 10:53:40PM -0500, Debian User wrote:
> I am somewhat confused, as bootscript messages are not going to dmesg.
> I think that bootscript functions are calling functions which do print to
> dmesg.
> For example, "Activating Swap" is in bootscripts and "Adding Swap" then comes
> up in dmesg.

I didn't want to make it too confusing, but yes those messages are from the
kernel. The swapon program does something which prompts it to have the
kernel write something about swap. Swap is directly managed by the kernel

Bootscripts, however, aren't. They are, as people call it, user-space
programs/scripts. If you would want stdout and stderr to be copied to both
your monitor and also to the kernel's buffer, it won't do much good. That
buffer is only 16 KB. If all of stdout and stderr goes to the buffer, it
won't be enough to catch all errors you may be getting.

The kernel is just not meant as a dump ground for errors from programs like
'ls' 'grep' and so forth.
> Whatever, I dont understand why Linux is not designed so bootscript errors
> are in dmesg.

Bootscript errors are not any different from non-bootscripts errors. The
kernel has on idea that an error is bootscript related or not. A program
like "grep" will error, or it won't. To make your idea work, everything
that goes to the screen when Linux is running will have to be copied to the
kernel message buffer too (which will fill real quick, it only being 16

Now, what would be helpful is a program that can store messages in that
kernel buffer on command. We, as users, do know when an error from a
program is from a bootscript or not. When an error is encountered, we could
tell that program to store a message in the buffer which you later retrieve
using the dmesg or similar programs that query the kernel. But I have no
idea if such a program exists or not.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list