Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there anywhere in the ubuntu (or linux in general) logs which can record a computer booting up and the OS failing to load, due to a problem encountered during the boot stage?

share|improve this question
add comment

4 Answers 4

While I'll find Shekhar Raut answer correct, I think the list could be a bit shorther.

Since OP is asking about booting and nothing else - kernel logs in Linux (in general) can be found at:

/var/log/messages

So, if you have a boot failure due to some hardware problem, this should be the first place to look at.

Update:

Looks like Ubuntu removed this log file since 12.04 (not confirmed), and now the right place to look for the system logs is:

/var/log/syslog
share|improve this answer
    
there is no such file in ubuntu 13.10 –  rubo77 Mar 31 at 12:05
    
Thanks, updated. –  Andrejs Cainikovs Mar 31 at 15:45
add comment

Starting with Ubuntu 12.04 (AFAIK), there is /var/log/boot.log, which logs the output from early boot.

share|improve this answer
    
That doesen't contain all the information that was written during boot –  rubo77 Mar 31 at 12:06
add comment

you can check it into

/var/log

This directory has all types of logs

/var/log/auth.log

Record of all logins and logouts by normal users and system processes.

/var/log/btmp

Log of all attempted bad logins to the system. Accessed via the lastb command.

/var/log/debug

Debugging output from various packages.

/var/log/dmesg

Kernel ring buffer. The content of this file is referred to by the dmesg command.

/var/log/gdm/

GDM log files. Normally a subset of the last X log file. See /var/log/xdm.log for mode details.

/var/log/kdm.log

KDM log file. Normally a subset of the last X log file. See /var/log/xdm.log for more details.

/var/log/messages

System logs.

/var/log/pacct

Process accounting is the bookkeeping of process activity. The raw data of process activity is maintained here. Three commands can be used to access the contents of this file dump-acct, sa (summary of process accounting) and lastcomm (list the commands executed on the system).

/var/log/utmp

Active user sessions. This is a data file and as such it can not be viewed normally. A human-readable form can be created via the dump-utmp command or through the w, who or users commands.

/var/log/wtmp

Log of all users who have logged into and out of the system. The last command can be used to access a human readable form of this file. It also lists every connection and run-level change.

/var/log/xdm.log

XDM log file. Normally subset of the last X startup log and pretty much useless in light of the details the X logs is able to provide us with. Only consult this file if you have XDM specific issues otherwise just use the X logfile.

/var/log/XFree86.0.log, /var/log/XFree86.?.log

X startup logfile. An excellent resource for uncovering problems with X configuration. Log files are numbered according to when they were last used. For example, the last log file would be stored in /var/log/XFree86.0.log, the next /var/log/XFree86.9.log, so on and so forth.

/var/log/syslog

The 'system' log file. The contents of this file is managed via the syslogd daemon which more often than not takes care of all log manipulation on most systems.
share|improve this answer
    
Can you just confirm if i turned on my box and the OS didn't load up because, say a hardware fault, this would be captured in one of the logs above? Is messages.log the one which would record this? –  David Jun 2 '12 at 16:02
    
@davide not every time... if it is grub or the hdd or somethign with a cable that is the problem you will get an on-screen message. This will not be recorded into a log file. –  Rinzwind Jun 2 '12 at 17:14
    
@Rinzwind, would something be captured to show that the startup did not succeed? –  David Jun 2 '12 at 18:20
    
@david nope. Unless you get a digital camera and make a pixs yourself. But those errors are very rare. –  Rinzwind Jun 2 '12 at 18:40
add comment
/var/log/kern.log 

contains the logs produced by the kernel during boot. after boot there is nearly no event added but you will see the uptime on each entry

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.