You are not logged in.

#1 2009-02-15 20:39:09

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

How to write boot messages into a log file?

Hi there,

I've got a few warnings/error messages during boot up, but as the screen is cleared once login starts, I can't scroll up to the boot messages.
I've found this article http://wiki.archlinux.org/index.php/Dis … t_messages, but it doesn't say how to log the boot messages into a file (for example under /var/log).

Is it possible to somehow write the boot messages into a logfile? The boot message errors/warnings do not show up in any of the logfiles under /var/log.

Thanks a lot in advance,
Blackhole

Last edited by blackhole (2009-02-15 20:39:27)


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#2 2009-02-15 21:00:42

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 158

Re: How to write boot messages into a log file?

dmesg

Offline

#3 2009-02-15 21:11:30

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: How to write boot messages into a log file?

scj wrote:

dmesg

No, I'm sorry, but as I said dmsg does not log the boot messages. That's exactly my problem.


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#4 2009-02-15 21:19:27

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: How to write boot messages into a log file?

Boot from where? If you want the entire boot process you can use debug parameter. BUT I dont know what you will get becauseyour harddrive gets mounted during init, and during init it dumps dmesg to a log file, i guess dmesg gets its logs from minilogd which also gets started during init. The only way of doing it would be to get the kernel to log its output to ram then flush it to disk at the relevant time. Ive no idea if you can do this or not.

Offline

#5 2009-02-15 21:26:59

mooreted
Member
Registered: 2009-01-01
Posts: 113

Re: How to write boot messages into a log file?

Offline

#6 2009-02-15 22:01:55

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: How to write boot messages into a log file?

Erm, have you read my first post? ;-)


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#7 2009-02-15 22:05:19

blackhole
Member
From: Karlsruhe, Germany
Registered: 2008-12-14
Posts: 148
Website

Re: How to write boot messages into a log file?

Zariel wrote:

Boot from where? If you want the entire boot process you can use debug parameter. BUT I dont know what you will get becauseyour harddrive gets mounted during init, and during init it dumps dmesg to a log file, i guess dmesg gets its logs from minilogd which also gets started during init. The only way of doing it would be to get the kernel to log its output to ram then flush it to disk at the relevant time. Ive no idea if you can do this or not.

I just boot normally from my hard disk, but all the messages between "INIT version 2.86 booting" and the output from /etc/issue (when login is started), is gone. It's not in /var/log/messages nor do I get it via dmsg.
All the kernel messages BEFORE "INIT version 2.86 booting" are logged okay. sad


Coming closer and closer to the ultimate goal: replacing boring old Windows XP desktop with shiny new Arch KDE 4 desktop. ^^
Already registered? Your vote counts!

Offline

#8 2009-02-16 11:02:39

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: How to write boot messages into a log file?

The following solution does not do exactly what you ask but may help to solve your problem: Put the following command in /etc/rc.local

bash

Then the boot process will stop with a root prompt allowing you to read the boot messages (you can scroll up/down by SHIFT+PGUP/PGDOWN). When you have finished to read the boot messages; simply type exit and the normal boot process will continue (clearing the messages and possibly starting X).

Alternatively (but I have not tested this second alternative); comment out the following line from /etc/inittab (this is line 27 in my version of inittab)

c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux

This will leave the first console with the boot messages (without giving a logging prompt) that you can read (and scroll up/down as before)

Last edited by olive (2009-02-16 11:08:51)

Offline

#9 2009-02-16 11:05:15

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: How to write boot messages into a log file?

Please ignore

Last edited by olive (2009-02-16 11:06:05)

Offline

#10 2009-02-21 15:25:37

beretta
Member
Registered: 2008-04-21
Posts: 133

Re: How to write boot messages into a log file?

One thing that has helped me was to edit the /etc/issue file to not have the clear screen command (should be all the characters before "Arch Linux ...".  That makes the login prompt appear without blanking the whole screen, and you should be able to scroll back.

Unfortunately, I'm trying to debug a udev problem, and with a monitor command added to /etc/rc.sysinit, I get so many extra lines I can't scroll back far enough to where the problem is occurring.  Some way to save the boot message stream to a log file would be very nice...

EDIT:
Never mind-- that's exactly what the wiki page was about.  How emabarassing...

Another EDIT:
I've just discovered /sbin/bootlogd -- trying to figure out if it will do what we need.

Last edited by beretta (2009-02-21 15:38:32)

Offline

Board footer

Powered by FluxBB