Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
No logs are to be found /var/log. I am building custom OS and something keeps going wrong. I should be able to fix problem myself, but I need to know what caused the problem. I have about second to read error messages. Then system is down. Any ideas?
Start by reading this - zero info means zero assistance. Simple as that.
All right. Is there a way to capture output of kernel and/or runit (process #1) during boot? Runit fails and shuts system down. Information I need is being printed on screen for fraction of second and I would like to save it to file.
EDIT:
More detalied description. I decided to create OS using Linux-libre kernel for educational purposes.
I compiled the kernel and modules
I compiled glibc and installed it
I compiled and installed coreutils
I compiled and installed runit
I installed some basic programs from util-linux
I chose dash as my shell
As stated above runit doesn't work and I don't expect you to fix it. I must have made a mistake and I want to fix it. I please you to help me to read error messages. They appear on my screen for really short time so I can't read them. I need to freeze screen or log output of kernel and/or runit. How do I achieve this? Directory /var/log is empty.
Last edited by Sentih; 05-08-2019 at 08:39 AM.
Reason: To fix spelling mistake
The kernel doesn't write logs. syslogd and klogd do. Check your /etc/syslog.conf file. It determines where logged data goes. The one I have on LFS says:
Code:
# Begin /etc/syslog.conf
auth,authpriv.* -/var/log/auth.log
*.*;auth,authpriv.none -/var/log/sys.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
*.emerg *
# End /etc/syslog.conf
The kernel only writes to its internal message ring. These are the messages you read with the dmesg command. The logs in /var/log are written by the twin daemons installed from the sysklogd package. klogd takes the output off the message ring and stores it in files, while syslogd does the same with output from daemons. If you haven't installed these packages, you won't have any messages except the boot messages at the system console.
If you think about it, the kernel can't write messages to disk because it has to be able to run before any discs are mounted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.