----- Original Message -----

From: "Bruce Dubbs" <[email protected]> 
To: "LFS Support List" <[email protected]> 
Sent: Wednesday, July 30, 2014 6:44:41 PM 
Subject: Re: [lfs-support] LFS 7.5 klogd issue 

Michael F. Trombley jr. wrote: 

> From: "Bruce Dubbs" <[email protected]> 

> Michael F. Trombley jr. wrote: 
>> This happens when I first turn the computer on. 
>> Klogd hangs after syslogd is started. 
>> When I try to start klogd from the command-line and do a ps aux | grep klogd 
>> it shows the process is defunct. 
>> /var/log/kern.log do exists. 
>> Directory permissions are 755 for /var/log. 
>> Permissions for kern.log are 664. 
>> The klogd process is not currently running. 

> 
> All that, except for the part about klogd not running seems to be fine. 
> 
> Try (as root) "/sbin/klogd -x -n -d" 
> 
> About the only other thing I can suggest is to use gdb on it to see 
> where it is failing. 

Please also trim your post. You included the footer and that makes it 
difficult to reply as by default everything below the footer is not quoted. 

> When I try what you suggested: 
> as root /sbin/klogd -x -n -d 
> I get: 
> Can't Lock. Lock is held by PID 0. 
> Line: Kernel log daemon terminating. 
> Priority: 6 

That's interesting. Are you using systemd? PID 0 is the init program. 

Is the /etc/inittab the unmodified version in the book? 

Looking through the source for sysklog, the message "Can't lock..." 
(note lower case L) is in pidfile.c. The file /run/syslogd.pid should 
exist and since /run is a tmpfs, should start at each boot as empty. 

Do you have 
$ mount|grep run 
tmpfs on /run type tmpfs (rw,relatime) 

Try deleting /run/syslogd.pid and then starting klogd. 

-- Bruce 
Sorry I misspelled some words. 
Hello Bruce. Thanks for your help. 
I have solved the problem. 
I did not have enable dynamic printk() support compiled into the kernel. 
For some reason, this was not set by default. 
If anyone else has this issue, in the Linux Kernel configuration go to: 
Kernel Hacking --> 
Printk() and dmesg options --> 
Enable dynamic printk() support = Y. 
Show timing information on printk() = Y 
The last option may not be needed. I enabled it just to be safe. 

The system is now starting Syslogd and Klogd normally and is logging 
to the correct /var/log/ files. 
Thanks again for your suggestions. 
Mike 

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support 
FAQ: http://www.linuxfromscratch.org/blfs/faq.html 
Unsubscribe: See the above information page 

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to