Upgrading the Kernel

From MineOS
Jump to: navigation, search

Linux's brain--the kernel--gets updated frequently to include new features in operating systems, as well as additional support for hardware.

The easiest way to upgrade is to have a working kernel config use an existing config and make oldconfig.


Download the kernel source

Download the standard kernel .config as well as the 3.x kernel source tree.

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.3.4.tar.bz2
tar -xjf linux-3.3.4.tar.bz2

Configure the kernel

cd /usr/src/linux-3.3.4
cp /boot/linux-3.1.0-rc9.config .
cp linux-3.1.0-rc9.config .config
yes '' | make oldconfig
make menuconfig

At the end of this step make menuconfig, you will be in the kernel configuration menu, for which you can fine-tune the drivers and options you wish to have built into your kernel.

Compiling and installing the kernel

make modules_install
make INSTALL_HDR_PATH=/usr/include headers_install
cp arch/x86/boot/bzImage /boot/vmlinuz-3.3.4
cp System.map /boot/System.map-3.3.4

Adjusting the LILO bootloader

Adjust your /etc/lilo.conf to boot your new kernel. It is advised to give it its own LILO entry until you are certain you are ready to abandon your old kernel/boot the new one by default.

Kernel 3.png

Understanding the steps

  • yes is a program that automates user answers. Without ' ', it will produce y to the scripts. Since many prompts require numerical answers (or blank for default values), y will not suffice. As a result, the recommended values for new kernel features will be included, and those not recommended will be excluded.
    • You can see this behavior by instead typing make oldconfig. The available options mostly are: (Y/n/m), indicating y is the default option and will be selected with a blank answer.
  • make menuconfig allows you to peruse the kernel source tree and make any modifications. A few features will be added by default, and you can decide if you want to remove them or not. Also, new features that did not exist in your previous kernel will be marked with (NEW).