<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=How_to_build_a_Linux_kernel</id>
	<title>How to build a Linux kernel - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=How_to_build_a_Linux_kernel"/>
	<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=How_to_build_a_Linux_kernel&amp;action=history"/>
	<updated>2026-04-13T02:09:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.scott5.org/index.php?title=How_to_build_a_Linux_kernel&amp;diff=559&amp;oldid=prev</id>
		<title>Scott at 00:18, 5 February 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=How_to_build_a_Linux_kernel&amp;diff=559&amp;oldid=prev"/>
		<updated>2011-02-05T00:18:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{warning | This page is out of date!}}&lt;br /&gt;
&lt;br /&gt;
* Make a boot disk in case the boot loader gets screwed up. Insert a floppy and type &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sbin/mkbootdisk `uname -r`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Choose an appropriate kernel identifier. For this example, we use &amp;quot;-test&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Obtain kernel source, unpack it to &amp;lt;code&amp;gt;/usr/src/&amp;lt;/code&amp;gt; and append &amp;quot;-test&amp;quot; to the directory name, e.g. &amp;lt;code&amp;gt;/usr/src/linux-2.4.21-test&amp;lt;/code&amp;gt;. We&amp;#039;ll refer to this as the &amp;quot;source&amp;quot; directory. cd to the source directory.&lt;br /&gt;
&lt;br /&gt;
* Edit the &amp;lt;code&amp;gt;EXTRAVERSION&amp;lt;/code&amp;gt; variable in the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the source directory to add a custom descriptor to the kernel version.&lt;br /&gt;
&lt;br /&gt;
* If a &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file exists and you care about it, back it up now. Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make mrproper&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to clean out the source tree, returning it to a pristine state. This deletes the &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
* Copy an appropriate config to &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; in the source directory. This will serve as a base for configuration.&lt;br /&gt;
&lt;br /&gt;
* Run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(or &amp;quot;&amp;lt;code&amp;gt;make xconfig&amp;lt;/code&amp;gt;&amp;quot; under X Windows) to configure the kernel. This will overwrite the &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
* Now run through these steps in order: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make dep&lt;br /&gt;
make clean&lt;br /&gt;
make bzImage&lt;br /&gt;
make modules&lt;br /&gt;
make modules_install&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This last command installs the new kernel to the boot loader. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Kernel panic: VFS : Unable to mount root fs on 00:00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
May need to replace &amp;quot;&amp;lt;code&amp;gt;root=LABEL=/&amp;lt;/code&amp;gt;&amp;quot; with &amp;quot;&amp;lt;code&amp;gt;root=/dev/hda2&amp;lt;/code&amp;gt;&amp;quot; in &amp;lt;code&amp;gt;grub.conf&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Scott</name></author>
	</entry>
</feed>