How To: Upgrade your kernel, painlessly.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
TheOne
Level 1
Level 1
Posts: 21
Joined: Tue May 28, 2013 10:29 am

Re: How To: Upgrade your kernel, painlessly.

Postby TheOne » Mon Jun 03, 2013 11:58 am

The new easy way is:

Menu --> Update Manager ---> Edit ---> Preferences ---> Mark everything, including Level 4 and 5

Reload updates and update kernel.
Capitalists for the use of Linux and open software.
http://2briancox.wordpress.com/2011/07/ ... -software/

AlbertP
Level 16
Level 16
Posts: 6705
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: How To: Upgrade your kernel, painlessly.

Postby AlbertP » Mon Jun 03, 2013 5:06 pm

That updates you to the latest kernel version that Ubuntu put in the repository of your version (Mint 13 is based on Ubuntu 12.04, Mint 14 on Ubuntu 12.10, Mint 15 on Ubuntu 13.04). With the how-to posted by Kendall, which should still work on all supported Mint editions, you're free to choose your own kernel version including RC versions. I won't deprecate that how-to.

Also, if you need Ubuntu's kernel updates for your version, you can just as well use Synaptic to update linux-image and linux-headers (Status > Installed (upgradeable)), then you don't need to un-hide the other level 4/5 updates. I don't think you need level 4, though.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.

soldier1st
Level 1
Level 1
Posts: 39
Joined: Fri Aug 17, 2012 2:59 am
Location: /home/soldier1st

Re: How To: Upgrade your kernel, painlessly.

Postby soldier1st » Mon Jul 22, 2013 8:25 pm

TheOne wrote:The new easy way is:

Menu --> Update Manager ---> Edit ---> Preferences ---> Mark everything, including Level 4 and 5

Reload updates and update kernel.

Is that a safe thing to do? i would assume anything over lv 3 was to be avoided unless there is a specific reason to enable them?

User avatar
tdockery97
Level 14
Level 14
Posts: 5025
Joined: Sun Jan 10, 2010 8:54 am
Location: Salem, Oregon
Contact:

Re: How To: Upgrade your kernel, painlessly.

Postby tdockery97 » Mon Jul 22, 2013 8:51 pm

soldier1st wrote:Is that a safe thing to do? i would assume anything over lv 3 was to be avoided unless there is a specific reason to enable them?

The update levels are there to make it easy for less experienced individuals to keep applications updated while basically leaving the underlying system the same, thus less chance of suffering breakage.

Doing all available updates won't make your pc explode. Everyone (millions) running regular Ubuntu do complete updates all the time. Granted, once in a great while you may have to seek help here if something breaks. Another thing to keep in mind is that when a kernel is updated, the old kernel is still kept in the system, and at the Grub Boot Screen you can "drop back" to the previous kernel if the new one causes problems.
Image

thkang
Level 1
Level 1
Posts: 13
Joined: Sun Aug 26, 2012 11:57 am

Re: How To: Upgrade your kernel, painlessly.

Postby thkang » Sun Jul 28, 2013 5:23 am

Code: Select all

#!/usr/bin/python
# -*- coding: utf-8 -*-

import urllib2
import collections
import datetime
import lxml.html
import re
import os
import argparse
import subprocess
from pkg_resources import parse_version

arch='amd64'
use_rc_versions=False
kernelurl="http://kernel.ubuntu.com/~kernel-ppa/mainline/"
kinfo=collections.namedtuple('KernelInfo', ['datetime', 'version', 'link'])

def dl_file(url):
    f = urllib2.urlopen(url)
    with open(os.path.basename(url), "wb") as dlf:
        dlf.write(f.read())

def fetch_latest(kernelurl, use_rc_versions):

    r = urllib2.urlopen(kernelurl)
    doc=lxml.html.document_fromstring(r.read())
    content=doc.text_content()

    reg_ex=re.compile(r'v([\d.]+)(-rc[\d]+)?-([^/]+)/(.+?)\s\s')
    d=[]

    for m in (m for m in (reg_ex.match(x) for x in content.split('\n') if x) if m):
        version, isrc, code, date = m.groups()
        if (not use_rc_versions) and isrc: continue
        version = '%s%s' %(version, (isrc or ''))
        date = datetime.datetime.strptime(date, '%d-%b-%Y %H:%M')
        d.append(kinfo(date, parse_version(version), 'v%s-%s/' %(version, code)))
   
    return max(d, key=lambda x:x.version)

