View Full Version : HOWTO: Log Boot Messages
Sephiriz
July 18th, 2005, 03:53 PM
At times I find it very difficult to see what has succesfully loaded or not during boot up, and at those times I wish I could have a log to look over in calm. After inquiring, someone (namely Nequeo) discovered this logging functionality.
Here's how to set it up:
You need to enable boot logging by opening a terminal and typing the following:
$ sudo gedit /etc/default/bootlogd
The text editor will open, and the following will be show:
# Run bootlogd at startup ?
BOOTLOGD_ENABLE=No
Change BOOTLOGD_ENABLE to yes
Now, everytime you restart, /var/log/boot will be created, and it will contain a log of all your boot messages. You need to be root to open it, so you can easily open it up again with sudo.
All thanks go to Nequeo for figuring this out, he also added the following:
NOTE: On my machine, I get a message on my screen during boot saying that the boot log has failed. But it was lying, the boot log worked just fine.
ALSO NOTE: The boot log will be full of lines like this '^[[A^[[74G[ ok ]'. All that 'garbage' is just the color code used to display the text as white or red during boot. It seems to get captured along with all the rest of the text.
So there you have it! This is a really useful feature, and I was slightly surprised that this was disabled by default.
renoir98
July 18th, 2005, 05:04 PM
This is a really useful feature, and I was slightly surprised that this was disabled by default.
Totally agreed!
raphha
September 29th, 2005, 05:47 PM
Very helpful indeed, thank you Sephiriz :-)
raph
henriquemaia
September 30th, 2005, 02:14 AM
Very helpful! Thanks a lot.
mlomker
September 30th, 2005, 02:31 AM
I was looking for this the other day and couldn't find it. I assumed that since it was running out of rcS.d that it must just be the kernel.log or something.
As I open a terminal to read through ALL of the files in /etc/default...
Marcos.Rufino
February 26th, 2006, 02:05 AM
Totally agreed!
For Christ sake!! I've lost hours trying to figure out where I could read the boot log. I really don't know why the developers disabled this log. Thanks!
Peepsalot
July 4th, 2006, 05:10 PM
Hmm, I tried this and rebooted, but I see no boot file in /var/log
Any ideas what is going on?
There is a bootstrap.log, but I don't think that is the same thing.
jfdill_2
July 7th, 2006, 07:35 PM
bootlogd seems to be borked:
bootlogd: cannot find console device 136:0 in /dev
Trying this to start it up before udev:
update-rc.d -f bootlogd remove
update-rc.d bootlogd defaults 08
Update: Yeah, that fixed it for me.
UeB
August 21st, 2006, 07:35 PM
Hallo!
i also want to use this usefull feature.
but after changing
BOOTLOGD_ENABLE=No
to
BOOTLOGD_ENABLE=yes
in /etc/default/bootlogd
and rebooting twice still no file nameed "boot" exists in /vat/log or anywhere on the hard disk (after serching for "boot")
anybody have an idea why?
thanks!
PS i use the dapper version of ubuntu i dont know if this makes a difference...
Cariboo1938
August 27th, 2006, 02:25 AM
Hmm, I tried this and rebooted, but I see no boot file in /var/log
Any ideas what is going on?
There is a bootstrap.log, but I don't think that is the same thing.I have the same problem....I can't find a "boot"file in /var/log either, actually nowhere on the HDD!
Can anybody help us to find it?:wink:
Cariboo1938
August 28th, 2006, 06:51 AM
bootlogd seems to be borked:
bootlogd: cannot find console device 136:0 in /dev
Trying this to start it up before udev:
update-rc.d -f bootlogd remove
update-rc.d bootlogd defaults 08
Update: Yeah, that fixed it for me.Hi jfdill_2!
Please, can you give more details? What means "borked"? Are these code lines? Where is the log file to find?
Cariboo1938
September 7th, 2006, 05:01 AM
At times I find it very difficult to see what has succesfully loaded or not during boot up, and at those times I wish I could have a log to look over in calm. After inquiring, someone (namely Nequeo) discovered this logging functionality.
Here's how to set it up:
You need to enable boot logging by opening a terminal and typing the following:
$ sudo gedit /etc/default/bootlogd
The text editor will open, and the following will be show:
# Run bootlogd at startup ?
BOOTLOGD_ENABLE=No
Change BOOTLOGD_ENABLE to yes
Now, everytime you restart, /var/log/boot will be created, and it will contain a log of all your boot messages. You need to be root to open it, so you can easily open it up again with sudo.
All thanks go to Nequeo for figuring this out, he also added the following:
So there you have it! This is a really useful feature, and I was slightly surprised that this was disabled by default.Does this only work for Ubuntu Hoary 5.04? Does somebody know what has to be done for Dapper 6.06??:-k
Using Ubuntu Dapper 6.06.
There are several log files in /var/log:
1) /var/log/messages (shows activities over a longer period of days)
2) /var/log/dmesg (is the log file from booting the system)
3) /var/log/syslog (in my case it showed today's activities)
Cariboo1938
September 8th, 2006, 10:54 PM
Hmm, I tried this and rebooted, but I see no boot file in /var/log
Any ideas what is going on?
There is a bootstrap.log, but I don't think that is the same thing.
Look for /var/log/dmesg
Cariboo1938
September 8th, 2006, 10:57 PM
Hallo!
i also want to use this usefull feature.
but after changing
BOOTLOGD_ENABLE=No
to BOOTLOGD_ENABLE=yes
in /etc/default/bootlogd and rebooting twice still no file nameed "boot" exists in /vat/log or anywhere on the hard disk (after serching for "boot")
anybody have an idea why?
thanks!
PS i use the dapper version of ubuntu i dont know if this makes a difference...
Look for /var/log/dmesg
henriquemaia
September 25th, 2006, 01:57 PM
It works on mine, so it's still valid.
Here's a sample of my /var/log/boot
Mon Sep 25 13:50:21 2006: ^[[74G[ ok ]
Mon Sep 25 13:50:22 2006: ^[[74G[ ok ]Common Unix Printing System: cupsd ^[[80G
Mon Sep 25 13:50:23 2006: Starting MySQL database server: mysqld.
Mon Sep 25 13:50:25 2006: .
Mon Sep 25 13:50:26 2006: ^[[74G[ ok ]powernowd... ^[[80G
Mon Sep 25 13:50:26 2006: ^[[74G[ ok ]OpenBSD Secure Shell server... ^[[80G
vivekdn
October 18th, 2006, 11:05 AM
You will need to start bootlogd service to get the messages in /var/log/boot
jdbartlett
April 12th, 2007, 05:34 PM
I had the same issue as jfdill in Xubuntu 6.06, and I suspect I suspect those of you who still don't see a "boot" log in /var/log have the same issue: bootlogd isn't correctly (or at all) symlinked in /etc/init.d
I tried the following from bash:
jdbartlett@bob: update-rc.d -f bootlogd remove
This forces removal the booglogd daemon start script from the init script links, even though it's still present ("f"=="force").
jdbartlett@bob: update-rc.d bootlogd defaults
This adds it back in for default runlevels.
After a restart, /var/log/boot is all nice and populated.
You can read about update-rc.d by typing:
jdbartlett@bob: man update-rc.d
And in the Debian Policy Manual:
http://www.us.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3.1
Hope that's some help.
searchelite
June 3rd, 2007, 10:28 AM
Hi all, i have a problem here.
I already enabled bootlogd=Yes, but i always found (nothing has been logged yet) in /var/log/boot. How can i fix this? Thx
tfejos@gmail.com
June 3rd, 2007, 06:03 PM
Hi!
Hi all, i have a problem here.
I already enabled bootlogd=Yes, but i always found (nothing has been logged yet) in /var/log/boot. How can i fix this? Thx
If you use Feisty maybe you have this bug:
https://bugs.launchpad.net/upstart/+bug/98955
I'm wating for fixing this also.
searchelite
June 3rd, 2007, 09:18 PM
thx for ur reply tfejos@gmail.com...
So this is a bug and still not fix yet...I gues i'm just wating for the fix :(
CheShA
June 23rd, 2007, 12:05 AM
Anyone having problems with this on Dapper/Edgy/Feisty see this thread (http://http://ubuntuforums.org/showthread.php?t=478225&highlight=bootlogd)
tgbrowning
July 26th, 2007, 04:49 AM
At the risk of sounding like a complete dweeb, I go to the terminal and type in $ sudo gedit /etc/default/bootlogd and get:
Command not found.
Jeez. I don't need any more frustration as this point.
Browning>>>
GaryAndersonMissed
August 3rd, 2007, 02:13 PM
mr browning... you do not have gedit. Try replacing gedit with VI in the command.
if that does not work do a
sudo aptitude intall vi
Yes
September 5th, 2007, 10:06 PM
When I go to the /var/log/boot file, it says "(Nothing has been logged yet.)". Any reason why this might be?
Thanks.
Hecabe
October 18th, 2007, 02:36 AM
I found a different solution.
Use the command dmesg.
- You might have to install it with:
sudo apt-get install dmesg
Then:
dmesg > dmesg.txt
gedit ./dmesg.txt
If you want to know more about dmesg, type in terminal:
man dmesg
Have fun reading the log.
Best regards from Mexico!
Hecabe
airencracken
January 7th, 2008, 09:28 PM
This did not work for me in gutsy. Any other suggestions?
BLTicklemonster
January 26th, 2008, 06:38 AM
I found a different solution.
Use the command dmesg.
- You might have to install it with:
sudo apt-get install dmesg
Then:
dmesg > dmesg.txt
gedit ./dmesg.txt
If you want to know more about dmesg, type in terminal:
man dmesg
Have fun reading the log.
Best regards from Mexico!
Hecabe
Wow. Running gutsy, and got a nice readout.
I have a long boot time, so what can I do with this information? Where can I post it so someone might be able to peruse it and educate me as to what I can do to decrease my boot time?
Thanks for de message about dmesg, by the way. :)
pseudonym
January 31st, 2008, 03:32 PM
The info dmesg gives you is not the same as what bootlogd used to give you. Instead, it's essentially the same log info as you find in /var/log/messages or /var/log/syslog ie. kernel messages.
Unfortunately, due to some nasty bugs, bootlog has been disabled in Ubuntu since Feisty. See here (https://bugs.launchpad.net/upstart/+bug/98955) for details.
DioSonoIo
February 21st, 2008, 02:06 PM
Very helpful! Thanks a lot.
:KS
sujoy
April 30th, 2008, 03:24 PM
...
So there you have it! This is a really useful feature, and I was slightly surprised that this was disabled by default.
thanks its really helpfull
metrorat
June 3rd, 2008, 01:03 PM
This is an old thread but thought I'd throw something in which might aid peoples searches. I'm running Hardy and the boot messages seem to go to /var/log/messages afterwards being archived in .gz format.
/var/log/boot just says nothing logged yet and doesn't seem to want to log anything.
CentralX
July 2nd, 2008, 08:35 PM
Bootlogd is probably never going to work because it seems to be part of the old style sysv-init startup method. Ubuntu migrated to "upstart" a while ago. Proof of this are these messages I get when trying to start bootlogd.
The program 'bootlogd' is currently not installed. You can install it by typing:
sudo apt-get install sysvinit
And when I try to install sysvinit, it wants to remove upstart, which is ofcourse not a very good idea ;):
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
friendly-recovery startup-tasks system-services ubuntu-minimal upstart
upstart-compat-sysv upstart-logd
The following NEW packages will be installed:
sysvinit
0 upgraded, 1 newly installed, 7 to remove and 0 not upgraded.
Need to get 111kB of archives.
After this operation, 647kB disk space will be freed.
Do you want to continue [Y/n]?
So I guess it is deprecated.
burneverything
August 1st, 2008, 11:51 AM
does not work :(
and /var/log/messages doesn't contain anything about the failure of gnome-settings-daemo on startup :(
Brando569
August 5th, 2008, 04:13 AM
read this (https://bugs.launchpad.net/upstart/+bug/98955) and install sergei's modded bootlogd daemon. i had to change the buffer size in bootlog.c (line 52) from the default 32kb to a whopping 975kb to get it to work most of the way though. 32kb would only log about 6 seconds while 975kb logs about 18
artmendez
September 1st, 2008, 05:44 AM
Hello all.
Does this works at all in Hardy?
My boot sequence messed up after downloading and partially being able to install auto upgrades.
Something seems to be broken during the boot sequence. Now I can only boot using a LiveCD, can access most data (which seems to be fine).
I need to generate a boot log in order to map what's going on and/or seek help.
I already set the flag to YES but did not work.
Any ideas?
saludos.
artmendez
September 1st, 2008, 05:46 AM
Let me try this one as the original (setting the flag to generate /var/log/boot) one did not work.
Gracias amigo.
saludos.
birkopf
October 1st, 2008, 06:18 PM
After a restart, /var/log/boot is all nice and populated.
Doesn't work for me :(
I have 64bit, Kubuntu, Hardy 8.04.
Instructions are OK in the konsole, but after restart bootlog still doesn't exist :confused:
walkingthecow
October 2nd, 2008, 04:13 AM
How is this any different than "dmesg | more" ?? Why do I want to enable a daemon when I can just do a dmesg?
east2idaho
November 12th, 2008, 02:38 PM
You might want to consider setting up a serial console:
http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/
It does not look like there is currently a good solution in Ubuntu for logging the boot messages. However, even if we are eventually provided a good system for logging the boot messages, if you are experiencing a severe hardware problem you may find that the system crashes before the boot messages get written. The serial console approach ensures that you get boot messages no matter what is happening to the problem system.
Ghilteras
November 24th, 2008, 03:27 PM
setting up a proper console just to be able to log boot messages (NOT DMESG, they are two differente things) is ridicolous, there should just be an easy way to see boot messages:
for example i have a [Fail] in boot on samba daemon but i can't investigate it because it is not logged anywhere in dmesge or debug/kern/messages logs
i just would love the old boot log, i can't boot on recovery and try to "see" the error in those 2 seconds i get when it's scrolling down can i?
digitalage
January 22nd, 2009, 12:25 PM
hmm... not much action here. I'm curious where are those linux freaks who know everything...
jfdill_2
January 22nd, 2009, 08:35 PM
Well... I was trying to do this to troubleshoot some specific problem, and the problem was fixed, so I lost interest in the topic. When the need arises again, then I will be back.
Oh yeah, serial console as mentioned a few posts back, that is a way that I have done it before. I used minicom from another linux box and turned capture on then powered up the beast, saved capture to a file for further perusal. It's not what I would call convenient, but it works.
Endolith
February 8th, 2009, 12:04 AM
What's the way to do this in Intrepid?
herroy
March 1st, 2009, 05:45 PM
I need to be able to see my servers bootlog to diagnose a problem.
Is there any solution to this in Hardy? As stated previously bootlogd has been broken for some time.
drbrando007
March 19th, 2009, 12:10 AM
OK digital, here's the scoop-
Don't bother messing with the bootlogd switch, it probably depreciated long ago.
One of my installs is an Intrepid 8.1 on a dell lap, this is where you can find the boot log - /var/log/ messages messages.0 messages.1 ...and so on.
I clocked this from the boot one time and it appears to be the complete dump of all of your verbose (non-quiet) boots.
-cheers
dougie173
April 2nd, 2009, 12:10 PM
this is where you can find the boot log - /var/log/ messages messages.0 messages.1 ...and so on.
Unfortunately It doesn't log all the console messages in there.
I need to see the full details as there are some unsavory messages that flash past too quick to see and they are not logged in /var/log/messages.
Is there any way to increase the verbosity so that it logs all messages?
petteriIII
April 2nd, 2009, 01:10 PM
Pressing CTRL-s is supposed to pause the scrolling also when booting. In my machine it doesn't operate at all without messing with the speed of core in BIOS (that GHz thing) and even then it is not perfect, but it helps sometimes – it helped me to see what I wanted.
Scrolling is continued by pressing CTRL-z.
BrainwreckedTech
May 20th, 2009, 10:21 AM
The CTRL+S AND CTRL+Z worked for me, but it should be noted that it doesn't work with usplash. I used startup-manager to disable the boot splash, rebooted, and waited for the red [fail] to appear. Turns out that upgrading from Windows 7 Beta to Windows 7 RC changed the vol_id and that's what the startup messages where trying to tell me.
glotz
May 20th, 2009, 11:38 AM
$ sudo gedit /etc/default/bootlogdYou should use gksu with graphical programs instead of sudo.
Edit: Holy old thread Batman!
pgn674
October 24th, 2010, 01:34 AM
It hasn't been mentioned yet, so I'll mention it here. For me at least, when /var/log/boot.log is enabled, it doesn't get everything, just the early messages. To see the later stuff, press Ctrl+Alt+F1 after Ubuntu has finished starting up. To get back to your regular screen, press Alt+F7.
I don't know why it switches from printing to the boot.log file to printing to tty1, but the two together seem to paint a pretty complete startup log.
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.