View previous topic :: View next topic |
Author |
Message |
jhow n00b
Joined: 17 Aug 2005 Posts: 19 Location: Sydney
|
Posted: Mon Dec 25, 2006 5:33 am Post subject: Cannot create needed directory at boot up [Solved] |
|
|
Hi
I am currently unable to boot into my mythtv box so I am unable to paste any error messages.
Consequently I will describe my problem
I am running the following kernel: kernel-2.6.16-gentoo-r13
At start up I recieve multiple error messages trying to run the initd scripts
The message is basically this
Cannot create needed directory /var/lib/init.d/SCRIPTNAME
Where SCRIPTNAME is basically all initd scripts such as clock, hostname, keywords, localmount etc...
The errors were preceeded by an upgrade to the latest version of udev which required that I remove cold plug.
I can get into a console by using the interactive mode at boot and going straight into a root shell.
From here I can execute scripts for example
Code: |
/etc/init.d/net.eth0 start
|
will start the eth0 interface but it also returns the following error messages including a reference to the recently removed coldplug
Code: |
Cannot create needed directory /var/lib/init.d/softscripts
Cannot create needed directory /var/lib/init.d/exclusive
Cannot create needed directory /var/lib/init.d/exitcodes
Cannot create needed directory /var/lib/init.d/scheduled
Cannot create needed directory /var/lib/init.d/coldplugged
|
I do not know how to fix this problem.
Any ideas would be appreciated
Last edited by jhow on Wed Dec 27, 2006 8:23 am; edited 1 time in total |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Mon Dec 25, 2006 6:00 am Post subject: |
|
|
Have you tried emerge -av sys-apps/baselayout? Another system, such as a live CD, can be used to allow access to the installed environment. |
|
Back to top |
|
|
jhow n00b
Joined: 17 Aug 2005 Posts: 19 Location: Sydney
|
Posted: Mon Dec 25, 2006 6:44 am Post subject: |
|
|
I did as you suggested
doing :
emerge -av baselayout
rebuild baselayout-1.12.6
But did not fix the problem
I think it has something to do with coldplug because I see reference to coldplug in the errors even though I have unmerged coldplug. |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Mon Dec 25, 2006 8:09 am Post subject: |
|
|
Please post the output of ls -ald / /var/ /var/lib/ /var/lib/init.d/ /var/lib/init.d/*. |
|
Back to top |
|
|
jhow n00b
Joined: 17 Aug 2005 Posts: 19 Location: Sydney
|
Posted: Mon Dec 25, 2006 9:50 am Post subject: |
|
|
Ok here is the output from the suggested command
Code: |
ls -ald / /var/ /var/lib/ /var/lib/init.d/ /var/lib/init.d/*
drwxr-xr-x 22 root root 4096 Dec 11 03:26 /
drwxr-xr-x 13 root root 96 Nov 5 21:16 /var/
drwxr-xr-x 21 root root 4096 Nov 10 19:21 /var/lib/
drwxr-xr-x 4294967295 root root 61440 Dec 26 07:28 /var/lib/init.d/
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/daemons
-rw-r--r-- 1 root root 35982 Dec 26 04:37 /var/lib/init.d/depcache
-rw-r--r-- 1 root root 14314 Dec 26 04:37 /var/lib/init.d/deptree
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/failed
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/inactive
-rw-r--r-- 1 root root 4 Dec 26 07:24 /var/lib/init.d/interactive
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/options
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/snapshot
-rw-r--r-- 1 root root 5 Dec 26 07:24 /var/lib/init.d/softlevel
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/softscripts.old
drwxr-xr-x 2 root root 48 Dec 26 07:24 /var/lib/init.d/started
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/starting
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/stopping
drwxr-xr-x 2 root root 1 Dec 26 07:24 /var/lib/init.d/wasinactive
|
OK Update
I looked at /sbin/depscan.sh . This is the script producing the errors.
When I manually run depscan.sh it also produces the errors. The errors occur when it is trying to make directories in the /var/lib/init.d/ dir.
So I tried to make a directory with makdir in the specified directory and it returneded the error cannot make directory to many links
And if you look at the output from ls above it is saying there are 4294967295 links inside the init.d/ directory !!!
Thx for helping me with this |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Tue Dec 26, 2006 10:17 pm Post subject: |
|
|
jhow wrote: | And if you look at the output from ls above it is saying there are 4294967295 links inside the init.d/ directory !!! | This appears to be a task for fsck. If the problem persists after fsck has fixed all of the problems it finds, then comes the minor surgery: move /var/lib/init.d/ aside and move its contents into a new /var/lib/init.d/ with the same permissions as the old /var/lib/init.d/. Run fsck before doing any other surgery. |
|
Back to top |
|
|
jhow n00b
Joined: 17 Aug 2005 Posts: 19 Location: Sydney
|
Posted: Wed Dec 27, 2006 8:22 am Post subject: |
|
|
Thanks desultory.
Code: |
fsck -t jfs /dev/sda3 -f
|
From Knoppix did the trick
Interestingly without the f (force) option specific to fsck.jfs it did not detect any errors at all
Thankyou, your help is much appreciated |
|
Back to top |
|
|
|