<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.linuxize.net/index.php?action=history&amp;feed=atom&amp;title=Kernel_Manual_Build</id>
	<title>Kernel Manual Build - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linuxize.net/index.php?action=history&amp;feed=atom&amp;title=Kernel_Manual_Build"/>
	<link rel="alternate" type="text/html" href="https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;action=history"/>
	<updated>2026-10-16T23:56:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;diff=704&amp;oldid=prev</id>
		<title>Datanasov at 09:00, 13 March 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;diff=704&amp;oldid=prev"/>
		<updated>2024-03-13T09:00:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:00, 13 March 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is an &amp;#039;&amp;#039;&amp;#039;obsolete now&amp;#039;&amp;#039;&amp;#039; guide on how to build the Linux Kernel into a .deb package.  Don&amp;#039;t use this, or take with a grain of salt.  Instead, see https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is an &amp;#039;&amp;#039;&amp;#039;obsolete now&amp;#039;&amp;#039;&amp;#039; guide on how to build the Linux Kernel into a .deb package.  Don&amp;#039;t use this, or take with a grain of salt.  Instead, see https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;## If your page gets really long, uncomment this Table of Contents &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;##  &amp;lt;&amp;lt;TableOfContents(2)&amp;gt;&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Install the Required Packages ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Install the Required Packages ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki:diff:1.41:old-703:rev-704:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Datanasov</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;diff=703&amp;oldid=prev</id>
		<title>Datanasov at 08:59, 13 March 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;diff=703&amp;oldid=prev"/>
		<updated>2024-03-13T08:59:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:59, 13 March 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#language en&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Datanasov</name></author>
	</entry>
	<entry>
		<id>https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;diff=702&amp;oldid=prev</id>
		<title>Datanasov: Created page with &quot;#language en ~-Translation(s): none-~ ---- This is an &#039;&#039;&#039;obsolete now&#039;&#039;&#039; guide on how to build the Linux Kernel into a .deb package.  Don&#039;t use this, or take with a grain of salt.  Instead, see https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official  ## If your page gets really long, uncomment this Table of Contents  ##  &lt;&lt;TableOfContents(2)&gt;&gt;  == Install the Required Packages ==  To download and...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxize.net/index.php?title=Kernel_Manual_Build&amp;diff=702&amp;oldid=prev"/>
		<updated>2024-03-13T08:59:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;#language en ~-&lt;a href=&quot;/index.php?title=DebianWiki/EditorGuide&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;DebianWiki/EditorGuide (page does not exist)&quot;&gt;Translation(s)&lt;/a&gt;: none-~ ---- This is an &amp;#039;&amp;#039;&amp;#039;obsolete now&amp;#039;&amp;#039;&amp;#039; guide on how to build the Linux Kernel into a .deb package.  Don&amp;#039;t use this, or take with a grain of salt.  Instead, see https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official  ## If your page gets really long, uncomment this Table of Contents  ##  &amp;lt;&amp;lt;TableOfContents(2)&amp;gt;&amp;gt;  == Install the Required Packages ==  To download and...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;#language en&lt;br /&gt;
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~&lt;br /&gt;
----&lt;br /&gt;
This is an &amp;#039;&amp;#039;&amp;#039;obsolete now&amp;#039;&amp;#039;&amp;#039; guide on how to build the Linux Kernel into a .deb package.  Don&amp;#039;t use this, or take with a grain of salt.  Instead, see https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-official&lt;br /&gt;
&lt;br /&gt;
## If your page gets really long, uncomment this Table of Contents &lt;br /&gt;
##  &amp;lt;&amp;lt;TableOfContents(2)&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install the Required Packages ==&lt;br /&gt;
&lt;br /&gt;
To download and compile the Linux Kernel source we will need the following packages:&lt;br /&gt;
&lt;br /&gt;
 * build-essential - Essential packages required for compiling.&lt;br /&gt;
 * linux-source - The Linux Kernel Source&lt;br /&gt;
 * libncurses5-dev - Development files for ncurses5. Optional for using curses based menu driven configuration.&lt;br /&gt;
&lt;br /&gt;
To install these packages run the following command as root:&lt;br /&gt;
 {{{sudo apt-get install build-essential linux-source bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison}}}&lt;br /&gt;
