Canonical Livepatch was introduced in Ubuntu 16.04. The livepatch option allows you to install kernel updates without system reboot. It is a great option and servers must have it enabled to prevent system reboot.
The upcoming Ubuntu 20.04 “Focal Fossa” supports Canonical Livepatch.
Livepatch important for servers
If your server is powered by Ubuntu, then you should enable Canonical Livepatch. Livepatch will silently install Kernel updates without requiring a system reboot. Though it is also availbale for Desktop users but is less useful.
The entire purpose of Livepatch is to prevent the system reboot after the kernel updates, the desktop users will anyway restart the computer every now and then. So Livepatch can be installed and setup but will rarely be used.
Also, it’s important to note that Livepatch feature is free for up to 3 devices for personal use. You can set up Livepatch on Desktops, servers, virtual machines, and in the cloud. Organizations will need to pay for the service by subscribing to Ubuntu Advantage.
How to set up Canonical Livepatch in Ubuntu 20.04 “Focal Fossa”
For Ubuntu desktop users
- Setting up livepatch on Ubuntu desktop is very simple. Open settings and go to Software & updates. Go to Livepatch tab.
- Click the “Sign in” button and enter your Ubuntu credentials. If you do not have Ubuntu account, please create one.
- After signed in, click Continue when the popup shows up confirming you are logged in.
- And that is it. The livepatch is set up on your Ubuntu 20.04 Desktop.
Errors In Ubuntu 20.04 with Livepatch
You may encounter the following error when enabling Livepatch on Ubuntu 20.04 Focal Fossa –
Failed to enable Livepatch: cannot enable machine: this machine ID is already enabled with a different key or is non-unique. Either "sudo canonical-livepatch disable" on the other machine, or regenerate a unique /etc/machine-id on this machine with "sudo rm /etc/machine-id /var/lib/dbus/machine-id && sudo systemd-machine-id-setup" server response: Conflicting machine-id
To fix the error, type the following commands in the terminal –
cp /etc/machine-id /etc/machine-id.original cp /var/lib/dbus/machine-id /var/lib/dbus/machine-id.original nano /etc/machine-id (to remove the existing value) systemd-machine-id-setup > Initializing machine ID from D-Bus machine ID. cat /etc/machine-id
For Ubuntu servers
Setting up Canonical Livepatch service is even easier on Ubuntu servers. Head over to Ubunut’s Livepatch page, and select “Ubuntu user”. Click “Get your livepatch token”.
It will show your livepatch token and the commands to install and enable livepatch service. Now copy the commands one by one and run on the server.
sudo snap install canonical-livepatch sudo canonical-livepatch enable UNIQUE_TOKEN
It is done! The livepatch set up and installed on the server. To check the status, run the following command –
canonical-livepatch status --verbose
The post How To Set Up Canonical Livepatch On Ubuntu 20.04 “Focal Fossa” appeared first on LinuxAndUbuntu.
from LinuxAndUbuntu https://ift.tt/3dQvzYp
0 Comments