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?
you can check it into
This directory has all types of logs
Record of all logins and logouts by normal users and system processes.
Log of all attempted bad logins to the system. Accessed via the lastb command.
Debugging output from various packages.
Kernel ring buffer. The content of this file is referred to by the dmesg command.
GDM log files. Normally a subset of the last X log file. See /var/log/xdm.log for mode details.
KDM log file. Normally a subset of the last X log file. See /var/log/xdm.log for more details.
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).
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.
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.
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.
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.
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.
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:
So, if you have a boot failure due to some hardware problem, this should be the first place to look at.
Looks like Ubuntu removed this log file since 12.04 (not confirmed), and now the right place to look for the system logs is: