I want to learn about compiling a kernel from scratch. How can I download the latest stable Linux kernel from http://kernel.org/, compile it, and install it in a VMware virtual machine? This is just for educational purposes.
migrated from stackoverflow.com Mar 13 '12 at 13:10
Your question is too vague for anyone to give you a thoughtful answer, but here's the gist.
Compiling a kernel requires sources, so you'll need to get those. Most Linux distros have a package for downloading the latest sources, or you can go manual and just download the latest tarball from kernel.org
Then, once you have the sources, un-tar them somewhere (usually
For a more long-winded and useful howto, you should check out the Gentoo handbook.
You can compile the linux-0.11 edition first and install it on the "bochs" to learn about the linux kernel. The latest distribution of Linux is too complicated to handle with.
Are you currently using a Linux distribution? Most if not all allow you to boot from different Kernels
Download, the Kernel from kernel.org (As of Writing its 3.7.1)
The instructions within the readme file make it incredibly simple, just about all the configuration options are documented and a lot of times it will say 'If you don't know what 'x' is, then it can be N' or 'It's a good idea to say Y to this'
If you mess up, reboot into the previous system and use make menuconfig and change whatever value is missing and recompile (It won't recompile the whole Kernel again don't worry)
My first compile I personally disabled anything I didn't need the only hiccup for me was I didn't enable a virtual file system needed for the terminal.