LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Explore linux's booting messages (https://www.linuxquestions.org/questions/linux-general-1/explore-linux%27s-booting-messages-4175579394/)

rocket42 05-10-2016 02:37 AM

Explore linux's booting messages
 
1 Attachment(s)
hello everyone
I am building my own custom OS
when I build it completely
I boot it on my laptop.
but I don't understand "booting messages". I captured and attached it in this post(please view it in attached file)
let's me consider a message: [0,637086] ata2: SATA link up 1.5 Gbps....
so what is [0,637086] ?

pan64 05-10-2016 02:44 AM

that is the time in seconds from the start

rocket42 05-10-2016 02:48 AM

Quote:

Originally Posted by pan64 (Post 5543030)
that is the time in seconds from the start

you mean that it is time from kernel is decompressed

Elizine 05-10-2016 06:15 AM

Explore linux's booting messages
 
Most of the boot messages are put in a buffer, that you can access using the command dmesg. On most Linux distributions, that output is also stored in

Code:

/var/log/dmesg.log
That you can view with

Code:

tail -n 100 /var/log/dmesg.log

onebuck 05-10-2016 07:49 AM

Member response
 
Hi,

Quote:

Originally Posted by Elizine (Post 5543111)
Most of the boot messages are put in a buffer, that you can access using the command dmesg. On most Linux distributions, that output is also stored in

Code:

/var/log/dmesg.log
That you can view with

Code:

tail -n 100 /var/log/dmesg.log

If you look at the following then one would read from '/var/log/dmesg'.
From http://tldp.org/LDP/LG/issue59/nazario.html
Quote:

Abstract

Often someone will write to a Linux help list asking for help with a particular device they want to get working under Linux, and a standard reply is "check the output of the dmesg command". This leaves a lot of new users befuddled, and this document is here to hopefully help them navigate this powerful debugging tool. Two sets of kernel boot messages are presented and annotated, from an i386 system and a Linux-Pmac system.

Introduction

The Linux kernel is the central interface between the user and the hardware. As such, it has to incorporate support for hardware if you are to use it. Often, though, cryptic device names are used by the system, making it difficult at first inspection to determine if some particular hardware is supported. The command 'dmesg', which is used to print kernel messages, is very useful in determining if a piece of hardware has been found, and if so, what the system is referring to it as.
This artcle, including the title and format of the dmesg comments, were directly inspired and copied from the OpenBSD Explained article by the same name. I felt one on Linux would be useful for people.
The manpage for dmesg is quite simple:
DMESG(8) DMESG(8) NAME dmesg - print or control the kernel ring buffer SYNOPSIS dmesg [ -c ] [ -n level ] [ -s bufsize ] DESCRIPTION dmesg is used to examine or control the kernel ring buffer.
Upon boot, the dmesg output is from the kernel booting, showing the devices it has found and if it has been able to configure them at all (aside from userland configuration). This log is also available in the file /var/log/dmesg.
Hope this helps.
Have fun & enjoy!
:hattip:

onebuck 05-10-2016 07:57 AM

Member response
 
Hi,

I think you will find the use of 'syslogd' helpful;
Quote:

From 'man syslogd';
sysklogd - Linux system logging utilities.

SYNOPSIS
syslogd [ -a socket ] [ -d ] [ -f config file ] [ -h ] [ -l hostlist ] [ -m interval ] [ -n ] [ -p socket ] [ -r ] [ -s domainlist ] [ -v ]

DESCRIPTION
Sysklogd provides two system utilities which provide support for system logging and kernel message trapping. Support of both internet and
unix domain sockets enables this utility package to support both local and remote logging.

System logging is provided by a version of syslogd(8) derived from the stock BSD sources. Support for kernel logging is provided by the
klogd(8) utility which allows kernel logging to be conducted in either a standalone fashion or as a client of syslogd.

Syslogd provides a kind of logging that many modern programs use. Every logged message contains at least a time and a hostname field, nor-
mally a program name field, too, but that depends on how trusty the logging program is.

While the syslogd sources have been heavily modified a couple of notes are in order. First of all there has been a systematic attempt to
insure that syslogd follows its default, standard BSD behavior. The second important concept to note is that this version of syslogd
interacts transparently with the version of syslog found in the standard libraries. If a binary linked to the standard shared libraries
fails to function correctly we would like an example of the anomalous behavior.

The main configuration file /etc/syslog.conf or an alternative file, given with the -f option, is read at startup. Any lines that begin
with the hash mark (``#'') and empty lines are ignored. If an error occurs during parsing the whole line is ignored.
Hope this helps.
Have fun & enjoy!
:hattip:

rocket42 05-10-2016 10:47 AM

i don't understand why onebuck moderator close this thread:
http://www.linuxquestions.org/questi...ed-4175579395/
that thread is different to this thread.
If booting is successfully. you can get booting information in /var/log/ folder
but my booting is not successfully. it is hanged
After it is hanged, I checked /var/log/ folder, this folder is empty

onebuck 05-10-2016 10:55 AM

Moderator response
 
That thread was closed since you are asking basically the same here.

rocket42 05-10-2016 11:05 AM

Quote:

Originally Posted by onebuck (Post 5543281)
That thread was closed since you are asking basically the same here.

I think you are wrong
because when you switch to this thread, anyone think that booting process is successfully
but my question in closed thread is "how to logging message when booting is not successful"

onebuck 05-10-2016 12:16 PM

Moderator response
 
You should get this thread back on topic. If you wish to have information for a successful or non-successful boot, you would use the utilities I suggested.

I have stated my reasons for closing http://www.linuxquestions.org/questi...ed-4175579395/ so you should take the suggestion to how to gather information for either condition.

rocket42 05-11-2016 03:59 AM

Ok, thank you
so, when booting is hanged.
how to view more messages or logging all messages

pan64 05-11-2016 04:02 AM

in that case probably you need to boot another os (livecd?) and check original logfiles.

rocket42 05-11-2016 10:21 AM

Quote:

Originally Posted by pan64 (Post 5543680)
in that case probably you need to boot another os (livecd?) and check original logfiles.

where is "original logfiles"? do you mean /var/log in root filesystem of my own os?
i checked this folder. it is empty

pan64 05-11-2016 10:55 AM

did you try to increase log level? did you try to boot into recovery mode?

rocket42 05-11-2016 11:43 AM

Quote:

Originally Posted by pan64 (Post 5543857)
did you try to increase log level?

I increased loglevel up to 7 (loglevel=7). After booting, i rechecked this folder, but it is still empty
Quote:

Originally Posted by pan64 (Post 5543857)
did you try to boot into recovery mode?

i don't know how to boot into recovery mode. please show me? thanks


All times are GMT -5. The time now is 02:59 PM.