Compiling R1Soft Backup Agent on Ubuntu 16.x or 14.x

** UPDATE FOR UBUNTU 16.X **

it’s a little different with these versions of ubuntu, you can follow the instructions below, but when it comes time to updating your grub config, do this instead.

# grep menuentry /boot/grub/grub.cfg

Which, will output all the kernels, which now you just have to ‘count’ the entries, so for example

if [ x"${feature_menuentry_id}" = xy ]; then
 menuentry_id_option="--id"
 menuentry_id_option=""
export menuentry_id_option
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 4.4.0-62-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-62-generic-advanced-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 4.4.0-62-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-62-generic-init-upstart-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 4.4.0-62-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-62-generic-recovery-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 4.4.0-59-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-59-generic-advanced-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 4.4.0-59-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-59-generic-init-upstart-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 4.4.0-59-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-59-generic-recovery-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 3.16.0-69-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-69-generic-advanced-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 3.16.0-69-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-69-generic-init-upstart-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
 menuentry 'Ubuntu, with Linux 3.16.0-69-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-69-generic-recovery-8e6c4ba1-8970-4c10-8245-ff967b14dad5' {
menuentry 'Memory test (memtest86+)' {
menuentry 'Memory test (memtest86+, serial console 115200)' {

Now, you just need to ‘count’ the entries, so for us we want to ‘downgrade’ to kernel 3.16.0.69-generic, which, starting at 0, makes it be 7, on the advanced menu.

Because we have a sub menu to deal with, we’ll have to execute this command;

# sudo grub-set-default "1>7"

Which is telling it to use the 7th option, on the 1st option (the submenu for advanced). Now you just run update-grub, and reboot.

# sudo update-grub

Old article below:

If, like us, you use R1Soft backups, you may have recently encountered an error trying to get it to compile on your Ubuntu 14.x or 16.x machines.

This is because they are nearly a year out of date on compiling for the latest kernels, the newest one currently supported is actually 3.16, so, the agent will fail on anything newer than that. You can view all the available module versions from the R1soft repository, by clicking here.

Their support is basically useless [unless you pay], so, we had to find our own solution.

This isn’t the most elegant way to fix things, but, it works, so there’s that. [I guess].¬†Basically, 16.x comes with kernel 4.4, which won’t work, so what did we end up having to do? Downgrade the kernel! ¬†

Well, not literally downgrade, we just used the older, supported kernel that was already installed.

To make this work for you, you’ll have to edit the grub configuration, by doing this.

# cp /etc/default/grub /etc/default/grub.bak

# nano /etc/default/grub

and make these changes

GRUB_DEFAULT=saved 
GRUB_TIMEOUT=2

then exit and save the file.

Now, we’re going to have to find out which kernels you have installed, for us, we simply did the following;

# grep menuentry /boot/grub/grub.cfg

Which, will give you output similar to the following;

menuentry 'Ubuntu, with Linux 4.4.0-31-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-advanced-64f733aa-c9fe-4aed-b662-8fd6b99d6825' {
menuentry 'Ubuntu, with Linux 4.4.0-31-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-init-upstart-64f733aa-c9fe-4aed-b662-8fd6b99d6825' {
menuentry 'Ubuntu, with Linux 4.4.0-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-recovery-64f733aa-c9fe-4aed-b662-8fd6b99d6825' {
menuentry 'Ubuntu, with Linux 3.16.0-77-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-77-generic-advanced-64f733aa-c9fe-4aed-b662-8fd6b99d6825' {
menuentry 'Ubuntu, with Linux 3.16.0-77-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-77-generic-init-upstart-64f733aa-c9fe-4aed-b662-8fd6b99d6825' {
menuentry 'Ubuntu, with Linux 3.16.0-77-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-77-generic-recovery-64f733aa-c9fe-4aed-b662-8fd6b99d6825' {

In our case, we want to use the 3.16.0.77 version of the kernel, so, we simply issue these commands;

# grub-set-default "gnulinux-advanced-64f733aa-c9fe-4aed-b662-8fd6b99d6825>gnulinux-3.16.0-77-generic-advanced-64f733aa-c9fe-4aed-b662-8fd6b99d6825"
# grub-reboot "gnulinux-advanced-64f733aa-c9fe-4aed-b662-8fd6b99d6825>gnulinux-3.16.0-77-generic-advanced-64f733aa-c9fe-4aed-b662-8fd6b99d6825"
# update-grub

then, you’re ready to reboot into your shiny old kernel

# reboot

now, you can verify that the R1Soft agent is working again, using this;

# hcp -v

Idera Hot Copy 5.14.4 build 433 (http://www.r1soft.com)
Documentation http://wiki.r1soft.com
Forums http://forum.r1soft.com

Thank you for using Hot Copy!
Idera makes the only Continuous Data Protection software for Linux.

hcp driver module: 4.6.1 build: 41

and

# /usr/sbin/r1soft/bin/cdp -v
(R1Soft CDP Agent) version 5.14.4 build 433 2016/07/18 16:41:16

That’s it! you’ve got working backups again!

 

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

Comment *

Name *
Email *
Website