How To: Upgrade your kernel, painlessly.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Re: How To: Upgrade your kernel, painlessly.

Postby TheOne on 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/
User avatar
TheOne
Level 1
Level 1
 
Posts: 21
Joined: Tue May 28, 2013 10:29 am

Linux Mint is funded by ads and donations.
 

Re: How To: Upgrade your kernel, painlessly.

Postby AlbertP on 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.
AlbertP
Level 16
Level 16
 
Posts: 6522
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: How To: Upgrade your kernel, painlessly.

Postby soldier1st on 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?
soldier1st
Level 1
Level 1
 
Posts: 40
Joined: Fri Aug 17, 2012 2:59 am
Location: /home/soldier1st

Re: How To: Upgrade your kernel, painlessly.

Postby tdockery97 on 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

HP Pavilion 17 Notebook, 8GB DDR3, 2.5GHZ A10-APU, Radeon HD 8650G
User avatar
tdockery97
Level 13
Level 13
 
Posts: 4917
Joined: Sun Jan 10, 2010 8:54 am
Location: Salem, Oregon

Re: How To: Upgrade your kernel, painlessly.

Postby thkang on 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
thkang
Level 1
Level 1
 
Posts: 16
Joined: Sun Aug 26, 2012 11:57 am

Re: How To: Upgrade your kernel, painlessly.

Postby styson464 on 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?
styson464
Level 1
Level 1
 
Posts: 4
Joined: Tue Apr 10, 2012 4:39 pm

Re: How To: Upgrade your kernel, painlessly.

Postby Lvcoyote on 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
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 lodhi022 on Fri Feb 14, 2014 12:26 am

Simple and excellent method :P
lodhi022
Level 1
Level 1
 
Posts: 1
Joined: Fri Feb 14, 2014 12:21 am

Re: How To: Upgrade your kernel, painlessly.

Postby Lvcoyote on 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
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 charlieg on 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
charlieg
Level 1
Level 1
 
Posts: 22
Joined: Tue Dec 31, 2013 8:02 am

Re: How To: Upgrade your kernel, painlessly.

Postby JeremyB on 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
JeremyB
Level 7
Level 7
 
Posts: 1716
Joined: Fri Feb 21, 2014 8:17 am

Re: How To: Upgrade your kernel, painlessly.

Postby misGnomer on 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?
misGnomer
Level 2
Level 2
 
Posts: 63
Joined: Tue Aug 24, 2010 2:09 pm

Re: How To: Upgrade your kernel, painlessly.

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

Thanks for the Tutorial it worked like a charm :)
darvems
Level 1
Level 1
 
Posts: 4
Joined: Thu Dec 11, 2014 10:56 am

Linux Mint is funded by ads and donations.
 
Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests