package memtest86+ 6.20-2 failed to install/upgrade: installed memtest86+ package post-installation script subprocess returned error exit status 127

Bug #2031420 reported by Brian Murray
448
This bug affects 82 people
Affects Status Importance Assigned to Milestone
memtest86+ (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I was conducting an upgrade test from Lunar to Mantic today and encountered this issue.

ProblemType: Package
DistroRelease: Ubuntu 23.10
Package: memtest86+ 6.20-2
ProcVersionSignature: Ubuntu 6.2.0-27.28-generic 6.2.15
Uname: Linux 6.2.0-27-generic x86_64
ApportVersion: 2.27.0-0ubuntu2
Architecture: amd64
CasperMD5CheckMismatches: ./boot/grub/grub.cfg
CasperMD5CheckResult: fail
Date: Tue Aug 15 09:28:31 2023
Dependencies:

ErrorMessage: installed memtest86+ package post-installation script subprocess returned error exit status 127
InstallationDate: Installed on 2023-07-27 (19 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Daily amd64 (20230412)
Python3Details: /usr/bin/python3.11, Python 3.11.4, python3-minimal, 3.11.4-5
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.21.22ubuntu1
 apt 2.7.3
SourcePackage: memtest86+
Title: package memtest86+ 6.20-2 failed to install/upgrade: installed memtest86+ package post-installation script subprocess returned error exit status 127
UpgradeStatus: Upgraded to mantic on 2023-08-15 (0 days ago)

Revision history for this message
Brian Murray (brian-murray) wrote :
tags: removed: need-duplicate-check
tags: added: cuqa-auto-testing
tags: added: rls-mm-incoming
Revision history for this message
Julian Andres Klode (juliank) wrote :

The file /etc/grub.d/10_linux has been modified and broken in the process. The error message says:

/etc/grub.d/10_linux: 1: version_find_latest: not found

- The first line of the file should not be calling any commands, it starts with something like:

#! /bin/sh
set -e

- The library can't even be included yet because it's the first line
- The function and calls to it were removed in grub 2.12 (broken calls remain in 10_linux_zfs right now)

I suggest looking at your /etc/grub.d/10_linux and fixing up whatever is broken there.

affects: memtest86+ (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Incomplete
affects: ubuntu → grub2 (Ubuntu)
Revision history for this message
Fantu (fantonifabio) wrote :

from log in attachments:

...
Setting up memtest86+ (6.20-2) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/10_linux: 1: version_find_latest: not found
...

even if the error was in memtest86+ configure it seems relared to grub because failed on /etc/grub.d/10_linux and /etc/grub.d/20_memtest86+ (of memtest86+) is not even reached

Revision history for this message
Brian Murray (brian-murray) wrote :

I'd thought there might be some special grub handling in ubuntu-release-upgrader but I also tried an upgrade by modifying my /etc/apt/sources.list to change lunar to mantic and then running 'apt-get dist-upgrade' and still encountered the same crash. Additionally, the file '/etc/grub.d/10_linux' starts with the following:

bdmurray@clean-lunar-amd64:~$ head -n10 /etc/grub.d/10_linux
#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

Revision history for this message
Brian Murray (brian-murray) wrote :

I also tried editing sources.list and installing memtest86+ first and there was no issue.

I also removed memtest86+, then did a dist-upgrade, and then installed memtest86+ and again did not encounter an issue.

Regardless, I still think there is an issue with the upgrade process.

Revision history for this message
Julian Andres Klode (juliank) wrote :

If you grep version_find_latest in the file, there shouldn't be any in it, we only have:

$ rg version_find_latest /usr/lib/grub/grub-mkconfig_lib /etc/grub.d/
/etc/grub.d/10_linux_zfs
425: linux=$(version_find_latest ${list_basename})

Which is tracked in another bug.

Revision history for this message
Julian Andres Klode (juliank) wrote :

OK after some more thinking the most likely conclusion is that we

1. unpack new grub, this leaves old conffile in place but updates the library the conffile uses
2. configure memtest86+ which calls update-grub invoking the script

Basically memtest86+ needs to Depend on grub-common so its conffiles are updated before we unpack memtest86+

affects: grub2 (Ubuntu) → memtest86+ (Ubuntu)
Changed in memtest86+ (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Fantu (fantonifabio) wrote (last edit ):

depends on grub-common don't risk to cause issue where grub is not present or used?
postinst support these cases: https://salsa.debian.org/debian/memtest86plus/-/blob/debian/master/debian/postinst

any suggestions for improvement are welcome

Changed in memtest86+ (Ubuntu):
importance: Undecided → High
Changed in memtest86+ (Ubuntu):
milestone: none → ubuntu-23.10-beta
Revision history for this message
Fantu (fantonifabio) wrote (last edit ):

I didn't found another solution and from a search the juliank solution suggested seems acceptable:
https://salsa.debian.org/debian/memtest86plus/-/commit/7d182c10eeb2f813176fad0245af94ec00c5823a
I'll wait also the opinion of Felix Zielcke (the other maintainer)
any other suggestions for improvement are still welcome

EDIT: 6.20-3 was uploaded to debian unstable, need to wait only the sync

Revision history for this message
Brian Murray (brian-murray) wrote :

Automatic sync'ing of packages from Debian has been disabled as the Mantic Release process is now past Debian Import Freeze, subsequently a manual sync of the package will need to be done.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've sync'ed the new version of the package just now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package memtest86+ - 6.20-3

---------------
memtest86+ (6.20-3) unstable; urgency=medium

  [ Felix Zielcke ]
  * Add --class memtest and --id memtest86+(-serial) to grub
    menuentries.
  * Switch to always use linux cmd in grub menuentries.

  [ Fabio Fantoni ]
  * d/control: add grub-common to depends (LP: #2031420)
    Thanks to Julian Andres Klode for the hint.

 -- Felix Zielcke <email address hidden> Sat, 19 Aug 2023 12:40:45 +0200

Changed in memtest86+ (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.