package linux-image-2.6.31-20-generic 2.6.31-20.57 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10

Bug #533970 reported by Doug Morse
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
High
Unassigned
Lucid
Invalid
High
Unassigned
nvidia-common (Ubuntu)
Fix Released
High
Alberto Milone
Lucid
Fix Released
High
Alberto Milone

Bug Description

Binary package hint: linux-image-2.6.31-20-386

Nothing special to report other than I was trying to allow Update Manager to perform its usual updates, in this case a kernel upgrade. I always do kernel upgrade separately, i.e., either update the linux-* packages first and then the rest, or vice versa. In this case, everything else was up-to-date except the 7 kernel packages. The errors encountered, as I'm sure are included in the automatically attached logfiles, had to do with nvidia and virtualbox kernel modules being already installed.

ProblemType: Package
Architecture: i386
Date: Sun Mar 7 13:30:45 2010
DistroRelease: Ubuntu 9.10
ErrorMessage: run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia
Package: linux-image-2.6.31-20-generic 2.6.31-20.57
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: nvidia-common
Title: package linux-image-2.6.31-20-generic 2.6.31-20.57 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10
Uname: Linux 2.6.31-19-generic i686

Revision history for this message
Doug Morse (dm-dougmorse) wrote :
Revision history for this message
Doug Morse (dm-dougmorse) wrote :
Download full text (3.8 KiB)

Hi,

A couple of quick comments.

First, as a temporary workaround,as root user I simply backed up and then removed the nvidia-common file in the /etc/kernel/postinst.d and /etc/kernel/header_postinst.d directories. Then, by running "apt-get -f install", I was able to get the kernel packages to finally finish installing correctly. Then, I copied the nvidia-common file back into the two directories mentioned, and everything with apt now works again (i.e., apt-get update, apt-get autoremove, etc).

In other words, running the following might temporarily help others with this problem:

sudo cp -pi /etc/kernel/postinst.d/nvidia-common /tmp/nvidia-common
sudo rm -f /etc/kernel/postinst.d/nvidia-common
sudo rm -f /etc/kernel/header_postinst.d/nvidia-common
sudo apt-get -f install
sudo cp -pi /tmp/nvidia-common /etc/kernel/postinst.d/nvidia-common
sudo cp -pi /tmp/nvidia-common /etc/kernel/header_postinst.d/nvidia-common

Second, here's what I've discovered technically that might help the experts figure out the correct solution. Non-experts may not wish to read any further.

I added a "set -x" command to the 2nd line of /etc/kernel/postinst.d/nvidia-common. This revealed the error return code 10 and error message line "RET='10 nvidia-common/obsolete-driver doesn'\''t exist'". This lead me to notice at least one problem:

(1) /usr/share/nvidia-common/obsolete-driver in fact does NOT exist

Apparently, it has been renamed to simply /usr/share/nvidia-common/obsolete.

At this point, I tried to diagnose further, and the problem clearly follows from the db_set commands within the /etc/kernel/[header_]postinst.d/nvidia-common files. However, being still somewhat new to Ubuntu/Debian (I come from RHEL world), I'm not familiar with debconf and could not readily find documentation what what db_set is suppposed to do (and looking at /usr/share/debconf/confmodule didn't help, as db_set simply calls _db_cmd "SET", which I couldn't quickly figure out what that does).

At any rate, I tried the following, all of which do not work:

(2) globally replacing "obsolete-driver" with "obsolete" does NOT work
(3) globally replacing "obsolete-driver" with "/usr/share/nvidia-common/obsolete" does NOT work.

I tried (3) because, after putting an "echo PWD=`pwd`" line at the start of nvidia-common script, I noticed it was being running from PWD=/, so I thought the problem might be a directory location, but still no joy.

At this point, I just gave up and tried removing the nvidia-common files from /etc/kernel, and, as I mentioned first, that worked for me.

For what it's worth, below is the relevant output from "apt-get -f install" from attempt (2) above, that is, "obsolete-driver" replaced with "obsolete" (the error message was the same in all cases, i.e., "RET='10 nvidia-common/obsolete doesn'\''t exist'").