&lt;br /&gt;
== Extracting the Kernel Source ==&lt;br /&gt;
&lt;br /&gt;
Under &amp;#039;&amp;#039;/usr/src&amp;#039;&amp;#039; you will find a file looking like &amp;#039;&amp;#039;linux-source-x.x.tar.xz&amp;#039;&amp;#039;. Please note that &amp;#039;&amp;#039;x.x&amp;#039;&amp;#039; will match the current Linux Kernel source for your release of Debian. In this example we will be using the 4.15 Kernel under Sid.&lt;br /&gt;
&lt;br /&gt;
Extract the Kernel Source with the following command (NOTE: You will need to change &amp;#039;&amp;#039;4.15&amp;#039;&amp;#039; to match the &amp;#039;&amp;#039;.tar.xz&amp;#039;&amp;#039; file in &amp;#039;&amp;#039;/usr/src&amp;#039;&amp;#039;):&lt;br /&gt;
 {{{tar xavf /usr/src/linux-source-4.15.tar.xz}}}&lt;br /&gt;
&lt;br /&gt;
== Configuring the Kernel ==&lt;br /&gt;
&lt;br /&gt;
Change directories to the newly extracted linux source (again, match &amp;#039;&amp;#039;4.15&amp;#039;&amp;#039; to your version):&lt;br /&gt;
 {{{cd linux-source-4.15}}}&lt;br /&gt;
&lt;br /&gt;
Create a defconfig with the following command, please change &amp;#039;&amp;#039;ARCH=i386&amp;#039;&amp;#039; to match your target architecture:&lt;br /&gt;
 {{{make ARCH=i386 defconfig}}}&lt;br /&gt;
&lt;br /&gt;
=== Using your current Debian kernel configuration as a starting point ===&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use the configuration from a Debian-built kernel that you already have installed by copying the `/boot/config-*` file to `.config` and then running `make oldconfig` to only answer new questions.&lt;br /&gt;
&lt;br /&gt;
If you do this, ensure that you modify the configuration to set:&lt;br /&gt;
&lt;br /&gt;
{{{&lt;br /&gt;
CONFIG_SYSTEM_TRUSTED_KEYS = &amp;quot;&amp;quot;&lt;br /&gt;
}}}&lt;br /&gt;
&lt;br /&gt;
otherwise the build may fail:&lt;br /&gt;
&lt;br /&gt;
{{{&lt;br /&gt;
make[4]: *** No rule to make target &amp;#039;debian/certs/test-signing-certs.pem&amp;#039;, needed by &amp;#039;certs/x509_certificate_list&amp;#039;.  Stop.&lt;br /&gt;
make[4]: *** Waiting for unfinished jobs....&lt;br /&gt;
}}}&lt;br /&gt;
&lt;br /&gt;
== Building the Debian Package ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;#039;&amp;#039;make bindeb-pkg&amp;#039;&amp;#039; target to build the kernel. the {{{-j`nproc`}}} argument sets the build to use as many cpu&amp;#039;s as you have.&lt;br /&gt;
 {{{nice make -j`nproc` bindeb-pkg}}}&lt;br /&gt;
&lt;br /&gt;
This will take quite some time and it&amp;#039;s worth noting that it doesn&amp;#039;t necessarily have to be done on the target machine (or even the target architecture, search in your engine of choice for kernel cross-compiling if you want to set it up). Choosing your most powerful machine may reduce the time of this operation from many hours to under 1. &lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also worth noting that if you&amp;#039;re using not much of a deviation from the default configuration that ships with debian, you&amp;#039;ll need upwards of about 7GB or so of space to do this operation. &lt;br /&gt;
&lt;br /&gt;
When complete, a number of files get created in the parent directory. Here&amp;#039;s the important and perhaps confusing ones:&lt;br /&gt;
&lt;br /&gt;
 * linux-image-VERSION_ARCH.deb&lt;br /&gt;
 * linux-image-VERSION-dbg_VERSION_ARCH.deb&lt;br /&gt;
&lt;br /&gt;
The first one will replace your current default menulist item in grub upon installation.  This means that if you install it then next time you reboot, you&amp;#039;ll boot into that kernel.&lt;br /&gt;
&lt;br /&gt;
The second are debug symbols for the first. This is useful if say, you want to do kernel debugging.  It&amp;#039;s worth noting that when extracted the debug symbols are about 5GB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Compiling a Kernel&amp;quot; section in the [[https://debian-handbook.info/browse/stable/|Debian Administrator&amp;#039;s Guide]] (WARNING: outdated)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
## If this page belongs to an existing  Category, add it below.&lt;br /&gt;
CategoryKernel&lt;/div&gt;</summary>
		<author><name>Datanasov</name></author>
	</entry>
</feed>