Choose style:

Author Topic: (SOLVED) Canonical Kernel Livepatch  (Read 1211 times)

0 Members and 1 Guest are viewing this topic.

Offline r00t3r

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 1
  • r00t3r
    • View Profile
  • Peppermint version(s): Peppermint Ten (10)
(SOLVED) Canonical Kernel Livepatch
« on: February 05, 2018, 10:05:55 am »
Hello,

I'm interested in applying if possible Canonical Kernel Livepatch (https://insights.ubuntu.com/2017/06/06/canonical-kernel-livepatch-service-now-available-for-ubuntu-14-04-lts/), but having trouble with it.

sudo canonical-livepatch enable xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2018/02/05 15:02:37 Error executing enable?auth-token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Livepatchd error: Detected Peppermint 8. Only Ubuntu 16.04 LTS is supported, exiting.

Any ideas for a work-around it?
« Last Edit: February 07, 2018, 02:19:14 pm by r00t3r »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26267
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Canonical Kernel Livepatch
« Reply #1 on: February 05, 2018, 10:42:43 am »
If I had to guess it's probably looking in
/etc/lsb-release
for what the distro is.

So try running:
Code: [Select]
gksudo xed /etc/lsb-release
and make it read:-
Code: [Select]
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

# DISTRIB_ID=Peppermint
# DISTRIB_RELEASE=8
# DISTRIB_CODENAME=xenial
# DISTRIB_DESCRIPTION="Peppermint 8 Eight"
SAVE the file and exit the text editor.

Now see if running
Code: [Select]
sudo canonical-livepatch enable xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
works.

Once you're done REMEMBER to change lsb-release back by making it read:-
Code: [Select]
DISTRIB_ID=Peppermint
DISTRIB_RELEASE=8
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Peppermint 8 Eight"

# DISTRIB_ID=Ubuntu
# DISTRIB_RELEASE=16.04
# DISTRIB_CODENAME=xenial
# DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
and saving the file.

BTW, I've intentionally obfuscated the livepatch authentication token in the above command, and your earlier post .. so be sure to enter the correct token and not just copy/paste the above command.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline r00t3r

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 1
  • r00t3r
    • View Profile
  • Peppermint version(s): Peppermint Ten (10)
Re: Canonical Kernel Livepatch
« Reply #2 on: February 05, 2018, 12:48:08 pm »
Hello PCNetSpec,

Thanks for this, but unfortunately I'm still getting - "Livepatchd error: Detected Peppermint 8. Only Ubuntu 16.04 LTS is supported, exiting." after changes in /etc/lsb-release.

Any suggestions?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26267
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Canonical Kernel Livepatch
« Reply #3 on: February 05, 2018, 02:56:54 pm »
I take it you're attempting this on Peppermint EIGHT ? .. the reason I ask is that links seems to suggest Ubuntu 14.04 (which I'm pretty sure is wrong).

As long as you're using Peppermint 8 (?), I'll try figure it out in a VM over the next couple of days and come back to this.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline r00t3r

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 1
  • r00t3r
    • View Profile
  • Peppermint version(s): Peppermint Ten (10)
Re: Canonical Kernel Livepatch
« Reply #4 on: February 05, 2018, 03:01:19 pm »
Hello PCNetSpec,

Yeah, I'm trying it on Peppermint Eight.

https://insights.ubuntu.com/2016/10/20/live-kernel-patching-from-canonical-now-available-for-ubuntu/ - It supports "Ubuntu 16.04 LTS" as well which Peppermint Eight is based on.

Thanks for this.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26267
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Canonical Kernel Livepatch
« Reply #5 on: February 05, 2018, 03:25:06 pm »
Can you also post the output from:
Code: [Select]
uname -a
please.

I need to check if livepatching works with the HWE kernel, so it'd help if I was sure which kernel track you're on.
« Last Edit: February 05, 2018, 03:37:06 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline r00t3r

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 1
  • r00t3r
    • View Profile
  • Peppermint version(s): Peppermint Ten (10)
Re: Canonical Kernel Livepatch
« Reply #6 on: February 05, 2018, 04:15:35 pm »
Code: [Select]
Linux r00t3r 4.13.0-32-generic #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26267
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Canonical Kernel Livepatch
« Reply #7 on: February 06, 2018, 03:43:22 pm »
Okay it seems lsb-release must be edited BEFORE the canonical-livepatch snap is installed .. though it can be edited back afterwards (it also ignores '#' in lsb-release).

So ..

run:
Code: [Select]
sudo snap remove canonical-livepatch
then
Code: [Select]
gksudo xed /etc/lsb-release
and make it read
Code: [Select]
# DISTRIB_ID=Ubuntu
# DISTRIB_RELEASE=16.04
# DISTRIB_CODENAME=xenial
# DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

DISTRIB_ID=Peppermint
DISTRIB_RELEASE=8
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Peppermint 8 Eight"
SAVE the file and exit the text editor.

Back in the terminal run:
Code: [Select]
sudo snap install canonical-livepatch
then
Code: [Select]
gksudo xed /etc/lsb-release
make it read
Code: [Select]
DISTRIB_ID=Peppermint
DISTRIB_RELEASE=8
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Peppermint 8 Eight"
SAVE the file and exit the text editor.

Back in the terminal run:
Code: [Select]
sudo canonical-livepatch enable xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(obviously using your authentication token)

and this time you should see:-

Quote
Successfully enabled device. Using machine-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1



Don't ask me how well it works, in fact I can't guarantee it won't break things .. but that should at least get it installed and registered.
« Last Edit: February 07, 2018, 02:13:12 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline r00t3r

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 1
  • r00t3r
    • View Profile
  • Peppermint version(s): Peppermint Ten (10)
Re: Canonical Kernel Livepatch
« Reply #8 on: February 07, 2018, 01:44:04 pm »
Thank you PCNetSpec.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26267
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Canonical Kernel Livepatch
« Reply #9 on: February 07, 2018, 02:07:07 pm »
No worries my mate :)

If/when you're happy with the solution, can you please remember to mark the topic (SOLVED) .. you can do this by editing the FIRST posting in this topic and changing:-

Subject: Canonical Kernel Livepatch  (SOLVED by Mr Knowitall)

I'm kidding, just:

Subject: Canonical Kernel Livepatch  (SOLVED)

will do nicely :))

Thanks in advance.
« Last Edit: February 07, 2018, 02:08:59 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec