~oem-solutions-releng/live-build/lb-sg-2.x-add-support-for-xz-and-bzip2-compression

« back to all changes in this revision

Viewing changes to includes/etch/install/doc/FAQ/html/ch-kernel.en.html

  • Committer: Daniel Baumann
  • Date: 2011-03-09 17:19:41 UTC
  • Revision ID: daniel@debian.org-20110309171941-vyn0zxupujidmbu9
Adding live-helper 1.0~a15-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
 
 
3
 
<html>
4
 
 
5
 
<head>
6
 
 
7
 
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
8
 
 
9
 
<title>The Debian GNU/Linux FAQ - Debian and the kernel</title>
10
 
 
11
 
</head>
12
 
 
13
 
<body>
14
 
 
15
 
<p><a name="ch-kernel"></a></p>
16
 
<hr>
17
 
 
18
 
<p>
19
 
[ <a href="ch-uptodate.en.html">previous</a> ]
20
 
[ <a href="index.en.html#contents">Contents</a> ]
21
 
[ <a href="ch-basic_defs.en.html">1</a> ]
22
 
[ <a href="ch-getting.en.html">2</a> ]
23
 
[ <a href="ch-compat.en.html">3</a> ]
24
 
[ <a href="ch-software.en.html">4</a> ]
25
 
[ <a href="ch-ftparchives.en.html">5</a> ]
26
 
[ <a href="ch-pkg_basics.en.html">6</a> ]
27
 
[ <a href="ch-pkgtools.en.html">7</a> ]
28
 
[ <a href="ch-uptodate.en.html">8</a> ]
29
 
[ 9 ]
30
 
[ <a href="ch-customizing.en.html">10</a> ]
31
 
[ <a href="ch-support.en.html">11</a> ]
32
 
[ <a href="ch-contributing.en.html">12</a> ]
33
 
[ <a href="ch-redistrib.en.html">13</a> ]
34
 
[ <a href="ch-nexttime.en.html">14</a> ]
35
 
[ <a href="ch-faqinfo.en.html">15</a> ]
36
 
[ <a href="ch-customizing.en.html">next</a> ]
37
 
</p>
38
 
 
39
 
<hr>
40
 
 
41
 
<h1>
42
 
The Debian GNU/Linux FAQ
43
 
<br>Chapter 9 - Debian and the kernel
44
 
</h1>
45
 
 
46
 
<hr>
47
 
 
48
 
<h2><a name="s-non-debian-kernel"></a>9.1 Can I install and compile a kernel without some Debian-specific tweaking?</h2>
49
 
 
50
 
<p>
51
 
Yes.
52
 
</p>
53
 
 
54
 
<p>
55
 
There's only one common catch: the Debian C libraries are built with the most
56
 
recent <em>stable</em> releases of the <strong>kernel</strong> headers.  If you
57
 
happen to need to compile a program with kernel headers newer than the ones
58
 
from the stable branch, then you should either upgrade the package containing
59
 
the headers (<code>libc6-dev</code>), or use the new headers from an unpacked
60
 
tree of the newer kernel.  That is, if the kernel sources are in
61
 
<code>/usr/src/linux</code>, then you should add
62
 
<samp>-I/usr/src/linux/include/</samp> to your command line when compiling.
63
 
</p>
64
 
 
65
 
<hr>
66
 
 
67
 
<h2><a name="s-customkernel"></a>9.2 What tools does Debian provide to build custom kernels?</h2>
68
 
 
69
 
<p>
70
 
Users who wish to (or must) build a custom kernel are encouraged to download
71
 
the package <code>kernel-package</code>.  This package contains the script to
72
 
build the kernel package, and provides the capability to create a Debian
73
 
<code>kernel-image-<var>version</var></code> package just by running the
74
 
command
75
 
</p>
76
 
 
77
 
<pre>
78
 
     make-kpkg kernel_image
79
 
</pre>
80
 
 
81
 
<p>
82
 
in the top-level kernel source directory.  Help is available by executing the
83
 
command
84
 
</p>
85
 
 
86
 
<pre>
87
 
     make-kpkg --help
88
 
</pre>
89
 
 
90
 
<p>
91
 
and through the manual page <code>make-kpkg(1)</code>.
92
 
</p>
93
 
 
94
 
<p>
95
 
Users must separately download the source code for the most recent kernel (or
96
 
the kernel of their choice) from their favorite Linux archive site, unless a
97
 
