Ken Moffat wrote:
> So, it's actually init that segfaults ? I suppose that makes sense,
> I think the kernel is privileged enough to do what it wants. I must
> admit, when I read your original post I assumed you meant it was
> panicking.
Well it was panicking because init segfaulted.
bash-static[1]: segfault at....
Kernel panic not syncing: Attempted to kill init!
Call Trace:
...
rdtsc_barrier
It looks something like
http://www.gossamer-threads.com/lists/linux/kernel/1210031
but with different addresses.
> Anyway, I start to wonder if something about both init and bash
> has been "compiled differently", or perhaps it's something in the
> interface twixt kernel and userspace.
A good idea.
> Any chance you could compile a _static_ bash (or init, or other
> shell), on a system with an older compiler, then try using that
> for init ?
Well I couldn't build bash statically. Perhaps because I don't have all
the static libraries necessary.
Several things like:
/sources/bash-4.1/bashline.c:2122: warning: Using 'getgrent' in
statically linked applications requires at runtime the shared libraries
from the glibc version used for linking
but these are warnings. It got this error:
./lib/sh/libsh.a(shmatch.o): In function `sh_regmatch':
/sources/bash-4.1/lib/sh/shmatch.c:111: undefined reference to `sh_xfree'
/sources/bash-4.1/lib/sh/shmatch.c:112: undefined reference to `sh_xfree'
collect2: ld returned 1 exit status
--------------
I went out and got a precompiled version from debian and verified that
it worked with a kernel built with gcc-4.4.1. Using
init=/bin/bash-static, I still got the same failure upon boot.
This indicates to me that it is really a kernel problem.
I'm now playing with some kernel options, specifically, OPTIMIZE_FOR_SIZE.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page