17

I'm trying to install Intel Beacon Mountain on Ubuntu 13.10 (Saucy Salamander) 64-bit.

But the installer complained about it is not a supported OS. The installer only supports 12.04, 12.10 and 13.04. I looked at the script, but eventually it runs another installer (binary executable), and it seems to check the Ubuntu version itself. I just gave it a try to modify /etc/issue and /etc/issue.net, but as expected, I had no luck.

I'm not sure what mechanism the installer use to check OS version. Maybe lsb_release?

Is there any general approach to trick the OS version?

Actually, I don't have much interest in installing Beacon Mountain, but I want to know the way to trick the OS version.

4
  • Why don't you do a grep lsb_release {executable} if it shows a hit you know that is the file ;)
    – Rinzwind
    Apr 10, 2014 at 11:33
  • @Rinzwind I did. but there's no occurrence. Maybe it doesn't execute lsb_release as it is. Apr 10, 2014 at 11:36
  • 3
    Have you made sure that forcing an install will not cause any problems with the program in question? It's true that there's often no issue using a program made for an older version of an operating system on a only slightly newer version, but you should be aware that you could potentially have a problem (the safest solution, if the source code is available, would be to compile the program yourself, of course, but that may have more to do with compiler differences than kernel differences, I'm still a bit inexperienced in terms of the portability of Linux programs).
    – JAB
    Apr 10, 2014 at 13:01
  • @JAB I naively expected that it would work well and I knew that forcing an install might cause potential problem. In fact, it wasn't installed successfully but I could proceed the installation without any complain of version. Apr 10, 2014 at 14:13

2 Answers 2

20

The key is /etc/lsb-release.

I just modify /etc/lsb-release and make things work. I didn't know about that file before but /etc/issue. However, In my understanding, /etc/issue file is used for shell greeting message and /etc/issue.net file is for remote shell greeting. (FIXME)

I figure it out with strace lsb_release -a and found that it read /etc/lsb-release file.

1
  • excellent :) worthy of an upvote.
    – Rinzwind
    Apr 10, 2014 at 12:03
3

I just had to do this to get saltstack to run on the development release for Ubuntu 20.04.

The script /usr/lib/lsb_release is a python script which imports /usr/lib/python3/dist-packages/lsb_release.py. By examining the script I can see that it now reads /usr/lib/os-release instead of /etc/lsb_release and that it can be overridden by setting the environment variable LSB_OS_RELEASE.

You can trick the running program by setting this variable to point to a modified version of the os-release file. This will allow you to change the detected Ubuntu version on a per program basis instead of the entire system.

 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Focal Fossa (development branch)
Release:    20.04
Codename:   focal

 $ cat /usr/local/lib/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

 $ LSB_OS_RELEASE=/usr/local/lib/os-release lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic
1
  • This didn't actual fix the issue I was having with saltstack, but it does still change the detected operating system.
    – ewatt
    Mar 24, 2020 at 4:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .