1

I'm trying to understand all the text that screams by when my server boots up. Is that really intended to be human readable? About how many lines scream by? Is there a way I can count them? Is there an overall structure to what screams by (e.g. kernel, hardware recognized, network recognized, overall OS coming up)?

  • They get logged to /var/log/dmesg, /var/log/syslog and others depending on which line is the output of what. They're human readable in that way. They're shown on the screen during boot-up, so that if it hangs during boot-up you can tell what went wrong (hopefully). – marinus Apr 20 '15 at 5:16
  • 3
    It's not for humans, it's for programmers. – Arkadiusz Drabczyk Apr 20 '15 at 5:19
2

Looking around a little for this answer pointed me to another Stack Exchange post. I tried the files suggested there until I got to /var/log/boot.log, which held the relevant information.

username@host ~ $ cat /var/log/boot.log

So then to count the number of lines output:

wc -l /var/log/boot.log 
1

Once the system has started, you can use the dmesg command (maybe better dmesg | less) to read the kernel ring buffer. This buffer will include the messages during the boot if you use them just after it. Also, you can read /var/log/boot.log and /var/log/messages (or /var/log/syslog, deppending on your Linux distribution).

  • dmesg is limited. I'm trying to count more lines than dmesg can keep a history of. – tarabyte Apr 20 '15 at 6:13
  • Well... dmesg is a ring buffer. But just after your system starts, it should contain all the information you need. Anyway, if you start in text mode, with grubs "noquiet" mode (no graphical boot screen, no boot "loadingbar", etc), and you don't switch to a different virtual terminal (you don't use Alt+FX) you can use Ctrl+PgUp to go up and read all the info that was written on the screen. – sromero Apr 20 '15 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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