def dl_debs(url, arch, no_download):
    r2 = urllib2.urlopen(url)
    doc2=lxml.html.document_fromstring(r2.read())
    content=doc2.text_content()
    reg_ex2=re.compile('linux-(headers|image)-(.+?)_(amd64|i386|all)\.deb')

    for line in content.split('\n'):
        m=reg_ex2.match(line)
        if m:
            if m.group(1)=='headers':
                if m.group(3)=='all':
                    headers_all=m.group(0)
                elif m.group(3)==arch:
                    headers_arch=m.group(0)
            elif m.group(1)=='image' and m.group(3)==arch:
                image_arch=m.group(0)

    for f in [headers_all, headers_arch, image_arch]:
        print 'downloading: %s' %f
        if not no_download:
            dl_file(url+f)
   
    return [headers_all, headers_arch, image_arch]

if __name__ == '__main__':
   
    parser = argparse.ArgumentParser()
    parser.add_argument('-m', '--machine',
                        help="use this kernel machine, default: %s" %arch,
                        action="store",
                        default=arch)

    parser.add_argument('--kernel-ppa-url',
                        help="where to fetch ubuntu kernels, default: %s" %kernelurl,
                        action="store",
                        default=kernelurl)
    parser.add_argument('--use-rc',
                        help="allow updating to rc versions",
                        action="store_true")
    parser.add_argument('--no-download',
                        help="do not download(list only) files",
                        action="store_true")
    parser.add_argument('--install',
                        help="install the downloaded kernels. note: run with root privileges",
                        action="store_true")

    args=parser.parse_args()
    os.chdir('/tmp')

    latest = fetch_latest(args.kernel_ppa_url, args.use_rc)
    print 'the latest linux kernel version is : \n\t%s\n' %latest.link.strip('/')
    debs=dl_debs(args.kernel_ppa_url + latest.link, args.machine, args.no_download)
    if args.install:
        subprocess.call(['dpkg', '-E', '--install'] + debs)


here's script that automates this:

it just search http://kernel.ubuntu.com/~kernel-ppa/mainline/ for the latest version and downloads it.

you need to specify your cpu machine architecture to run(default is amd64), with -m amd64 or -m i386
with --use-rc flag, you can update to rc versions(release candidates).
you need --install flag, to install the kernels downloaded.
with --no-download flag, it does not download anything.
requires lxml and distribute to run.

save above as 'update-kernel.py'.
then do

Code: Select all

chmod +x update-kernel.py
sudo ./update-kernel.py -m amd64 --use-rc --install

tested on my machine. for now it updates to 3.10.3 / 3.11rc2
IBM-Lenovo X201 Tablet + Samsung SSD 830 + Linux Mint 15 MATE

styson464
Level 1
Level 1
Posts: 2
Joined: Tue Apr 10, 2012 4:39 pm

Re: How To: Upgrade your kernel, painlessly.

Postby styson464 » Fri Sep 06, 2013 5:46 pm

I upgrade Mint 15 Cinnamon to 3.10 doing the following:

Code: Select all

wget -c kernel.ubuntu.com/~kernel-ppa/mainline/v3.10-saucy/linux-headers-3.10.0-031000_3.10.0-031000.201306301935_all.deb
wget -c kernel.ubuntu.com/~kernel-ppa/mainline/v3.10-saucy/linux-headers-3.10.0-031000-generic_3.10.0-031000.201306301935_amd64.deb
wget -c kernel.ubuntu.com/~kernel-ppa/mainline/v3.10-saucy/linux-image-3.10.0-031000-generic_3.10.0-031000.201306301935_amd64.deb


Code: Select all

sudo dpkg -i *.deb


After I reboot and login, it takes a long time for the desktop to come up and when it finally does the icon theme is different and the GNOME theme looks like some kind of default (very square and blocky) and I cannot use tools such as Display, it just runs then disappears. I cannot change the desktop them so something is broken. I'm upgrading the kernel so I can use my Displaylink USB Video adapter and 3.9+ kernels have support for it. Any ideas?

User avatar
Lvcoyote
Level 1
Level 1
Posts: 30
Joined: Sat Oct 23, 2010 9:39 am

Re: How To: Upgrade your kernel, painlessly.

Postby Lvcoyote » Sun Feb 02, 2014 3:08 am

Just used the method described in the first post and it worked perfectly to update the kernel to 3.12.9 in Mint 16 Cinnamon.
ASUS Rampage IV Black Edition, i7 4930K, G.Skill Trident 4X4 GB DDR3 2400, EVGA GTX 780 Classified, Corsair 700D, Corsair HX850W PSU, Samsung 840 Pro 256 GB SSD, Plextor SATA Blu-Ray, Water Cooled CPU and Video Card, Linux Mint 16

