How to install linux kernel
When I install some linux distributions, such as fedora, debian, especially live version, there is no source code of linux kernel under /usr/src, how can i install the source code?
Thanks |
|
I mean the src of kernel under /usr/src is the source code of the current kernel. If I download a new one and compile it, the system might not work. When I install VMPlayer or something, I have to use /usr/src/kernels to install the software. So ...
|
Nonononono, this is not really how a kernel works.
Granted, the ./usr/src should hold the source code of the current kernel. Your distro should have that in the repo. You could download that. But, if you want to compile a kernel, there needs to be a good reason for it. Kernels are fairly well fine-tuned to most needs, so a recompile needs to be founded in some extra need. Is there a reason to recompile, then go tahe these steps (roughly) Find out what kernel you use now: Quote:
Enter Quote:
Quote:
Quote:
If you'd use a newer version, be aware that the ODD numbers are experimental, the EVEN numbers are stable. The choice (of course) ;) is yours... At any rate, whatever is installed on the system will/should run. See a kernel as an engine in a Lambo. By recompiling it, you basically get to choose the engine before you drive out of the garage. In the GRUB menu, you get to choose the kernel, the old (and fully working one) stays around, if all goes bad, restart the system, and choose the previous kernel and you're off... Thor |
The source-code of a kernel is not required in order to successfully install a new kernel, i.e. from a package.
That source-code may be required, however, if the program in question needs to know about kernel-related data structures that pertain to the currently-installed kernel. This is why "kernel source-code" is usually designated as an optional package. |
All times are GMT -5. The time now is 03:24 PM. |