Installing a vanilla kernel on Linux Mint 13 Maya. How to build from the Kernel.org tarball.

The installation of a vanilla kernel on Linux Mint 13 is very simple. Once you have downloaded the kernel tarball from kernel.org you will have to unpack the tarball:

tar jxvf linux-3.4-rc2.tar.bz2

Then enter the directory thus created and run make mrproper to make sure the kernel source tree is clean.

C:\HOME\FLYNN\DOCUMENTS> cd linux-3.4-rc2/
C:\HOME\FLYNN\DOCUMENTS\LINUX-3.4-RC2> make mrproper

Then copy the existing configuration from your existing Linux kernel to use with your new one.

cp /boot/config-3.2.0-24-generic .config

Before we attempt to build our kernel, we need to ensure that we have the proper packages installed to build it.

sudo apt-get install git-core kernel-package fakeroot build-essential ncurses-dev

Then run the ncurses based menuconfig to set any kernel configuration options. Once this is completed, opt to save the configuration which will write it to the .config file.

make menuconfig

After the configuration phase is complete, we need to prepare for the kernel compilation phase of this task.

make-kpkg clean

And then we begin the compilation phase, this will compile the kernel source code and we will be left with two Debian *.deb packages that we may install to our system.

fakeroot make-kpkg --initrd --append-to-version=-bejiitas kernel_image kernel_headers

After this compilation has completed, there will be two Debian packages in the directory above the one you did the build process in. Type sudo dpkg -i *.deb to install these packages. Then re-boot to load your all new Linux kernel!

C:\HOME\FLYNN\DOCUMENTS> ls linux-**.deb
-rw-r--r-- 1 flynn flynn 7.6M  07-06-12 06:06 pm linux-headers-3.4.0-rc2-bejiitas_3.4.0-rc2-bejiitas-10.00.Custom_amd64.deb
-rw-r--r-- 1 flynn flynn  38M  07-06-12 06:04 pm linux-image-3.4.0-rc2-bejiitas_3.4.0-rc2-bejiitas-10.00.Custom_amd64.deb

Now install the Debian packages onto our system. And we are done.

C:\HOME\FLYNN\DOCUMENTS> sudo dpkg -i linux-**.deb
[sudo] password for flynn: 
Selecting previously unselected package linux-headers-3.4.0-rc2-bejiitas.
(Reading database ... 223255 files and directories currently installed.)
Unpacking linux-headers-3.4.0-rc2-bejiitas (from linux-headers-3.4.0-rc2-bejiitas_3.4.0-rc2-bejiitas-10.00.Custom_amd64.deb) ...
Selecting previously unselected package linux-image-3.4.0-rc2-bejiitas.
Unpacking linux-image-3.4.0-rc2-bejiitas (from linux-image-3.4.0-rc2-bejiitas_3.4.0-rc2-bejiitas-10.00.Custom_amd64.deb) ...
Done.
Setting up linux-headers-3.4.0-rc2-bejiitas (3.4.0-rc2-bejiitas-10.00.Custom) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
Setting up linux-image-3.4.0-rc2-bejiitas (3.4.0-rc2-bejiitas-10.00.Custom) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
update-initramfs: Generating /boot/initrd.img-3.4.0-rc2-bejiitas
Warning: No support for locale: en_AU.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.4.0-rc2-bejiitas...
P: Writing config for /boot/vmlinuz-3.2.0-24-generic...
P: Writing config for /boot/vmlinuz-3.2.0-23-generic...
P: Updating /boot/extlinux/linux.cfg...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.4.0-rc2-bejiitas /boot/vmlinuz-3.4.0-rc2-bejiitas
Generating grub.cfg ...
Found background image: grub2wall.png
Found linux image: /boot/vmlinuz-3.4.0-rc2-bejiitas
Found initrd image: /boot/initrd.img-3.4.0-rc2-bejiitas
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Linux Mint 12 Lisa (12) on /dev/sdb1
done

No comments have been made. Use this form to start the conversation :)

Leave a Reply