Multiple kernel installs

Jack Detrick vze24938 at
Fri Mar 9 16:24:31 PST 2001

If you're just going to be compiling, say, kernel 2.4.0, 2.4.1, and
2.4.3 and whatnot, the modules for each kernel will be located in their
own directory under lib/modules, based on the kernel version
(/lib/modules/2.4.0, and so on).  However, if you want to compile the
same kernel version with different module options and have those modules
stored in different directories, you do have to do a tiny bit of
editing.  For example, let's say right now you have kernel version 2.4.1
installed, and the modules for it are in /lib/modules/2.4.1.  Now you
want to compile 2.4.1 with different options and a different set of
modules (for whatever reason), and you want those modules located in
their own directory.  What you need to do is edit the top-level kernel
makefile (/usr/src/linux/Makefile or /usr/src/linux-2.4.1/Makefile,
depending on whether or not you symlinked /usr/src/linux-2.4.1 ->
/usr/src/linux).  When you edit the Makefile, look for these lines:


Put whatever you want to the right of EXTRAVERSION, for example

EXTRAVERSION ="-moduleset2"

After that, not only will your modules be installed in
/lib/modules/2.4.1-moduleset2, but when you type "uname -r" you'll see
that your kernel is also referred to as 2.4.2-moduleset2.  Also, this
comes in handy when you have, say, kernel 2.4.2 patched to ac11, and you
don't want -ac11 appended to your kernel's version.  Just remove the
-ac11 to the right of EXTRAVERSION and you have a nice neat uname -r
printout (although not an exactly truthful one).  Hope this
helps/enlightens/whatever somebody.

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list