/etc/kernel/postinst.d/nvidia-common fails when you try to install a new custom kernel package

Bug #303795 reported by Séb on 2008-11-30
114
This bug affects 11 people
Affects Status Importance Assigned to Milestone
nvidia-common (Ubuntu)
Undecided
Unassigned

Bug Description

The package linux-image-package linux-image-2.6.27-10-generic 2.6.27-10.20 failed to install/upgrade: le sous-processus post-installation script a retourn? une erreur de sortie d'?tat 2
I'm using Ubuntu 8.10

ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 8.10
ErrorMessage: le sous-processus post-installation script a retourné une erreur de sortie d'état 2
NonfreeKernelModules: nvidia
Package: linux-image-2.6.27-10-generic 2.6.27-10.20
ProcCmdLine: User Name=UUID=aed923e2-df91-4a0f-8567-32d57ff5220d ro quiet splash
ProcVersionSignature: Ubuntu 2.6.27-8.17-generic
SourcePackage: linux
Title: package linux-image-2.6.27-10-generic 2.6.27-10.20 failed to install/upgrade: le sous-processus post-installation script a retourné une erreur de sortie d'état 2

Séb (sebyx) wrote :
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

The cause of the failure is
=====
run-parts: executing /etc/kernel/postinst.d/nvidia-common

run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10

Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.27-10-generic.postinst line 1002.

dpkg : erreur de traitement de linux-image-2.6.27-10-generic (--configure) :

 le sous-processus post-installation script a retourné une erreur de sortie d'état 2
=====

affecting to nvidia-common

Also reported in bug 276946

Can you attach the output of the following command?
sudo sh /etc/kernel/postinst.d/nvidia-common

Séb (sebyx) wrote :

I cannot attach the output of sudo sh /etc/kernel/postinst.d/nvidia-common because... There no output ! I execute the command and no text is written in the terminal.
I post you the file.

Filipe Sousa (natros) wrote :

I'm having the same pronlem after compiling a custom kernel using kernel-package:

$ sudo make-kpkg --initrd --append-to-version=-nostradamus kernel_image kernel_headers

$ sudo dpkg -i linux-image-2.6.27.10-nostradamus_2.6.27.10-nostradamus-10.00.Custom_amd64.deb

Selecting previously deselected package linux-image-2.6.27.10-nostradamus.
(Reading database ... 147895 files and directories currently installed.)
Unpacking linux-image-2.6.27.10-nostradamus (from linux-image-2.6.27.10-nostradamus_2.6.27.10-nostradamus-10.00.Custom_amd64.deb) ...
Done.
Setting up linux-image-2.6.27.10-nostradamus (2.6.27.10-nostradamus-10.00.Custom) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms
run-parts: executing /etc/kernel/postinst.d/nvidia-common
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 20
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.27.10-nostradamus.postinst line 1181.
dpkg: error processing linux-image-2.6.27.10-nostradamus (--install):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-2.6.27.10-nostradamus

And I can confirm that there is no output of sudo sh /etc/kernel/postinst.d/nvidia-common

Olivier Mehani (shtrom) wrote :

Same here with a vanilla 2.6.27 kernel built following [0]:

{{{
$ sudo dpkg -i linux-image-2.6.27-freezedccp_2.6.27-freezedccp-10.00.Custom_amd64.deb
Selecting previously deselected package linux-image-2.6.27-freezedccp.
(Reading database ... 218814 files and directories currently installed.)
Unpacking linux-image-2.6.27-freezedccp (from linux-image-2.6.27-freezedccp_2.6.27-freezedccp-10.00.Custom_amd64.deb) ...
Done.
Setting up linux-image-2.6.27-freezedccp (2.6.27-freezedccp-10.00.Custom) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Running postinst hook script /usr/sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz
Found kernel: /vmlinuz.old
Found kernel: /vmlinuz-2.6.27-freezedccp
Found kernel: /vmlinuz-2.6.27-9-generic
Found kernel: /vmlinuz-2.6.24-23-generic
Found kernel: /vmlinuz-2.6.15-51-amd64-generic
Found kernel: /vmlinuz-2.6.12.old
Found kernel: /vmlinuz-2.6.12-10-amd64-generic
Found kernel: /vmlinuz-2.6.12-9-amd64-generic
Found kernel: /vmlinuz-2.6.12
Found kernel: /memtest86+.bin
Replacing config file /var/run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms
run-parts: executing /etc/kernel/postinst.d/nvidia-common
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 20
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.27-freezedccp.postinst line 1181.
dpkg: error processing linux-image-2.6.27-freezedccp (--install):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-2.6.27-freezedccp
}}}

