Programming

Linux Kernel Upgrade

쁘레드 2015. 5. 4. 04:28

Kernel upgrade with binaries (3.18.3)

 
Install the files now- 
$ sudo dpkg -i linux-headers-3.18.3*.deb linux-image-3.18.3*.deb


Update grub and reboot 

$ sudo update-grub

$ sudo reboot

 



Uninstall 3.18.3

sudo apt-get remove 'linux-headers-3.18.3*' 'linux-image-3.18.3*'


check linux kernel version

command -

$ uname
$ uname -a
$ uname -r

*Pre-requiste for kernel config


sudo apt-get install libncurses5-dev libncursesw5-dev


Git Clone and checkout to branch 3.18.3

http://stackoverflow.com/questions/28136815/linux-kernel-how-to-obtain-a-particular-version-right-upto-sublevel

# Clone the kernel to your local machine
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ cd linux-stable

# to check kernel version
$ make kernelversion
# Find the tag for the version you want
$ git tag -l | grep 3.18.3
v3.18.3

# Create a new branch with that tag
$ git checkout -b my3.18.3 v3.18.3


Build

Make menuconfig 

make

make -j8 ; -j for multi thread

make modules_install

make install


#or oneline command

make -j8 && make modules_install && make install



Make Boottable, and config bootloader(grub)

add new entry for new kernel

cd /boot

mkinitrd -o initrd.img -<kernelversion> <kernelversion>


????