Gentoo Archives: gentoo-user

From: James <wireless@×××××××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: module woes
Date: Thu, 06 Feb 2014 16:09:54
Message-Id: loom.20140206T162051-927@post.gmane.org
In Reply to: Re: [gentoo-user] Re: module woes by Alan McKinnon
1 Alan McKinnon <alan.mckinnon <at> gmail.com> writes:
2
3
4 > Let's thin about this logically. A kernel does not get told it's
5 > version, it already knows that, and modules are versioned too. A kernel
6 > finds it's modules by looking in /path/to/modules/`uname -r`
7
8 uname -r returns: 3.13.1-gentoo
9
10 > So, either the version string is wrong in the kernel (possible I suppose
11 > if you copy and old .config and male oldconfig goes wrong somehow) or
12 > you have the wrong modules in the wrongly named directory.
13
14 Checked all of that:
15 ls /boot
16 kernel-3.13.0-gentoo-r1 kernel-3.13.1-gentoo
17 grub lost+found kernel-3.10.25-gentoo
18
19 pluss all permission in /lib/modules/* have been recursively fixed.
20
21 the first to kernels and related dirs had a different set of
22 permissions than the third kernel (3.13.1-gentoo, but that
23 is all manually fixed now.
24
25 > If the version string correct if you runs trings against any of those
26 > not-loading modules and grep for "vermagic"?
27
28 # strings /lib/modules/3.10.25-gentoo/kernel/net/ipv4/netfilter/nf_nat_ipv4.ko
29 vermagic=3.10.25-gentoo SMP mod_unload
30
31 # strings /lib/modules/3.13.1-gentoo/kernel/net/ipv4/netfilter/nf_nat_ipv4.ko
32 vermagic=3.13.1-gentoo SMP mod_unload
33
34
35
36 > Does the correct kernel version show up when looking in strings of the
37 > image in /boot?
38
39 probable not. Here is what I discoved:
40
41 strings /boot/kernel-3.13.1-gentoo | grep ver
42 <empty>
43
44 strings kernel-3.10.25-gentoo | grep ver
45 <empty>
46
47 strings /boot/kernel-3.13.1-gentoo | less
48
49 <after much manual parsing>
50 <snip>
51 This kernel requires an %s CPU,
52 but only detected an %s CPU.
53 This kernel requires the following features not present on the CPU:
54 %d:%d
55 earlyprintk
56 serial
57 ttyS
58 console
59 uart8250,io,
60 uart,io,
61 early console in setup code
62 debug
63 WARNING: Ancient bootloader, some functionality may be limited!
64 Unable to boot - please use a kernel appropriate for your CPU.
65 A20 gate not responding, unable to boot...
66 0123456789ABCDEFPress <ENTER> to see video modes available, <SPACE> to
67 continue, or wait 30 sec
68 Mode: Resolution: Type:
69 %dx%d
70 %c %03X %4dx%-7s %-6s
71 Enter a video mode or "scan" to scan for additional modes:
72 Undefined video mode number: %x
73 3.13.1-gentoo (root@skipper) #1 SMP Sun Feb 2 04:37:07 EST 2014
74
75 <snip>
76 invalid distance too far back
77 invalid distance code
78 invalid literal/length code
79 -- System halted
80 incorrect header check
81 unknown compression method
82 invalid window size
83 invalid block type
84 invalid stored block lengths
85 invalid code lengths set
86 invalid bit length repeat
87 invalid literal/lengths set
88 invalid distances set
89 incorrect data check
90 Destination address too large
91 Decompressing Linux...
92 Not a gzip file
93 header error
94 read error
95 uncompression error
96 Parsing ELF...
97 done.
98 Booting the kernel.
99 too many length or distance symbols
100 early console in decompress_kernel
101 Destination address inappropriately aligned
102 Out of memory while allocating output buffer
103 Out of memory while allocating input buffer
104 Out of memory while allocating z_stream
105 Out of memory while allocating workspace
106 Kernel is not a valid ELF file
107 Failed to allocate space for phdrs
108 earlyprintk
109 serial
110 ttyS
111 console
112 uart8250,io,
113 uart,io,
114 initrd=
115 Failed to handle fs_protoFailed to open file:
116 Failed to get file info size
117 Failed to get file info
118 Failed to read file
119 Failed to alloc mem for gdt
120 EL64
121 Failed to alloc mem for file handle list
122 Failed to alloc mem for file info
123 Failed to alloc highmem for files
124 We've run out of free low memory
125 Failed to get handle for LOADED_IMAGE_PROTOCOL
126 Failed to alloc lowmem for boot params
127 Failed to alloc mem for gdt structure
128 ERROR: Failed to allocate usable memory for kernel.
129 <end/snip>
130 Failed to open volume
131
132 They are pretty much identical (string wise) except this line:
133 strings /boot/kernel-3.10.25-gentoo | less
134
135 3.10.25-gentoo (root@skipper) #3 SMP Tue Jan 14 23:18:53 EST 2014
136
137 And these lines (located at the bottom of the string parsing):
138
139 initrd=
140 Failed to handle fs_proto
141 Failed to open volume
142 Failed to open initrd file:
143 Failed to get initrd info
144 Failed to read initrd
145 Failed to alloc mem for gdt
146 EL64
147 Failed to alloc mem for initrds
148 Failed to get initrd info size
149 Failed to alloc mem for initrd info
150 Failed to alloc highmem for initrds
151 We've run out of free low memory
152 Failed to get handle for LOADED_IMAGE_PROTOCOL
153 Failed to alloc lowmem for boot params
154 Failed to alloc mem for cmdline
155 Failed to alloc mem for gdt structure
156 Failed to alloc mem for idt structure
157 Failed to alloc mem for kernel
158
159
160
161 > [working theory: the kernel throws permission denied errors when it's
162 > asked in weird ways to load wrong versioned modules. Pure speculation,
163 > I've never done this at all and don't know what the error is]
164
165 The permission are all consistent now (/lib/modules/*). I'm not sure how
166 they got wacked, as I have not done anything with modules yet. Nore
167 anything messing with those perms......
168
169 Obviously, from the strings command, the kernel(s) need fixing up a bit.
170 I only got them to a point, to get the openbox stuff setup. The audio
171 and usb automounting are all that is left to fix.... The points is the
172 kernels should be good enough to work with? I suspect grub2, as this
173 is my first forray into a bootable system with grub2........
174
175
176 What is stumping me is why all three kernels boot, but the modules
177 only point to 3.10.25, even when boot either the second
178 (kernel-3.13.0-gentoo-r1) kernel or the third (config-3.13.1-gentoo)
179 kernel.
180
181 I'm going to work on this and scratch a bit..... So any other suggestions
182 are welcome, although it'll be a few days until I post back. Got
183 any strings options/scripts to only filter out the english readable
184 parts of mostly binary files? Manual parsing is a drag......
185
186 What/where could the system be corrupted to only attempt to use those
187 modules from 3.10.25?
188
189
190 TIA,
191 James

Replies

Subject Author
Re: [gentoo-user] Re: module woes Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] Re: module woes Mick <michaelkintzios@×××××.com>
[gentoo-user] Re: module woes walt <w41ter@×××××.com>