1 |
tmb |
134369 |
Hello Mageia Users, |
2 |
tmb |
61100 |
|
3 |
tmb |
134369 |
linux-userspace-headers contains the headers for the source code of |
4 |
|
|
Linux kernel. All source code necessary to compile a new kernel is |
5 |
|
|
included in two packages linux-userspace-headers, and kernel-source. |
6 |
|
|
You will need to install both linux-userspace-headers (needed for |
7 |
|
|
general Linux compilation), and kernel-source in order to compile |
8 |
|
|
a new kernel. |
9 |
tmb |
61100 |
|
10 |
|
|
The kernel is the central process of your Linux machine, the mediator |
11 |
|
|
between the hardware and your programs. It is responsible for memory |
12 |
|
|
allocations, process managing, device access... |
13 |
|
|
|
14 |
|
|
Although modern kernels are very flexible thanks to dynamic modules, you |
15 |
|
|
may need to compile your own kernel for various reasons: your found a |
16 |
|
|
new module which need a more recent kernel, you need a feature of a new |
17 |
|
|
kernel, etc... |
18 |
|
|
|
19 |
|
|
Here is a short sum-up of what you can find in the Kernel-HOWTO. Consult |
20 |
|
|
it in case of a problem or if the shortcut here provided does not meet |
21 |
|
|
your needs. You should also consult the README of kernel-sources. |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
1. Configure your new kernel |
26 |
|
|
|
27 |
|
|
You should never build a kernel as root, so as a normal user: |
28 |
|
|
Copy the source in /usr/src/linux/ to ~/kernel/ |
29 |
|
|
Change to ~/kernel/ and clean-up previous compilations, by issuing |
30 |
|
|
"make mrproper", |
31 |
|
|
In console mode, run "make menuconfig", |
32 |
|
|
Under X11, run "make xconfig". |
33 |
|
|
|
34 |
|
|
Then configure all sections of your kernel making each feature you need |
35 |
|
|
available constantly or as a module. Note that you should compile most |
36 |
|
|
features as a module, as it consume less memory, taking into account |
37 |
|
|
that some of them cannot be modules as you may need them at boot time, |
38 |
|
|
before dynamic modules be loaded... |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
2. Compile it |
43 |
|
|
|
44 |
|
|
Just issue "make" to create a compressed kernel image and the modules you |
45 |
|
|
configured. |
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
3. install your new kernel |
50 |
|
|
|
51 |
|
|
Now you need root privilegies, so: |
52 |
|
|
Issue "su" and enter root password. |
53 |
|
|
Issue "make modules_install" |
54 |
|
|
|
55 |
|
|
This will copy your modules and needed files to /lib/modules/ |
56 |
|
|
|
57 |
|
|
Issue "make install" |
58 |
|
|
|
59 |
|
|
This will copy your new kernel and system.map to boot dir (/boot/) with |
60 |
|
|
correct names including version, and change respective links. |
61 |
|
|
|
62 |
|
|
It finally runs lilo to take into account your new kernel. |
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
4. Modify Lilo to allow your booting on old kernel |
67 |
|
|
|
68 |
|
|
* This step is optional, although recommended * |
69 |
|
|
See lilo.conf man page. |
70 |
|
|
Your are encouraged during this step to create a new section in your |
71 |
|
|
lilo.conf file, in order to enable you to boot on your both kernels, the |
72 |
|
|
old and the new one. |
73 |
|
|
You need to run lilo then to take your changes into account. |
74 |
|
|
You may also use linuxconf to do all that with a nice GUI. |
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
5. Reboot your machine... |
79 |
|
|
|
80 |
|
|
And pray. |
81 |
|
|
Anyway if something goes wrong, you just need to reboot and choose your |
82 |
|
|
old kernel with lilo. |
83 |
|
|
|
84 |
|
|
Enjoy! |
85 |
|
|
|
86 |
|
|
|
87 |
|
|
======================================================================== |
88 |
|
|
(c) 1999-2006 Mandriva, Camille Bégnis <camille@mandriva.com> |
89 |
|
|
(c) 2006 Thomas Backlund <tmb@mandriva.org> |
90 |
tmb |
134369 |
(c) 2011 Thomas Backlund <tmb@mageia.org> |