LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to redirect boot messages (user-mode/kernel-mode/whatever) to a file ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-redirect-boot-messages-user-mode-kernel-mode-whatever-to-a-file-938308/)

ajaygarg 04-05-2012 10:36 AM

How to redirect boot messages (user-mode/kernel-mode/whatever) to a file ?
 
Hi all.

I have been debugging a NetworkManager issue on Fedora; and I am wanting to have a look at the boot messages (leisurely :) )

For this, I need to have the boot messages (whatever mode) be persisted to a file; I can look at the file contents after the system finishes booting up. How could I do this?


I will be grateful for a reply.


Thanks and Regards,
Ajay

Kustom42 04-05-2012 11:42 AM

The dmesg command will show your hardware boot messages. Is that what you are looking for?

bigrigdriver 04-05-2012 11:48 AM

You could also look at /var/log/messages for boot messages. There may also be other logs of interest in /var/log.

Kustom42 04-05-2012 11:50 AM

/var/log/messages does not contain boot information. /var/log/dmesg and /var/log/dmesg.old contain the boot information. The command
Code:

dmesg | less
will allow you to view it.

ajaygarg 04-05-2012 12:21 PM

Thanks Kustom42 and bigrigdriver.

The information provided by you guys was useful, thanks a lot :)

But, what I am wanting is all the messgaes that appear during boot-up. For example, during the limited time I had as the mesages flied by during bootup, I could see messages like "Starting NetworkManager dameon"; "Starting avahi daemon", etc. etc.
But I could not find these messages anywhere in "dmesg", or "/var/log/messages".

Any way we could get ALL the messages?


Thanks anyways. :)

Regards,
Ajay

Kustom42 04-05-2012 12:30 PM

Those messages will not do much for you. The log file /var/log/messages will report any errors collected by syslogd. Dmesg will show boot errors for hardware. The other daemons may have their own logging but most will not log all messages. Some distros have the /etc/init.d/functions file set to log to a /var/log/boot.log file. You can google search for how to set this up if you do not have the boot.log file available to you.

nigel333 04-25-2012 09:06 AM

When I wanted to investigate my fast moving openSUSE 11.3 boot startup screen, at leisure, I found it very useful to:-

1. first log in as root.
2. open up the /etc/sysconfig/boot file using vi...
3. set PROMPT_FOR_CONFIRM="yes" and CONFIRM_PROMPT_TIMEOUT="300".
4. Save edits and reboot.

Then I could easily note the name of each boot script being run, in order, and of each daemon being summoned. :-)


All times are GMT -5. The time now is 10:47 PM.