Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] New install, can't load modules
Date: Mon, 13 Jul 2015 19:25:39
Message-Id: 55A410A0.3020608@gmail.com
In Reply to: Re: [gentoo-user] New install, can't load modules by Alexander Kapshuk
1 On 13/07/2015 18:42, Alexander Kapshuk wrote:
2 > On Mon, Jul 13, 2015 at 5:29 PM, Alan McKinnon <alan.mckinnon@×××××.com> wrote:
3 >> Did a new install, the new kernel can't load modules:
4 >>
5 >> # modprobe nfsv3
6 >> modprobe: ERROR: could not insert 'nfsv3': Exec format error
7 >>
8 >> Odd. Never had this before. The module file itself is a regular 64-bit
9 >> ELF file, just as it should be (compared to a working module on another
10 >> machine)
11 >>
12 >> gcc is 4.8.4 as supplied by a recent stage3-amd64-20150709.tar.bz2:
13 >> # gcc -v
14 >> Using built-in specs.
15 >> COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4/gcc
16 >> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.4/lto-wrapper
17 >> Target: x86_64-pc-linux-gnu
18 >> Configured with:
19 >> /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/configure
20 >> --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
21 >> --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4
22 >> --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include
23 >> --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.4
24 >> --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.4/man
25 >> --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.4/info
26 >> --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4
27 >> --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.4/python
28 >> --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
29 >> --disable-werror --with-system-zlib --enable-nls
30 >> --without-included-gettext --enable-checking=release
31 >> --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.4
32 >> p1.6, pie-0.6.1' --enable-libstdcxx-time --enable-shared
33 >> --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
34 >> --enable-multilib --with-multilib-list=m32,m64 --disable-altivec
35 >> --disable-fixed-point --enable-targets=all --disable-libgcj
36 >> --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto
37 >> --without-cloog --enable-libsanitizer
38 >> Thread model: posix
39 >> gcc version 4.8.4 (Gentoo 4.8.4 p1.6, pie-0.6.1)
40 >>
41 >> make.conf seems correct:
42 >> CHOST="x86_64-pc-linux-gnu"
43 >> CFLAGS="-march=native -O2 -pipe"
44 >> CXXFLAGS="${CFLAGS}"
45 >> ACCEPT_KEYWORDS="~amd64"
46 >>
47 >> The kernel loads and runs OK:
48 >> # uname -a
49 >> Linux download 4.1.2-gentoo #1 SMP Mon Jul 13 13:28:40 SAST 2015 x86_64
50 >> Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz GenuineIntel GNU/Linux
51 >>
52 >> and the kernel was built with gcc auto-detection:
53 >> # grep NATIVE /boot/config-4.1.2-gentoo
54 >> CONFIG_MNATIVE=y
55 >>
56 >> and the .config was grabbed from a working machine with very similar
57 >> hardware (one minor hardware upgrade ahead)
58 >>
59 >> I haven't done a full world update yet, most code is still what's in the
60 >> stage3, but always in the past that hasn't been a problem; the stage
61 >> must successfully build a kernel and load the modules.
62 >>
63 >> Module loading works just fine when booted from the Gentoo minimal
64 >> install image.
65 >>
66 >> So, what dumbass n00b error did I make today?
67 >>
68 >>
69 >> --
70 >> Alan McKinnon
71 >> alan.mckinnon@×××××.com
72 >>
73 >>
74 >
75 > Does 'modprobe -nv' say anything useful?
76
77 It's normal - a list of dependant modules to be insmod'ed
78
79 >
80 > Anything of interest in '/var/log/dmesg'?
81
82 Nothing I can see:
83
84 # dmesg | egrep -i "warn|error"
85 [ 0.000000] ACPI BIOS Warning (bug): 32/64X FACS address mismatch in
86 FADT: 0xCF7E4E40/0x00000000CF7E4D40, using 32-bit address
87 (20150410/tbfadt-283)
88 [ 1.455621] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
89 [ 2.278571] i8042: Warning: Keylock active
90 [ 3.798045] EXT3-fs (sdb3): error: couldn't mount because of
91 unsupported optional features (240)
92 [ 3.798411] EXT2-fs (sdb3): error: couldn't mount because of
93 unsupported optional features (240)
94
95
96 Digging a little deeper, I see that the kernel IS auto-loading modules
97 on start-up. My e1000e NIC is compiled as a module, and works:
98
99 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit
100 Network Connection [8086:1502] (rev 04)
101 DeviceName: Onboard LAN
102 Subsystem: Dell Precision M4600 [1028:04a3]
103 Kernel driver in use: e1000e
104 Kernel modules: e1000e
105
106
107 lsmod returns null output (just a header line, no data), and modprobe
108 fails with every module tried so far.
109
110 A dim memory is tickling my brain, something about module loading from
111 userspace post-startup being disabled - I'll google some more.
112
113
114 --
115 Alan McKinnon
116 alan.mckinnon@×××××.com