[0] http://www.howtoforge.com/kernel_compilation_ubuntu_p2

Olivier Mehani (shtrom) wrote :

Additionally to the previous comment, I tried to remove the nvidia-common package (as the computer I'm working on is ATI-based). Apt-file confirms that the script is part of nvidia-common:

$ apt-file search /etc/kernel/postinst.d/nvidia-common
nvidia-common: /etc/kernel/postinst.d/nvidia-common

But the problem remains even after removing said package:

$ sudo apt-get remove nvidia-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  nvidia-common
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 139kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 218813 files and directories currently installed.)
Removing nvidia-common ...
$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  nvidia-177-modaliases nvidia-96-modaliases nvidia-71-modaliases nvidia-173-modaliases
The following packages will be REMOVED:
  nvidia-173-modaliases nvidia-177-modaliases nvidia-71-modaliases nvidia-96-modaliases
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 295kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 218802 files and directories currently installed.)
Removing nvidia-173-modaliases ...
Removing nvidia-177-modaliases ...
Removing nvidia-71-modaliases ...
Removing nvidia-96-modaliases ...
$ ls -l /etc/kernel/postinst.d/nvidia-common
-rwxr-xr-x 1 root root 462 2008-10-07 00:17 /etc/kernel/postinst.d/nvidia-common

kalimatas (kalimatas) wrote :

I had the same problem with nvidia-common. But I was helped to solve it this way:

sudo apt-get purge nvidia-common
sudo apt-get install nvidia-common

Thanks kalimatas
sudo apt-get purge nvidia-common
sudo apt-get install nvidia-common

worked like a charm

greetings

I can confirm this issue.
I'm running 2.6.31-19-generic (Ubuntu 9.10) and I tried to install a package of 2.6.33-rc8 compiled with make-kpkg

Changed in nvidia-common (Ubuntu):
status: New → Confirmed
summary: - Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-
- image-2.6.27-10-generic.postinst line 1002.
+ /etc/kernel/postinst.d/nvidia-common fails when you try to install a new
+ custom kernel package

Maybe the cause is the same of this bug.
The script has output

https://bugs.launchpad.net/ubuntu/+source/nvidia-common/+bug/292606

Giorgio B. (spudhead85) wrote :

On a fully-updated Karmic I had the same problem while installing a custom kernel compiled with make-kpkg.
Installing this package solved the problem:

http://linux.dell.com/dkms/permalink/dkms_2.1.1.2-0ubuntu1_all.deb

Hope this will help those who cannot upgrade to (still unstable) Lucid that uses the updated package.

N Carter (ncarter100) wrote :

Thanks Giorgio

wget http://linux.dell.com/dkms/permalink/dkms_2.1.1.2-0ubuntu1_all.deb
sudo dpkg -i dkms_2.1.1.2-0ubuntu1_all.deb

fixes the problem for me on Karmic

Paul Calabro (pcalabro) wrote :

Thanks kalimatas,

Your fixed worked! You rock!

Paul

Daniel Pendolino (dpendolino) wrote :

I'm having the same issue with Lucid, trying to compile the zen kernel 2.6.35, I've even tried upgrading dkms to version 2.1.1.2-3. If I stop nvidia-common from executing the kernel installs fine but boots into low graphics mode due to the fact the the nvidia driver module is somehow in the wrong format.

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

Duplicates of this bug

Other bug subscribers