iDrive Logo

IDrive doesn’t like your OS

I use Endeavour and the IDrive for Linux scripts don’t work. They return an error that the OS is not identified and prerequisites are not met.

The reasons are because the scripts only identify the most common OSs and I guess they don’t know all the distros out there. You can contact support to update your OS in their scripts.

Fix the script

When you’ve unpacked the scripts, navigate inside the IDriveForLinux folder and drill down to scripts/Idrivelib/lib

Edit the file Common.pm

Search for the subroutine getOSBuild. After $os and $build are declared, return immediately with return {'os' => "debian", 'build' => "9"};. Your file will look something similar to that below:

... other code ...
sub getOSBuild {
	my ($os, $build) = ('', 0);

	return {'os' => "debian", 'build' => "9"};

	# check OS release file
	if (-f '/etc/os-release') {
		my $osresCmd = updateLocaleCmd('cat /etc/os-release');
		my $osres = `$osresCmd`;
		Chomp(\$osres);

		$osres  = "\n".$osres;
		$os	= $1 if ($osres =~ /\nID=(.*?)\n/s);
		$os	= $1 if ($os eq '' and $osres =~ /\nID=(.*?)$/s);
		$os	=~ s/\"//gs;
... other code ...

This essentially bypasses the checks in the subroutine and declare you’re using Debian. The distro you use doesn’t matter - we’re just trying to fool the script into installing correctly. Linux is Linux, as far as these scripts are concerned.

Run the install again as per the instructions, and all should be good (at least regarding your OS anyway!)

Goes without saying, hopefully - if you update your scripts and need to reinstall, you’ll have to do this again if the error shows up again.