[ale] Can't run kernel: Unable to mount root -- Solved and painful

Omar Loggiodice ologgio at vrainn.com
Fri May 17 22:52:14 EDT 1996


Zot O'Connor Writes :
:
:Eric wrote:
:> 
:> That would be some trick... writing the error to the  syslog file when
:> it can't even find the disk!
:>

  :-) <BIGGRIN>

:
:Yes but where doe sit go?  I mean does the kernel syslog it and syslog 
:happily wait to read its syslog.conf and then find the disk?
:
:Does the kernel store it and then hand it to syslog (cuz syslog ain't 
:even run yet!
:

As Eric was implying it is -- obviously -- not written to disk because:
1.- Syslogd is not running and 
2.- The kernel doesn't have a driver to communicate with 
your SCSI controller).
3.- All kernel messages with priority level lower than 7 (KERNEL_DEBUG)
are written to the console. klogd can change the threshold level, if you'd
like another arrangement. You can look in include/kernel.h, to see all the
message priority levels used by the kernel. 


I'll explain briefly how the message logging system works, hopefully it will
help you to understand what happens with log messages. In general (from the
syslogd and klogd point of view) you have three possible sources of log
information:

a.- Information written to a UNIX domain socket
b.- Information written to an Internet socket
c.- Log messages generated by the kernel

a and b are not generated by the kernel, but by user-space application.
Since in your case the root filesystem has not been mounted, the only kind
of log message you are going to see are kernel-generated log messages.

The kernel keeps an internal 8K buffer to hold log messages (as of
pre2.0.5). User-space applications (klogd, syslogd) read these messages and
write it to a file or print them on the console. In older (ancient) versions
of the kernel, syslogd read the kernel messages and logged them in a file or
printed them to the console depending on your syslog.conf file. Nowdays
there is another daemon called klogd that reads kernel messages, and
depending on the priority level, prints them to the console or passes them
to syslogd. Type man klogd for more info. 

   As you can see, the management of kernel log messages is done by
user-space applications, such as syslogd and klogd. However --as you might
expect-- the kernel has a default behaviour: Any kernel log message (which
means any message printed by the printk kernel function) with a priority
level lower than KERNEL_DEBUG (7) will be printed to the console. In other
words, you will see all the kernel error messages printed to the console
(since klogd and syslogd are not running).

Moreover, those messages are printed by the kernel (like the
"Unable to mount root..." message) and, obviously,  not by syslogd or klogd. 

Hopefully this helped to clear up things a bit. (I have the slight suspicion
that I probably confused you more <grin> ).

Best regards,
   Omar

PS. Note that I didn't touch on the other kind of log messages processed by 
syslogd (those whose source are  internet and UNIX domain sockets). 

:Enquiring Minds want to know....
:
:-- 
:Later,
:ZOT                                                        zot at crl.com
:Home Page:   http://www.crl.com/~zot/home.html
:Improv Page: http://www.crl.com/~zot/improv.html
:


-- 
____________________________________________________________________
            /   __  __  __  - __  __ / - _  __  ologgio at vrainn.com
  Omar R.  /__ /_/ /_/ /_/ / /_/ /_/ / /_  /-_  CIS: 74040,1543
                  __/ __/                         
___C++/6_yrs____Virtual Reality/4_yrs____Vorl_____Linux(free)_______
Linux: A Unix OS for _you_ ...ftp://sunsite.unc.edu/pub/Linux






More information about the Ale mailing list