Gentoo Archives: gentoo-dev

From: Gold is Heavy <aeoo@×××××××××.com>
To: gentoo-dev@××××××××××.org
Subject: [gentoo-dev] kernel 2.4.10-r2: works without a problem -- depmod fixed
Date: Tue, 09 Oct 2001 10:07:57
1 Hi Gentoo Hackers,
3 This is a follow up re: depmod problems I've been having.
5 I emerged the newer 2.4.10-r2 ebuild package, and compiled the kernel.
6 After that, depmod problems became worse. I did make menuconfig, and went
7 through every single option, and recompiled the kernel again. I did this
8 many times: NO result. I tried using my older .config file, also NO
9 result.
11 Then, I remembered Donny's suggestion to try "rm /usr/src/linux/.config"!
12 First of all, as soon as I did that, I noticed that my menus looked
13 *significantly* different! Maybe I am crazy, but I really think even the
14 wording on some options changed. I thought that it was a good sign.
16 And indeed, the kernel compiled with a few warnings here and there, and no
17 modules at all were compiled (just as I want). So, I followed the doc,
18 make dep; make clean; make bzImage; make modules; make modules_install;
19 mv /boot/bzImage /boot/bzImage.old; cp /usr/src/linux/i386/boot/bzImage
20 /boot, and... still no go! Then I wondered, wait a second. No modules
21 were compiled, and I thought modules_install most likely doesn't erase
22 anything. So, I checked /lib/modules, and indeed, it was full of junk. So
23 I gently erased everything there ;). Then make modules_install again, to
24 see if it wants to install anything... nothing.
26 Ok, no more depmod problems :)
28 Lesson learned:
30 1. *Never* use .config file that comes with the kernel sources. Always
31 delete it and start from scratch, to guarantee that only relevant and
32 compatible options are used.
34 2. Prior to 'make modules_install' it's a good idea to delete any old
35 modules there, preferrably ALL modules. That means if I have any custom
36 made modules, I should NOT keep them in /lib/modules! I should keep them
37 in something like, /lib/site/modules or /local/lib/modules or something
38 like t hat, and there should be a script to automatically symlink
39 everything from the custom modules dir to /lib/modules.
41 So my revised kernel compile procedure would look something like this:
43 1. Delete /usr/src/linux/.config (or otherwise make absolutely sure that
44 it's safe to use)
46 2. make menuconfig; make dep; make clean; make modules
48 3. rm -rf /lib/modules/2.4.10
50 4. make modules_install
52 5. Run a script to symlink any custom made modules to the /lib/modules dir.
54 I will probably recompile the kernel later with some modules, just to
55 verify that everything is working properly. When, and if, I do that, I
56 will post a follow up.
58 Related question:
59 I noticed that there are kernel-headers and kernel-source ebuild packages.
60 So, when upgrading to a newer kernel, is it necessary to also install
61 kernel-headers package, or is kernel-source alone sufficient?
63 --Leo