LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-13-2011, 01:54 PM   #1
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Rep: Reputation: 17
Logging Everything Displayed At Boot


Is there a way to get Linux to log all of the output that you see on the screen at boot?

It would sure beat having to dig through all of the different log files trying to find what was seen while it was booting.

Wayne Sallee
Wayne@WayneSallee.com
 
Old 07-13-2011, 01:57 PM   #2
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
If you're looking for kernel messages (i.e. the stuff that you see literally right after the bootloader starts booting the system), try dmesg. You can pipe the output to head/tail to see messages from the beginning/end of the log respectively.
 
Old 07-13-2011, 01:58 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The dmesg command can be used to do that.

If the bare command doesn't show all the message you can use the -s <number> option:
Code:
/bin/dmesg -s32768 > /var/log/boot.messages
You can add the above part to one of your boot scripts (you don't mention your distro, so I cannot be more specific).

Hope this helps.
 
Old 07-13-2011, 01:59 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Depending on the distribution, edit
Code:
/etc/default/bootlogd
Code:
# Run bootlogd at startup ?
BOOTLOGD_ENABLE=Yes
Kind regards
 
Old 07-13-2011, 02:00 PM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

What distro and version are you using? Check if you have a file /etc/default/bootlogd (Debian based distro does). In that file change the setting
Code:
BOOTLOGD_ENABLE=No
to
Code:
BOOTLOGD_ENABLE=Yes
and on your next boot everything should be getting logged into /var/log/boot. Hope it helps.

Kind regards,

Eric
 
Old 07-13-2011, 02:29 PM   #6
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
Wow! that was some fast responses.

I'm using Mandriva.

I did find a file called "useradd" in /etc/default
It has some similar commands.

I did the /bin/dmesg > /var/log/boot.messages and it produced a file that contains the same thing that boot.log contains, but this is far from being everything that shows up on boot. I have not rebooted yet, so I don't know if it will contain more detail later.

Edit: contains the same thing as dmesg

Wayne Sallee
Wayne@WayneSallee.com

Last edited by Wayne Sallee; 07-13-2011 at 03:36 PM.
 
Old 07-13-2011, 02:57 PM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look in
Code:
/etc/sysconfig
if boot logging is enabled.
The boot log file(s) are located at /var/log/boot.log

Kind regards
 
Old 07-13-2011, 03:28 PM   #8
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by repo View Post
Take a look in
Code:
/etc/sysconfig
Ok sysconfig is a folder,,,,,,,,,

Wayne Sallee
Wayne@WayneSallee.com
 
Old 07-18-2011, 02:01 PM   #9
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
Anyone know of a way to get Linux to log all of the output that you see on the screen at boot?

It would sure beat having to dig through all of the different log files trying to find what was seen while it was booting.

Wayne Sallee
Wayne@WayneSallee.com
 
Old 07-19-2011, 02:58 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi Wayne,

Can you check first if you have bootlogd installed by running:
Code:
which bootlogd
If you have it installed you should be able to configure it through /etc/sysconfig (I don't know Mandriva but there should be a file in that directory to configure bootlogd). Another option, if you have it installed, is indicated in this post.

Kind regards,

Eric
 
Old 07-19-2011, 02:18 PM   #11
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by EricTRA View Post
Hello,

What distro and version are you using? Check if you have a file /etc/default/bootlogd (Debian based distro does). In that file change the setting
Code:
BOOTLOGD_ENABLE=No
to
Code:
BOOTLOGD_ENABLE=Yes
and on your next boot everything should be getting logged into /var/log/boot. Hope it helps.

Kind regards,

Eric
Ok in Mandriva the file is:
/etc/sysconfig/bootlogd
so change BOOTLOGD_ENABLE=No to:
BOOTLOGD_ENABLE=yes

But if you look at the man files for bootlogd:
http://www.tin.org/bin/man.cgi?section=8&topic=bootlogd
there are options availale,,, so,,,,
In Mandriva the sh file that runs bootlogd is:
/etc/init.d/bootlogd

In that file, I see the code:
Code:
BOOTLOGD_OPTS="-r -c"
Since Mandriva already does a log boot(though not all of it) to /var/log/boot.log I have changed the code to the following:
Code:
BOOTLOGD_OPTS="-r -c -l /var/log/full_boot_log"
to differentiate it from the normal boot.log that mandriva already makes.

Well, now that I've done that, I will restart, and hopefully it does not crash and burn. :-)

But then now I see that there is also a binary file /sbin/bootlogd


Wayne Sallee
Wayne@WayneSallee.com

Last edited by Wayne Sallee; 07-19-2011 at 02:28 PM.
 
Old 07-19-2011, 02:42 PM   #12
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
Well it did not crash an burn, but it accomplished absolutely nothing

Wayne Sallee
Wayne@WayneSallee.com
 
Old 07-21-2011, 12:07 PM   #13
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
I edited /etc/init.d/bootlogd again and changed
Code:
BOOTLOGD_OPTS="-r -c -l /var/log/full_boot_log"
back to
Code:
BOOTLOGD_OPTS="-r -c"
and added the following to the start of the code to see if it was running

Code:
echo "*******************************************************************************************
********************************************************************************************
***********************************************************************************************
Starting boot log ***********************"
echo "*******************************************************************************************
********************************************************************************************
***********************************************************************************************
Starting boot log ***********************"
echo "*******************************************************************************************
********************************************************************************************
***********************************************************************************************
Starting boot log ***********************"
echo "*******************************************************************************************
********************************************************************************************
***********************************************************************************************
Starting boot log ***********************"
but I never saw it on the boot.

Wayne Sallee
Wayne@WayneSallee.com
 
Old 07-21-2011, 12:25 PM   #14
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
So now I edited /etc/init.d/bootlogd
and changed
Code:
# Because bootlogd is broken on some systems, we take the special measure
# of requiring it to be enabled by setting an environment variable.
to
Code:
# Because bootlogd is broken on some systems, we take the special measure
# of requiring it to be enabled by setting an environment variable.

# that's crazy, just run and exit
./sbin/bootlogd & exit 0
# by
I'll see how that works. :-)

Wayne Sallee
Wayne@WayneSallee.com
 
Old 07-21-2011, 12:35 PM   #15
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Original Poster
Rep: Reputation: 17
I still get nothing.

Wayne Sallee
Wayne@WayneSallee.com
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red hat not displayed in boot options miteshpant Linux - General 1 12-16-2010 07:09 AM
Time displayed incorrectly after win7 duel boot setup chas Debian 3 09-30-2010 12:38 AM
Will too many penguins at boot time wrap until all are displayed? Shingoshi Linux - Hardware 3 06-06-2009 06:45 PM
Just installed SUSE 10.0 - on boot screen is black with GRUB displayed in corner ricardo_123 Linux - General 1 10-17-2007 03:08 PM
Info displayed to screen at boot stored somewhere? jfi Linux - Newbie 3 12-03-2003 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration