LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-25-2007, 01:25 PM   #1
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
can't open or create /var/run/klogd.pid failed


I recently moved my tmp and var directories from under / to a shared partition of their own. All went well at first sight, but now I'm having this error message while booting:

<notice>boot.klog start
Creating /var/log/boot.msg
Can't open or create /var/run/klogd.pid.
failed
<notice>killproc: kill(738,29)
<notice>'boot.klog start' exits with status 0

It's taking longer for the system to boot into Gnome or KDE, by the way (it really flew before, now it's taking about thirty seconds).

I checked /var/run and noticed that there effectively wasn't any such file. I manually created one, just to see what would happen, but it had disappeared again the next time I booted.

Then I tried setting /var/run to 770 in single-user mode. After another reboot, I got the same error message even though this time the file was duly created by the system. Also, the permissions on /var/log were back at 644.

Right now, the system is once more failing to put klogd.pid in /var/run.

Am I right to assume that this is essentially a matter of correct permissions? If so, how could I make them stick? And if not, would there be any other solution?
 
Old 02-26-2007, 04:53 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I don't know if I can help you, but for me -- or anybody else -- to help you, you might want to to post some more info ...

For starters, what distro are you using? You said you moved /var and /tmp to a shared partition of their own. By this, do you mean you created these directories on another partition and created symlinks to them? Do you mean something else?

Is this "shared partition" automatically mounted (as directed by /etc/fstab), and is it getting mounted rw?
 
Old 03-01-2007, 06:07 AM   #3
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Original Poster
Rep: Reputation: 133Reputation: 133
Hello,

Thanks for your reply. This is just a quick note to let you know that the issue seems to be solved.

Yes, I put /tmp and /var on a single shared partition exactly as you described. The procedure appears to work very well for Gentoo (which is where I got my information) but this was on Suse. I moved my home and tmp partitions without a problem but var was something else.

Anyway, I tried quite a few tricks, including reinstalling sysklogd and klogd, until I saw a pattern to it: it seemed as if something was actually protecting /var/run from being written to. I didn't find anything useful on the net but a few blogs vaguely mentioned AppArmor. All I had to do, it turns out, was run AppArmor and change permissions for klogd.pid.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no pid file in /var/run for programs wolfe2554 Linux - Software 5 01-01-2007 12:02 AM
/var/run/[XXX].pid - Tcl pid code liguorir Linux - Software 1 05-20-2004 10:32 PM
rm cannot remove /var/run/atd.pid and /var/run/xdm.pid danishmr Linux - Software 1 05-04-2004 08:01 AM
can't lock /var/run/crond.pid robeb Linux - General 0 06-08-2002 12:26 PM
cannot write PID to var/run/news cruella Linux - Newbie 1 01-22-2002 06:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration