Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37817 - Using of separated /var partition causes system shutdown at boot
Summary: Using of separated /var partition causes system shutdown at boot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-10 11:35 UTC by Kalle Rannikko
Modified: 2005-02-10 21:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalle Rannikko 2004-01-10 11:35:29 UTC
I installed gentoo system from scratch. When I try to boot gentoo system first time I get error message saying:

Dependency info missing! Please run

  # /sbin/depscan.sh

to fix this.

That leads me to file /lib/rcscripts/sh/rc-services.sh where this error is thrown if running of

[ "${RC_GOT_DEPTREE_INFO}" != "yes" -a -f "${svcdir}/deptree" ] \
  && source "${svcdir}/deptree"

is failed.

${svcdir} is defined in /etc/conf.d/rc and it it /var/lib/init.d by default.

Looking at scripts in /etc/init.d/ tells me that deptree is required by modules.

When I look at ${svcdir}/deptree I noticed that /etc/init.d/localmount (mounting /var and other partitions) is done after /etc/init.d/modules.

This means that partitions are not mounted at the time ${svcdir} is accessed and this causes the error message to appear.

Reproducible: Always
Steps to Reproduce:
Basic installation with separated /var partition.
Actual Results:  
At boot error specified in details part is thrown after 
Comment 1 Kalle Rannikko 2004-01-10 11:35:29 UTC
I installed gentoo system from scratch. When I try to boot gentoo system first time I get error message saying:

Dependency info missing! Please run

  # /sbin/depscan.sh

to fix this.

That leads me to file /lib/rcscripts/sh/rc-services.sh where this error is thrown if running of

[ "${RC_GOT_DEPTREE_INFO}" != "yes" -a -f "${svcdir}/deptree" ] \
  && source "${svcdir}/deptree"

is failed.

${svcdir} is defined in /etc/conf.d/rc and it it /var/lib/init.d by default.

Looking at scripts in /etc/init.d/ tells me that deptree is required by modules.

When I look at ${svcdir}/deptree I noticed that /etc/init.d/localmount (mounting /var and other partitions) is done after /etc/init.d/modules.

This means that partitions are not mounted at the time ${svcdir} is accessed and this causes the error message to appear.

Reproducible: Always
Steps to Reproduce:
Basic installation with separated /var partition.
Actual Results:  
At boot error specified in details part is thrown after ´checkroot´ and
´hostname´ scripts are ran. At ´calculating module dependencies´ comes the error
which causes automatic shutdown of the gentoo.

Expected Results:  
No automatic shutdown of gentoo.. =)
/etc/init.d/localmount is run before /etc/init.d/modules.

baselayout-1.8.6.10-r1 and -1.8.6.12-r3 tried
portage 2.0.49-r21 used
Comment 2 Paul de Vrieze (RETIRED) gentoo-dev 2004-01-11 09:00:12 UTC
Basically you need to point your svc_dir to some location on the root partition
Comment 3 Kalle Rannikko 2004-01-11 11:59:37 UTC
Changing svcdir to /lib/boot/init.d in /etc/conf.d/rc but that isn't helping. Getting still the same error. This all worked like a dream before. I have used gentoo 1 * years without this kind of problems...
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2004-01-11 12:31:40 UTC
The boot works as follow:

 - Run the following services in listed order by hand (_before_ running
   depscan.sh, so it do not matter if /var is not mounted):

    checkroot
    hostname
    modules
    checkfs
    localmount

 - Run depscan.sh
 - Run the rest of the services at boot

Meaning, if your /var is in /etc/fstab, and no issues, it should be
mounted _before_ /var/lib/init.d/ is accessed ...

Does /var/lib/init.d (on the actual /var), /lib/boot/init.d or whatever
you actually now use as $svcdir exist?

Comment 5 Kalle Rannikko 2004-01-11 13:00:25 UTC
You are right about that. I checked out the boot again and find out that it is 'Calculating module dependencies' which crashes and shuts down the system. It doesn't give any error. /sbin/depscan.h error message shows up after this but it seems that it thrown by shutdown procedures.

I still don't know what is wrong about my system. I have installed the system twice and both times I have had the same kind of error situation.

Perhaps I should try to install my gentoo again from the scratch and hope the best because I think modules cannot be removed from the boot because of the dependencies.

I don't have any kernel modules defined in /etc/modules.autoload/kernel-2.6.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2004-01-11 14:00:40 UTC
So this is only on shutdown?  Any possible way to get a log through serial
console or such ?
Comment 7 Kalle Rannikko 2004-01-11 15:30:55 UTC

Yes, this /sbin/depscan.sh error comes only in shutdown after modules-script is crashed.

I suppose that at this stage there is no logger to log anything and in screen there is nothing special to see.

...
Remounting root filesystem read/write... [ok]
Setting hostname to main... [ok]
Calculating module dependencies...
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal
...

Comment 8 Kalle Rannikko 2004-01-11 15:42:26 UTC
Yes, /sbin/depscan.sh error is coming only after modules-script is crashed.  I suppose system loggers are not working at this point and there is nothing special to see in the screen.  ... Remounting root filesystem read/write... [ok] Setting hostname to main... [ok] Calculating module dependencies... [ok] INIT: Switching to runlevel: 0 INIT: Sending processes the TERM signal ...
Comment 9 Kalle Rannikko 2004-01-12 15:43:14 UTC
I tried to debug the cause of the crash and the traces lead to /sbin/modules-update and to the following lines:

...
export TESTING_PROBE_CONF="${TMPFILE3}"
if /sbin/generate-modprobe.conf >> "${TMPFILE4}" 2> /dev/null
then
...

That means /sbin/generate-modprobe.conf have to be crashing somehow. I find this out by echoing numbers thru scripts since I get into this point.
I am not sure how to debug this further.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-16 14:35:53 UTC
is this still a problem?
Comment 11 Kalle Rannikko 2005-01-16 14:52:17 UTC
Not anymore. I got the system running couple of days after last messages and haven't faced the same problem after that.
Comment 12 SpanKY gentoo-dev 2005-02-10 21:58:47 UTC
everything seems to be sane now with baselayout 1.11.x