lodhi022
Level 1
Level 1
Posts: 1
Joined: Fri Feb 14, 2014 12:21 am

Re: How To: Upgrade your kernel, painlessly.

Postby lodhi022 » Fri Feb 14, 2014 12:26 am

Simple and excellent method :P

User avatar
Lvcoyote
Level 1
Level 1
Posts: 30
Joined: Sat Oct 23, 2010 9:39 am

Re: How To: Upgrade your kernel, painlessly.

Postby Lvcoyote » Fri Feb 14, 2014 12:32 am

I used this method again this morning to update to 3.12.10, no problems again.
ASUS Rampage IV Black Edition, i7 4930K, G.Skill Trident 4X4 GB DDR3 2400, EVGA GTX 780 Classified, Corsair 700D, Corsair HX850W PSU, Samsung 840 Pro 256 GB SSD, Plextor SATA Blu-Ray, Water Cooled CPU and Video Card, Linux Mint 16

charlieg
Level 2
Level 2
Posts: 50
Joined: Tue Dec 31, 2013 8:02 am

Re: How To: Upgrade your kernel, painlessly.

Postby charlieg » Wed Aug 06, 2014 5:59 am

Be warned; with the 3.16 kernel there are issues for laptop users and backlight adjustment. I have to keep rebooting to the 3.13 official mint kernel in order to get my brightness back.

More information: https://bugs.launchpad.net/ubuntu/+sour ... ug/1341108

JeremyB
Level 13
Level 13
Posts: 4887
Joined: Fri Feb 21, 2014 8:17 am

Re: How To: Upgrade your kernel, painlessly.

Postby JeremyB » Sun Sep 21, 2014 3:49 pm

With LM 17, updating the kernel to official Ubuntu 14.04/LM 17 kernels is very easy through Mint Update(Update Manager). Click on 'View' and then 'Linux Kernels' and it will display the kernels that are available and installed and all you have to do is click on the install button below the kernel number. If you updated to a 3.15, it will let you uninstall those also

misGnomer
Level 2
Level 2
Posts: 73
Joined: Tue Aug 24, 2010 2:09 pm

Re: How To: Upgrade your kernel, painlessly.

Postby misGnomer » Wed Oct 15, 2014 3:22 pm

Looking after a bunch of Intel systems of last few generations I've for some time downloaded a single copy of latest Liquorix' amd64 kernel release and installed it locally.

The Liquorix guys openly said they don't support Ubuntu (which the non-LMDE ''mainstream' Mint is based on) but only just recently the config changes in their 3.16.5 release broke compatibility with Mint 17 LTS.

It was great as long as it lasted!

Still, the combined Mint 17 + buntu 14.04 LTS userbase is not insignificant and many might benefit from running something newer than 3.13 from early 2014.

I'm now testing waters with manually downloaded kernel (3.17.1) from the Ubuntu kernel-ppa mainline branch (no probs so far) but is there anything that is built specifically for the LTS base?

darvems
Level 1
Level 1
Posts: 4
Joined: Thu Dec 11, 2014 10:56 am

Re: How To: Upgrade your kernel, painlessly.

Postby darvems » Thu Dec 11, 2014 8:55 pm

Thanks for the Tutorial it worked like a charm :)

User avatar
lint
Level 1
Level 1
Posts: 17
Joined: Wed May 18, 2016 6:45 am

Re: How To: Upgrade your kernel, painlessly.

Postby lint » Fri May 20, 2016 11:39 am

I'm not sure what kernel I would need or if I should even upgrade or not. I have a 64 bit machine with a duo and 1G of RAM, but running a Mint 17.3 32 bit. :?:

User avatar
Dr G
Level 1
Level 1
Posts: 30
Joined: Wed May 18, 2011 4:38 pm

Re: How To: Upgrade your kernel, painlessly.

Postby Dr G » Fri May 20, 2016 12:58 pm

lint wrote:I'm not sure what kernel I would need or if I should even upgrade or not. I have a 64 bit machine with a duo and 1G of RAM, but running a Mint 17.3 32 bit. :?:


The short answer is, if nothing is amiss, you really do not need to change kernels. OTOH, if you're feeling adventuresome, people seem to learn best by trying something new.

IMHO, a far more useful step than changing kernels would be to increase your RAM. :)