Hope this helps folks get this resolved. It seems to be affecting a lot of people and a similar bug has high priority / triaged status. I'll crossref next.

Cheers,
Doug

run-parts: executing /etc/kernel/postinst.d/nvidia-common
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL...

Read more...

tags: added: karmic
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for this detailed report.

Do you have the package nvidia-common installed on your system ?

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi Jean-Baptiste,

Yes, I did at the time. (I have since removed and re-installed all nvidia-* packages.)

Doug

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

thanks. setting to confirmed then.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: likely-dup
Revision history for this message
Brian Murray (brian-murray) wrote :

Is this possibly a dup of bug 388923?

Changed in linux (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Alberto Milone (albertomilone) wrote :

@Doug

As regards this error:

+ read -r _db_internal_line
+ RET='10 nvidia-common/obsolete-driver doesn'\''t exist'

nvidia-common/obsolete-driver is provided by a template such as /var/lib/dpkg/info/nvidia-common.templates

Do you have that file?

Revision history for this message
Doug Morse (dm-dougmorse) wrote : Re: [Bug 533970] Re: package linux-image-2.6.31-20-generic 2.6.31-20.57 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10

Hi Alberto,

Thanks again for the help on this.

Yes, I do have that file, and I've included it's contents below.

Of course, as I mentioned, I have uninstalled and re-installed all nvidia-*
packages recently, so I cannot be sure it was present then.

Doug

Template: nvidia-common/obsolete-driver
Type: error
Description: Obsolete NVIDIA Driver version
 The system has detected an obsolete NVIDIA driver in your system.
 .
 Please install ${latest} at the end of the installation with the following command:
 .
 sudo apt-get install ${latest}
 .
 The removal of other NVIDIA drivers will be dealt with automatically.

On Wed, 17 Mar 2010 17:37:05 -0000 Alberto Milone
<email address hidden> wrote:
> Doug
>
> As regards this error:
>
> + read -r _db_internal_line
> + RET='10 nvidia-common/obsolete-driver doesn'\''t exist'
>
> nvidia-common/obsolete-driver is provided by a template such as
> /var/lib/dpkg/info/nvidia-common.templates
>
> Do you have that file?
>

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi Brian,

I don't think so, although I already commented on the similarities (see
comment #32 on that bug report). That report seems to be more about custom
kernel and grub issues, which were not in play for me. I had neither a
custom kernel nor did I have problems with or error messages from grub.

HTH,
Doug

On Wed, 17 Mar 2010 16:22:38 -0000 Brian Murray <email address hidden> wrote:
> Is this possible a dup of bug 388923?

Changed in linux (Ubuntu Lucid):
importance: Medium → High
Changed in linux (Ubuntu Lucid):
status: Confirmed → In Progress
Changed in nvidia-common (Ubuntu Lucid):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Alberto Milone (albertomilone)
Changed in linux (Ubuntu Lucid):
status: In Progress → Invalid
assignee: Alberto Milone (albertomilone) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-common - 0.2.22

---------------
nvidia-common (0.2.22) lucid; urgency=low

  * debian/control:
    - Add dependency on fglrx-modaliases.
  * debian/nvidia-common.config:
    - Put back the config script with only one line to source
      debconf so that the template file is loaded when
      nvidia-common is triggered by kernel hooks (LP: #533970).
      Thanks to Colin Watson for the advice.
  * NvidiaDetector/alternatives.py:
    - Add the update_gmenu method and call it in set_alternative
      so that the gnome menu is updated when we switch between
      drivers (LP: #548751).
    - Add the resolve_module_alias method so as to retrieve the
      module name from the alias (relevant to #547066).
 -- Alberto Milone <email address hidden> Mon, 15 Mar 2010 16:44:17 +0100

Changed in nvidia-common (Ubuntu Lucid):
status: In Progress → Fix Released
Revision history for this message
Mindaugas Jakutis (la-mj) wrote :

Fix released or not I have been affected by this bug for a month or so now, current kernel: 2.6.32-24-generic

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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