Stale os-release file after possible upgrade from 20.04.2 to 20.04.3

Bug #1946343 reported by linuxmonk
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dell Ubuntu Project
Fix Released
Critical
Yuan-Chen Cheng
OEM Priority Project
Fix Released
Critical
Yuan-Chen Cheng
base-files (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Refer: https://answers.launchpad.net/ubuntu/+question/698949

I recently bought a Dell laptop with Ubuntu pre-installed in it. Looks like it came with Ubuntu 20.04.2 and OEM Linux Kernel in it. After my initial login (on October 1, 2021), the 'Software Updater' GUI prompted me for updates, which I went ahead with.

However at the end of it, I noticed that I was still at 20.04.2 with Linux Kernel at 5.10.0-1045-oem.

lsb_release -a
---------------

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS (fossa-bulbasaur X55.1)
Release: 20.04
Codename: focal

uname -a
---------
Linux dev-linux 5.10.0-1045-oem #47-Ubuntu SMP Wed Aug 18 10:41:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Then I manually tried sudo apt update and sudo apt upgrade / dist-upgrade from the terminal, but nothing got upgraded. When I invoked the GUI 'Software Updater' again, it showed me that my system was already up-to-date. However, as 20.04.3 was released end of Aug 2021, I was expecting that I should be at that release after my initial updates.

Since that didn't happen, I asked a question regarding this in askubuntu followed by launchpad https://answers.launchpad.net/ubuntu/+question/698949, thinking my update had failed for some unknown reason.

However, based on some inputs from other users, we were able to narrow down the problem to /usr/lib/os-release file not having the right contents in it. Every other file including /usr/lib/os-release.oem-release, /etc/issue, /etc/issue.net specifies that I am on 20.04.3. Whereas only /usr/lib/os-release (and its symlink /etc/release) specifies my current release as 20.04.2.

Even the lsb_release -a command always displays the output of /usr/lib/os-release file only.

$ cat /usr/lib/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS (fossa-bulbasaur X55.1)"
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

$ cat /usr/lib/os-release.oem-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 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

$ cat /etc/issue
Ubuntu 20.04.3 LTS \n \l

$ cat /etc/issue.net
Ubuntu 20.04.3 LTS

If you look at the timestamp of these files, strangely os-release had a newer timestamp of Oct 1 compared to other files.

$ ls -l /usr/lib/os-release
-rw-r--r-- 1 root root 406 Oct 1 20:31 /usr/lib/os-release

$ ls -l /usr/lib/os-release.oem-release
-rw-r--r-- 1 root root 382 Aug 4 07:53 /usr/lib/os-release.oem-release

$ ls -l /etc/issue
-rw-r--r-- 1 root root 26 Aug 4 07:53 /etc/issue

$ ls -l /etc/issue.net
-rw-r--r-- 1 root root 19 Aug 4 07:53 /etc/issue.net

Please note that, other software package updates, and linux kernel updates are happening automatically without any issues so far for me. Few days back even got a new kernel update.

$ uname -a
Linux vivek-dev-linux 5.10.0-1049-oem #51-Ubuntu SMP Mon Sep 27 11:01:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Workarounds Attempted
---------------------
1. Commented out all non-ubuntu external sources from /etc/apt/*.list. Then performed an apt clean + update + upgrade. But still nothing happened and the same issue remained.

2. Tried performing apt-install --reinstall base-files. But still nothing changed:

$ sudo apt install --reinstall base-files
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
Need to get 60.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 base-files amd64 11ubuntu5.4 [60.6 kB]
Fetched 60.6 kB in 1s (55.7 kB/s)
(Reading database ... 191154 files and directories currently installed.)
Preparing to unpack .../base-files_11ubuntu5.4_amd64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (11ubuntu5.4) over (11ubuntu5.4) ...
Setting up base-files (11ubuntu5.4) ...
motd-news.service is a disabled or a static unit, not starting it.
Processing triggers for cracklib-runtime (2.9.6-3.2) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.4git20200323-0ubuntu6.2) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-1049-oem
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgubuntu-swap_1)
I: Set the RESUME variable to override this.

3. Tried removing /usr/lib/os-release and /etc/os-release files and performed sudo apt install --reinstall base-files. This time got an exception with the following backtrace, and /usr/lib/os-release file was never recreated back and the symbolic link file /etc/os-release was in a broken state.

GUI pop up to report the bug to ubuntu showed up, and I clicked Send.

I had to bring back the deleted file from a backup location to remediate the system.

$ sudo apt install --reinstall base-files
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 60.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 base-files amd64 11ubuntu5.4 [60.6 kB]
Fetched 60.6 kB in 1s (111 kB/s)
(Reading database ... 191276 files and directories currently installed.)
Preparing to unpack .../base-files_11ubuntu5.4_amd64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (11ubuntu5.4) over (11ubuntu5.4) ...
Setting up base-files (11ubuntu5.4) ...
motd-news.service is a disabled or a static unit, not starting it.
Processing triggers for cracklib-runtime (2.9.6-3.2) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.4git20200323-0ubuntu6.2) ...
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 95, in <module>
    main()
  File "/usr/bin/lsb_release", line 59, in main
    distinfo = lsb_release.get_distro_information()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 398, in get_distro_information
    distinfo = guess_debian_release()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 288, in guess_debian_release
    get_distro_info(distinfo['ID'])
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 48, in get_distro_info
    RELEASES_ORDER.sort(key=lambda n: float(n[0]))
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 48, in <lambda>
    RELEASES_ORDER.sort(key=lambda n: float(n[0]))
ValueError: could not convert string to float: '6.06 LTS'
update-initramfs: deferring update (trigger activated)
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-1049-oem
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgubuntu-swap_1)
I: Set the RESUME variable to override this.

Revision history for this message
Steve Langasek (vorlon) wrote :

$ cat /usr/lib/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS (fossa-bulbasaur X55.1)"
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

You have an OEM-specific package installed that diverts /usr/lib/os-release and replaces the contents. The fact that this file has not changed when base-files changed is not a bug in base-files.

Changed in base-files (Ubuntu):
status: New → Invalid
Revision history for this message
linuxmonk (linuxmonk21) wrote :

@Steve, thank you for looking into this. If this is not a base-files issue, where could the problem be? I have not installed any other package myself. This is just the Ubuntu installation that the laptop came with.

As an end user I am unable to see whether upgrade to 20.04.3 is successful or not. Clearly lsb_release is not saying so.

Revision history for this message
linuxmonk (linuxmonk21) wrote :

This is the output of my dpkg-query for os-release:

$ dpkg-query --search os-release
systemd: /usr/share/man/man5/os-release.5.gz
diversion by oem-release from: /usr/lib/os-release
diversion by oem-release to: /usr/lib/os-release.oem-release
base-files: /etc/os-release
diversion by oem-release from: /usr/lib/os-release
diversion by oem-release to: /usr/lib/os-release.oem-release
base-files: /usr/lib/os-release

Changed in oem-priority:
importance: Undecided → Critical
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

It looks like it is this platform:

http://oem.archive.canonical.com/dists/focal-somerville-bulbasaur/

But I don't see any packages called oem-release or where they came from.

Dear reporter, what's the output of:

$ apt-cache policy oem-release

?

Changed in dell:
importance: Undecided → Critical
Revision history for this message
linuxmonk (linuxmonk21) wrote :

@Dimitri, thank you for looking into this issue. This is the output of apt-cache policy:

$ apt-cache policy oem-release
oem-release:
  Installed: 20.04ubuntu2
  Candidate: 20.04ubuntu2
  Version table:
 *** 20.04ubuntu2 100
        100 /var/lib/dpkg/status

As per synaptic package manager, the maintainer of oem-release package is:

"Commercial Engineering <email address hidden>"

This package also has dependencies with 'lsb-release'.

Alex Tu (alextu)
Changed in oem-priority:
assignee: nobody → Kai-Chuan Hsieh (kchsieh)
Changed in oem-priority:
assignee: Kai-Chuan Hsieh (kchsieh) → Yuan-Chen Cheng (ycheng-twn)
Changed in dell:
assignee: nobody → Yuan-Chen Cheng (ycheng-twn)
Changed in oem-priority:
status: New → Confirmed
Changed in dell:
status: New → Confirmed
Changed in oem-priority:
status: Confirmed → In Progress
Changed in dell:
status: Confirmed → Fix Committed
Changed in oem-priority:
status: In Progress → Fix Released
Changed in dell:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.