For Cloud Backup

If you get the error message snapapi fails to build when installing the Cyber Protection Agent, you need to make sure that the running kernel matches the latest installed version.

Below are 2 possible approaches to do this and the steps required to do so.

Option 1: Check the kernel version and select the new kernel on reboot (Recommended)

  • First, check the kernel version currently in use. To check it, enter the following command:

    uname -r

  • Install the kernel-devel package and check the version. To do this, enter the following commands:

    CentOS
    Install the kernel-deve1 package:

    yum install kernel-devel

    Check the version:

    rpm -qa |grep kernel

    Ubuntu/Debian
    Install kernel-devel package:

    sudo apt install linux-headers-amd64

    Check version:

    dpkg -l linux-headers-*

  • If the header/devel package has a higher version number than the current kernel, you must install a newer kernel. To do this, enter the following command(s):

    Centos

    yum update kernel

    If you already have the latest kernel version installed, enter the following command to install a correct and compatible version of the kernel-devel package:

    sudo yum install "kernel-devel-uname-r == $(uname -r)"

    Debian

    sudo apt install linux-image-amd64

    Ubuntu/Debian
    Update all packages. Enter the following command:

    sudo apt update && apt upgrade

    sudo apt dist-upgrade

  • Perform a reboot. Depending on the distribution, this may require different steps:

    CentOS 7
    Set the kernel version and reboot. How to set the kernel version is explained in the section Setting the Kernel Version as Default (CentOS 7).

    Ubuntu
    If necessary, reboot and select the new kernel from the grub menu at boot time.

  • Install the Cyber Protection Agent. Instructions can be found in the following articles:

    Cloud Server:
    Installing the Backup Agent (Linux)

    Dedicated Server:
    Installing the Backup Agent (Dedicated Server with Linux)

    MyBackup:
    Installing the Cyber Protection Agent (PC or Laptop with Windows)

Option 2: Check the kernel version, download the correct Linux headers package, and move it to /usr/src/kernels (applies to Debian only)

If you do not want to reboot or use a different kernel, do the following:

Checking If a Dedicated Server Uses UEFI or BIOS (CentOS 7)

Depending on whether UEFI or BIOS is used as the interface between hardware and operating system, you need to specify different parameters when setting the kernel version as the default.

To check whether your server uses BIOS or UEFI to interface between the hardware and the operating system, enter the following command:

[root@localhost ~]# [ -d /sys/firmware/efi ] && echo UEFI || echo bios

Setting the Highest Installed Kernel Version as Default (CentOS 7)

To set the highest installed kernel version as the default, do the following:

  • Open the /etc/default/grub file with the vi editor. Enter the following command:

    [root@localhost ~]# vi /etc/default/grub

  • Replace the value at the entry GRUB_DEFAULT= with 0:

    GRUB_TIMEOUT=1
    GRUB_DEFAULT=0
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL_OUTPUT="console"
    GRUB_CMDLINE_LINUX="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=auto"
    GRUB_DISABLE_RECOVERY="true"

    Other kernels can be selected, for example, with the entry GRUB_DEFAULT=1 or GRUB_DEFAULT=2.

  • Regenerate the grub configuration file. To do this, enter the following command:

    BIOS

    [root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

    UEFI

    [root@localhost ~]# grub2-mkconfig -o /boot/efi/EFI/cen