<code>kernel-source-<var>version</var></code> package is available (where
98
 
<var>version</var> stands for the kernel version).
99
 
</p>
100
 
 
101
 
<p>
102
 
Detailed instructions for using the <code>kernel-package</code> package are
103
 
given in the file <code>/usr/share/doc/kernel-package/README.gz</code>.
104
 
Briefly, one should:
105
 
</p>
106
 
<ul>
107
 
<li>
108
 
<p>
109
 
Unpack the kernel sources, and <samp>cd</samp> to the newly created directory.
110
 
</p>
111
 
</li>
112
 
</ul>
113
 
<ul>
114
 
<li>
115
 
<p>
116
 
Modify the kernel configuration using one of these commands:
117
 
</p>
118
 
<ul>
119
 
<li>
120
 
<p>
121
 
<samp>make config</samp> (for a text-based interface).
122
 
</p>
123
 
</li>
124
 
</ul>
125
 
<ul>
126
 
<li>
127
 
<p>
128
 
<samp>make menuconfig</samp> (for an ncurses-based menu driven interface).
129
 
Note that to use this option, the <code>libncurses5-dev</code> package must be
130
 
installed.
131
 
</p>
132
 
</li>
133
 
</ul>
134
 
<ul>
135
 
<li>
136
 
<p>
137
 
<samp>make xconfig</samp> (for an X11 interface).  Using this option requires
138
 
that relevant X and Tcl/Tk packages be installed.
139
 
</p>
140
 
</li>
141
 
</ul>
142
 
 
143
 
<p>
144
 
Any of the above steps generates a new <samp>.config</samp> in the top-level
145
 
kernel source directory.
146
 
</p>
147
 
</li>
148
 
</ul>
149
 
<ul>
150
 
<li>
151
 
<p>
152
 
Execute the command: <samp>make-kpkg -rev Custom.<var>N</var>
153
 
kernel_image</samp>, where <var>N</var> is a revision number assigned by the
154
 
user.  The new Debian archive thus formed would have revision
155
 
Custom.<var>N</var>, e.g.  <code>kernel-image-2.2.14_Custom.1_i386.deb</code>
156
 
for the Linux kernel 2.2.14 on i386.
157
 
</p>
158
 
</li>
159
 
</ul>
160
 
<ul>
161
 
<li>
162
 
<p>
163
 
Install the package created.
164
 
</p>
165
 
<ul>
166
 
<li>
167
 
<p>
168
 
Run <samp>dpkg --install
169
 
../kernel-image-<var>VVV</var>_Custom.<var>N</var>_i386.deb</samp> to install
170
 
the kernel itself.  The installation script will:
171
 
</p>
172
 
<ul>
173
 
<li>
174
 
<p>
175
 
run the boot loader (grub, LILO or some other) if needed,
176
 
</p>
177
 
</li>
178
 
</ul>
179
 
<ul>
180
 
<li>
181
 
<p>
182
 
install the custom kernel in
183
 
<code>/boot/vmlinuz_<var>VVV</var>-Custom.<var>N</var></code>, and set up
184
 
appropriate symbolic links to the most recent kernel version.
185
 
</p>
186
 
</li>
187
 
</ul>
188
 
<ul>
189
 
<li>
190
 
<p>
191
 
prompt the user to make a boot floppy.  This boot floppy will contain the raw
192
 
kernel only.  See <a href="#s-custombootdisk">How can I make a custom boot
193
 
floppy?, Section 9.3</a>.
194
 
</p>
195
 
</li>
196
 
</ul>
197
 
</li>
198
 
</ul>
199
 
<ul>
200
 
<li>
201
 
<p>
202
 
To employ secondary boot loaders such as <code>loadlin</code>, copy this image
203
 
to other locations (e.g.  to an <samp>MS-DOS</samp> partition).
204
 
</p>
205
 
</li>
206
 
</ul>
207
 
</li>
208
 
</ul>
209
 
 
210
 
<hr>
211
 
 
212
 
<h2><a name="s-custombootdisk"></a>9.3 How can I make a custom boot floppy?</h2>
213
 
 
214
 
<p>
215
 
This task is greatly aided by the Debian package <code>boot-floppies</code>,
216
 
normally found in the <samp>admin</samp> section of the Debian FTP archive.
217
 
Shell scripts in this package produce boot floppies in the
218
 
<samp>SYSLINUX</samp> format.  These are <samp>MS-DOS</samp> formatted floppies
219
 
