inxi icon indicating copy to clipboard operation
inxi copied to clipboard

Output Ubuntu OEM install identifier

Open Leseratte10 opened this issue 3 years ago • 4 comments

When Ubuntu or other distributions based on Ubuntu (Mint, PopOS, ElementaryOS, Zorin, ...) are installed in OEM mode (where the operating system is preinstalled by the hardware manufacturer), the system has an OEM identifier (which is set by the OEM installer when preparing the system / the golden image for his machines) that can be used to uniquely identify this machine or this batch of machines.

This can be seen on the second screenshot on this page: https://help.ubuntu.com/community/Ubuntu_OEM_Installer_Overview This OEM identifier is stored in /var/log/installer/oem-id; it'd be cool if inxi could display that identifier somewhere (maybe under "System" or "Machine") if this file is present.

I tested inxi 3.1.08-00 (2020-10-16) and pinxi 3.1.08-01 (2020-10-16) and neither of those display this OEM identifier anywhere. Given that the readme says inxi is mainly used for support stuff, I think that that would be a useful feature when supporting OEM machines.

Leseratte10 avatar Oct 17 '20 14:10 Leseratte10

First time I've ever heard of this, are you sure this is a standard file location? Is the file a text file? Is it readable by regular user, not just root?

Also, given I will never see one of these myself, you have to collect the contents of several of them, assuming they are text files.

Note that showing screenshots is useless since inxi would be looking for text files it can read.

I'm going to go out on a limb here and assume this is an ubuntu only feature, that is, they made up: /var/log/installer/oem-id randomly. One wonders if fedora, whichi s also now OEM installed on occasion, Lenovo for example, has the same file name, a different file name, or no such file name? One further wonders what the possible values look like, are they identifiers, or names?

So since I will never personally see an oem linux hardware install, it's up to you to collect the data since you want to see it.

Note again screen shots don't cut it, the file has to be parsed, readable, and the full content of it shown, for several distros, at least.

The readme notes what inxi is often used for as far as I am aware, that is just what it is.

If OEMs have any interest in this feature, they should give the data, which you should be easily able to get just by emailing them and asking. I'm not going to do that myself because this doesn't scratch any itch I personally have, but I do see how it could be useful to the OEMs themselves, which implies they should be willing to supply the data to you in order to get this feature supported.

Lenovo is being quite open by the way, and you could simply email their linux group and ask them for the information.;

Note that if you find this process tedious and don't want to do it, I feel the same way... so it's kind of up to the person who actually wants the feature to do the required research to get it.

I'll leave this issue/feature request up, but don't assume that just by asking me to do it that means I'm going to spend any time researching or emailing. So if you don't feel like doing it, it won't get done, if you do a good job of the research I'll look into adding it, but I don't want it to be ubuntu only, I want it to be a general solution, particularly including fedora/lenovo.

Other questions would be: who uses this? does system76 use it? Does Lenovo use it? You'll have to get busy emailing if you want these questions answered. I suggest, to avoid lengthy email exchanges, in an email, explain what you are looking for, why, the file location, or alternate locations if they use those, or if they don't use any, and the full text value of the file if a file is used.

smxi avatar Oct 17 '20 18:10 smxi

Also useful at a minimum from each such OEM release would be /etc/os-release file contents.

smxi avatar Oct 17 '20 23:10 smxi

I'm not sure if I'm understanding your reply correctly, but let me try to answer as best as I can:

  • This file, at least for Ubuntu and derivates, doesn't contain lots of information that has to be parsed. During OEM install, there's a step in the installer where it asks for "a unique name for this batch of systems". Whatever the person who does the OEM install enters in there (single line) will end up in the oem-id file, as is. So it's not really that you could maintain a list of possible IDs for each manufacturer, it's probably more likely to contain a batch number or a hardware model number.

  • On my machine which has been set up with this OEM installer the file has 664 permissions and is owned by root:root, so everyone can read the file but only root can change it.

  • That file doesn't have a complex format so there wouldn't really be a need to contact OEMs to figure out the exact format given that that would be something that inxi could just display as-is (if present) without having to parse it. For example, this OEM uses the date when their base image was created: (page in german) https://wiki.computerwerk.org/doku.php?id=archiv:protokolle:protokoll_2018_02_07 However, I will send an email to companies like Lenovo and system76 and ask them how they are using this OEM feature and if they have a fixed format for their OEM info strings, both for Ubuntu and non-Ubuntu systems, and see what they answer.

  • As for other distributions, I didn't find lots of information about if they have a similar OEM identifier. I did find this though, a documentation of CoreOS that seems to store similar information in /etc/oem-release.

  • As for the /etc/os-release, that contains (at least for Ubuntu) identical information to a non-OEM install of Ubuntu. An example for Ubuntu 20.04.1 would be this:

NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.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=focal
UBUNTU_CODENAME=focal

Hoping that this answers a bunch of your questions. I'll report back when I have some more information from OEMs.

Leseratte10 avatar Oct 18 '20 06:10 Leseratte10

Don't underestimate the ability of oems to make up various syntaxes for something that should be clear and simple, I've never seen an exception to this rule so far in inxi dev, no reason to believe it would change now. A favorite thing for OEMs to do is assign the task to a junior or outsourced dev, who then does a series of incoherent and wrong copy/pastes tnto the fields.

Also, Dell dabbles with oem linux, I forgot. And of course Pine.

the coreOS one seems sadly familiar, moved on to 'Ignition', but it does demonstrate that one rule would not achieve the desired result. In the case of the coreos syntax, I'd go for simply: ID= field value and keep it simple.

smxi avatar Oct 18 '20 20:10 smxi