Kernel Headers

Richard Lightman richard at
Fri Nov 1 13:12:36 PST 2002

* David C <david at> [2002-11-01 20:54]:
> Not sure if this is the right place for this, but here goes.
> Ok so far, but is it safe to delete the /usr/src/linux* directory or 
> untar a fresh tar.gz of the same version of it in the same directory 
> (thus overwriting the old one) when I'm going to recompile? And further 
> what to do when compiling a different version kernel?
You can delete /usr/src/linux - but it would be sensible to put
/usr/src/linux/.config somewhere safe first.

There is no good reason for compiling kernels in /usr/src/. Anything that
needs the kernel sources should be able to find them by following the
/lib/modules/$(uname -r)/build symlink.

> In other words, I guess I'm asking if the (/mnt/lfs)/usr/src/linux* 
> directory is used for anything once the kernel is already compiled and 
> installed?

The only inconvenience of not having the kernel sources is that you
cannot compile externel kernel modules such as alsa. If you later
decide you want alsa, you can always unpack the kernel again, and
configure it with the .config file you saved earlier.

> Also, where are modules stored? In both my RH 8.0 host and in LFS, the 
> /usr/include/linux directory does not have a modules directory, but the 
> /usr/src/linux/include/linux directory does. Hence my confusion as to 
> if it's ok to delete the kernel directory or not.
kernel mudules live in /lib/modules/$(uname -r)/kernel/
Externel modules live in /lib/modules/$(uname -r)/misc/

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list