whose master boot records have been altered so that they boot Linux directly
220
 
(or whatever other operating system has been defined in the
221
 
<code>syslinux.cfg</code> file on the floppy).  Other scripts in this package
222
 
produce emergency root disks and can even reproduce the base disks.
223
 
</p>
224
 
 
225
 
<p>
226
 
You will find more information about this in the
227
 
<code>/usr/share/doc/boot-floppies/README</code> file after installing the
228
 
<code>boot-floppies</code> package.
229
 
</p>
230
 
 
231
 
<hr>
232
 
 
233
 
<h2><a name="s-modules"></a>9.4 What special provisions does Debian provide to deal with modules?</h2>
234
 
 
235
 
<p>
236
 
Debian's <code>modconf</code> package provides a shell script
237
 
(<code>/usr/sbin/modconf</code>) which can be used to customize the
238
 
configuration of modules.  This script presents a menu-based interface,
239
 
prompting the user for particulars on the loadable device drivers in his
240
 
system.  The responses are used to customize the file
241
 
<code>/etc/modules.conf</code> (which lists aliases, and other arguments that
242
 
must be used in conjunction with various modules) through files in
243
 
<code>/etc/modutils/</code>, and <code>/etc/modules</code> (which lists the
244
 
modules that must be loaded at boot time).
245
 
</p>
246
 
 
247
 
<p>
248
 
Like the (new) <code>Configure.help</code> files that are now available to
249
 
support the construction of custom kernels, the <code>modconf</code> package
250
 
comes with a series of help files (in <code>/usr/lib/modules_help/</code>)
251
 
which provide detailed information on appropriate arguments for each of the
252
 
modules.
253
 
</p>
254
 
 
255
 
<hr>
256
 
 
257
 
<h2><a name="s-removeoldkernel"></a>9.5 Can I safely de-install an old kernel package, and if so, how?</h2>
258
 
 
259
 
<p>
260
 
Yes.  The <code>kernel-image-<var>NNN</var>.prerm</code> script checks to see
261
 
whether the kernel you are currently running is the same as the kernel you are
262
 
trying to de-install.  Therefore you can remove unwanted kernel image packages
263
 
using this command:
264
 
</p>
265
 
 
266
 
<pre>
267
 
     dpkg --purge --force-remove-essential kernel-image-<var>NNN</var>
268
 
</pre>
269
 
 
270
 
<p>
271
 
(replace <var>NNN</var> with your kernel version and revision number, of
272
 
course)
273
 
</p>
274
 
 
275
 
<hr>
276
 
 
277
 
<p>
278
 
[ <a href="ch-uptodate.en.html">previous</a> ]
279
 
[ <a href="index.en.html#contents">Contents</a> ]
280
 
[ <a href="ch-basic_defs.en.html">1</a> ]
281
 
[ <a href="ch-getting.en.html">2</a> ]
282
 
[ <a href="ch-compat.en.html">3</a> ]
283
 
[ <a href="ch-software.en.html">4</a> ]
284
 
[ <a href="ch-ftparchives.en.html">5</a> ]
285
 
[ <a href="ch-pkg_basics.en.html">6</a> ]
286
 
[ <a href="ch-pkgtools.en.html">7</a> ]
287
 
[ <a href="ch-uptodate.en.html">8</a> ]
288
 
[ 9 ]
289
 
[ <a href="ch-customizing.en.html">10</a> ]
290
 
[ <a href="ch-support.en.html">11</a> ]
291
 
[ <a href="ch-contributing.en.html">12</a> ]
292
 
[ <a href="ch-redistrib.en.html">13</a> ]
293
 
[ <a href="ch-nexttime.en.html">14</a> ]
294
 
[ <a href="ch-faqinfo.en.html">15</a> ]
295
 
[ <a href="ch-customizing.en.html">next</a> ]
296
 
</p>
297
 
 
298
 
<hr>
299
 
 
300
 
<p>
301
 
The Debian GNU/Linux FAQ
302
 
</p>
303
 
 
304
 
<address>
305
 
version 3.1.5, 17 January 2007<br>
306
 
<br>
307
 
Authors are listed at <a href="ch-faqinfo.en.html#s-authors">Debian FAQ Authors</a><br>
308
 
<br>
309
 
</address>
310
 
<hr>
311
 
 
312
 
</body>
313
 
 
314
 
</html>
315