Saturday, April 12, 2014

Upgrading Ubuntu's kernel

Upgrading Ubuntu Quantal/Precise 64 bit kernel 3.2.0 to 3.14.0 kernel level/version

Method 1

We upgrade just the kernel version/release.

We have:
root@suricata:~/kernel-upgrade# uname -a
Linux suricata 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Make sure you have the latest updates:
 apt-get update && apt-get upgrade
 apt-get dist-upgrade

 Download the new kernel image and headers:



 Install the packages and reboot:
 dpkg -i linux-headers-3.14.0-*.deb linux-image-3.14.0-*.deb

 log in and update/upgrade:
 apt-get update && apt-get upgrade

 Let's see:
root@suricata:~# uname -a
Linux suricata 3.14.0-031400-generic #201403310035 SMP Mon Mar 31 04:36:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Method 2

We upgrade the whole release (including the kernel) from Precise to Trusty. This will also update the /etc/apt/ repo lists and more.

 apt-get update && apt-get upgrade
 apt-get dist-upgrade
 do-release-upgrade -d


Sunday, April 6, 2014

Upgrading Debian Wheezy's kernel

Upgrade form Debian Wheezy 64 bit (with GDM3/xfce) 3.2.0 to 3.14.0 kernel level/version.
you might also want to take a look at this tutorial as well if you are interested in creating ready for installation packages-
First we need some tools:
apt-get install gcc libncurses5-dev bc ca-certificates pkg-config make flex bison build-essential autoconf automake
Make sure everything is updated/upgraded:
 apt-get update && apt-get upgrade
 apt-get dist-upgrade
 Just to get read of some cached space:
 apt-get clean

 Download and build the kernel:
 tar xvfJ linux-3.14.tar.xz -C /usr/src
 cd /usr/src/linux-3.14/
 yes "" | make oldconfig

 This could take 20 min:
Make and install the modules and the kernel
 make modules_install install
root@debian64:~# ls -lh /boot
total 149M
-rw-r--r-- 1 root root 129K Apr  5 19:28 config-3.14.0
-rw-r--r-- 1 root root 127K Feb  1 20:16 config-3.2.0-4-amd64
drwxr-xr-x 3 root root  12K Apr  5 19:30 grub
-rw-r--r-- 1 root root 129M Apr  5 19:30 initrd.img-3.14.0
-rw-r--r-- 1 root root  10M Mar 11 09:26 initrd.img-3.2.0-4-amd64
-rw-r--r-- 1 root root 2.3M Apr  5 19:28
-rw-r--r-- 1 root root 2.1M Feb  1 20:16
-rw-r--r-- 1 root root 3.1M Apr  5 19:28 vmlinuz-3.14.0
-rw-r--r-- 1 root root 2.8M Feb  1 19:51 vmlinuz-3.2.0-4-amd64

 your /boot/grub/grub.cfg should have a similar section (notice the new 3.14.0) :

 Make sure you have at least one non root user

 If you want to log into the Desktop Manager as root:
 log in with the non root user.

 su root
 vim  /etc/pam.d/gdm3

 comment out (like shown)
 #auth   required user != root quiet_success
 save the file

 change the root password
 passwd root

 You can log in as root if you want to.
 Make sure you are with running the latest packages:
 apt-get update && apt-get upgrade
root@debian64:~# uname -a
Linux debian64 3.14.0 #1 SMP Sat Apr 5 19:19:46 EDT 2014 x86_64 GNU/Linux