User avatar
lint
Level 1
Level 1
Posts: 17
Joined: Wed May 18, 2016 6:45 am

Re: How To: Upgrade your kernel, painlessly.

Postby lint » Fri May 20, 2016 7:18 pm

Dr G wrote:
IMHO, a far more useful step than changing kernels would be to increase your RAM. :)


I'm doing that as well; for about 15 $ with shipping too. So, the 64 bit won't make my machine "powerful" as a friend of mine has claimed? :shock:

User avatar
Dr G
Level 1
Level 1
Posts: 30
Joined: Wed May 18, 2011 4:38 pm

Re: How To: Upgrade your kernel, painlessly.

Postby Dr G » Fri May 20, 2016 10:38 pm

lint wrote:
Dr G wrote:
IMHO, a far more useful step than changing kernels would be to increase your RAM. :)


I'm doing that as well; for about 15 $ with shipping too. So, the 64 bit won't make my machine "powerful" as a friend of mine has claimed? :shock:


Powerful? Not really, but that assessment depends upon what you are doing with it. The extra memory should yield a noticeable improvement in the system's responsiveness. If you're adding a *lot* of memory, 64 bit could be a wise additional step. But, I'm guessing you won't be adding that much. :mrgreen:

User avatar
lint
Level 1
Level 1
Posts: 17
Joined: Wed May 18, 2016 6:45 am

Re: How To: Upgrade your kernel, painlessly.

Postby lint » Sat May 21, 2016 1:48 am

Dr G wrote:
lint wrote:
Dr G wrote:
IMHO, a far more useful step than changing kernels would be to increase your RAM. :)


I'm doing that as well; for about 15 $ with shipping too. So, the 64 bit won't make my machine "powerful" as a friend of mine has claimed? :shock:


Powerful? Not really, but that assessment depends upon what you are doing with it. The extra memory should yield a noticeable improvement in the system's responsiveness. If you're adding a *lot* of memory, 64 bit could be a wise additional step. But, I'm guessing you won't be adding that much. :mrgreen:


You are correct; the 2G RAM stick is the maximum for what I have. I thank you for confirming that the 32 bit is the better option at present.

fruitkiller
Level 2
Level 2
Posts: 92
Joined: Tue Aug 05, 2014 7:52 pm

Re: How To: Upgrade your kernel, painlessly.

Postby fruitkiller » Thu Jun 16, 2016 12:57 pm

Hello Gentlemen,

I have a pretty short question and before I embark on the risky adventure full of cliffs and traps knowns as kernel installation. I use LM 17.3 x64, when I go to the update Manager and click on View then Linux Kernels, the one I am seeing as being loaded is 3.19.0-32. I see there's a lot of guides for installing kernel 3.19.1, 3.19.2, 3.19.3, I've seen this because in the Update Manager, they do not appear after kernel 3.19.0-61, it jumps to kernel 4.2.0-18 and has a dozen more 4.x.x kernels.

So what is one to do (a higher kernel means being able to install higher versions of certain software is my understanding, tell me if I'm wrong). I don't feel safe at jumping from Kernel 3.x.x to version 4 just now, certainly when the system does not seem to want me to particularly do so (not appearing in the updates ever, and I have all 5 levels of updates allowed to appear.

Should I install 3.1, 3.2, 3.3 or these are useless if I can install a version 4 kernel ? Please help this seasoned but not yet professional Linux user :)

User avatar
Moem
Level 7
Level 7
Posts: 1525
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands

Re: How To: Upgrade your kernel, painlessly.

Postby Moem » Thu Jun 16, 2016 1:53 pm

Good day, madam,

fruitkiller wrote:So what is one to do (a higher kernel means being able to install higher versions of certain software is my understanding, tell me if I'm wrong).

You're wrong. :wink:
Mostly a newer kernel means better hardware support. If all is going well with your machine right now, you do not experience crashes or freezes, and all your hardware is supported, a newer kernel will not bring you any noticeable advantages. If there are no problems to solve, you don't need to upgrade your kernel.
So before you ask: How to upgrade my kernel, the question to ask is: Why to upgrade my kernel.

fruitkiller wrote: the system does not seem to want me to particularly do so (not appearing in the updates ever, and I have all 5 levels of updates allowed to appear.)

From my understanding, and I too may be wrong, in Mint 17.X newer kernels are not shown as an update, no matter which levels you have made visible.

By the way, it's better to start your own thread for a new question. This one is pretty old and part of it is very outdated.
My other machine is a Thinkpad too.


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests