[lug] Crash during shutdown

D. Stimits stimits at idcomm.com
Wed Sep 6 10:38:24 MDT 2000


Giuliano Rescaldani wrote:
> 
> Hello,
>         thanks for yor kind and full reply:
> 
> > There is a kernel compile option for APM, probably be sure it isn't
> > available in the kernel. There is in /etc/rc.d/init.d a script for start
> > and stop of several services, of which apmd is one. Although I don't
> > suggest removing this script or the sym links at various run levels to
> > this script (my system has these but doesn't run apmd), probably reading
> > the script would give you an idea of where in the system the actual
> > config is found to decide if apm should or should not be disabled.
> > Somewhere you might have a file that contains something similar to
> > "apmd=1" (just a sample, don't know if this really exists).
> I already tried looking at the apmd script: in the very firts lines, it
> checks for /proc/apm file, if it doesn't exist, it exits.
> Unfortunately I do have the /proc/apm file (why?) and it is -r--r--r--. No
> way to remove it: chmod 666 doesn't give any error message, but the file is
> left 444! rm of a file with 444 is impossible!

Anything in /proc/ is part of a reflection of the kernel's internal idea
of what the system looks like. /proc/ isn't even on the hard drive, it
is a ram drive. Sometimes you can modify behavior by setting parameters
here, but it is correct that you can't delete files...that'd be like
directly deleting currently running blocks of kernel ram. If the file
exists, it means the kernel was compiled to support it. Your currently
running kernel is compiled for the option.

> 
> Anyway, just to try, I changed the initila test to check for /proc/apmx
> (that, of course, doesn't exist) and the script exits immediately. ...but I
> still have the crash!

The script is looking for something, but even without the file, you
still have apm kernel code...just no outside tweaking from the script.

> 
> I also looked for the string "Power down." that is the last message just
> before the crash, but I cannot find it in any scripts. Any idea where can I
> look for a "program" that says "Power down." ?

printk(KERN_EMERG "Power down.\n");

That's a line within the kernel source, not a separate program. You
might want to compile the kernel without apm support. If you believe you
have done this already, it appears you're not booting the kernel you
wanted to boot.

If you still have your config file from the last "make menuconfig" (or
xconfig, etc) of kernel compile, search for "CONFIG_APM". It should say
"is not set" and be commented out, or else =y or =m, so on. But the
actual kernel is where that is active or not, so if you aren't using the
kernel that was created under that config, it won't matter.

This adds reason to edit the /usr/src/linux/Makefile, about line 4,
modifying "EXTRAVERSION" line, in order to get "uname -a" to tell you
something different when you have a new kernel. If this is the same with
each kernel, "uname -a" will always look the same. I always save my
config to an alternate file, stored for safekeeping, and named based on
my Makefile line EXTRAVERSION. E.G.:
EXTRAVERSION = -config.2

With this set, when I boot to that kernel (using 2.2.15 source), uname
-a shows in part:
... 2.2.15-config.2 ....

This also means you'd want to copy your System.map to /boot/ as
System.map-2.2.15-config.2, so you can keep that matching with your
kernel (mine happens to be bzImage-2.2.15-config.2).

If you do all that, you *always* know which kernel you have (I have
about 5 kernel configurations, so I have to do this to keep it
straight).

> 
> Thanks again.
> 
>                         Giuliano
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list