Public bug reported:

When installing `linux-modules-nvidia-550-generic-hwe-24.04` and
`initramfs-tools` at the same time, running the postinst script of
`nvidia-kernel-common-550` will fail with `/usr/sbin/mkinitramfs: 102:
.: cannot open /etc/initramfs-tools/initramfs.conf: No such file`

To reproduce:

```
docker run --rm -it ubuntu:noble bash -c "apt-get update && apt-get install 
--no-install-recommends linux-modules-nvidia-550-generic-hwe-24.04 
initramfs-tools"
```

The relevant error output:

```
Setting up nvidia-kernel-common-550 (550.120-0ubuntu0.24.04.1) ...
update-initramfs: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.img-6.1.0-17-amd64
/usr/sbin/mkinitramfs: 102: .: cannot open /etc/initramfs-tools/initramfs.conf: 
No such file
update-initramfs: failed for /boot/initrd.img-6.1.0-17-amd64 with 2.
dpkg: error processing package nvidia-kernel-common-550 (--configure):
 installed nvidia-kernel-common-550 package post-installation script subprocess 
returned error exit status 2
Setting up libdevmapper1.02.1:amd64 (2:1.02.185-3ubuntu3.2) ...
Setting up linux-modules-6.11.0-19-generic (6.11.0-19.19~24.04.1) ...
dpkg: dependency problems prevent configuration of 
linux-modules-nvidia-550-generic-hwe-24.04:
 linux-modules-nvidia-550-generic-hwe-24.04 depends on nvidia-kernel-common-550 
(>= 550.120); however:
  Package nvidia-kernel-common-550 is not configured yet.

dpkg: error processing package linux-modules-nvidia-550-generic-hwe-24.04 
(--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of 
linux-modules-nvidia-550-6.11.0-19-generic:
 linux-modules-nvidia-550-6.11.0-19-generic depends on nvidia-kernel-common-550 
(>= 550.120); however:
  Package nvidia-kernel-common-550 is not configured yet.

dpkg: error processing package linux-modules-nvidia-550-6.11.0-19-generic 
(--configure):
 dependency problems - leaving unconfigured

Errors were encountered while processing:
 nvidia-kernel-common-550
 linux-modules-nvidia-550-generic-hwe-24.04
 linux-modules-nvidia-550-6.11.0-19-generic
```

I guess that the cause lies in the postinst script of `nvidia-kernel-
common-550`, which checks `/usr/sbin/update-initramfs` is an executable
and executes it if so, not considering the case when the package
`initramfs-tools` is unpacked but unconfigured, and its config files
have not been created yet.

** Affects: nvidia-graphics-drivers-550 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to nvidia-graphics-drivers-550 in Ubuntu.
https://bugs.launchpad.net/bugs/2104031

Title:
  nvidia-kernel-common-550 cannot be installed along with initramfs-
  tools

Status in nvidia-graphics-drivers-550 package in Ubuntu:
  New

Bug description:
  When installing `linux-modules-nvidia-550-generic-hwe-24.04` and
  `initramfs-tools` at the same time, running the postinst script of
  `nvidia-kernel-common-550` will fail with `/usr/sbin/mkinitramfs: 102:
  .: cannot open /etc/initramfs-tools/initramfs.conf: No such file`

  To reproduce:

  ```
  docker run --rm -it ubuntu:noble bash -c "apt-get update && apt-get install 
--no-install-recommends linux-modules-nvidia-550-generic-hwe-24.04 
initramfs-tools"
  ```

  The relevant error output:

  ```
  Setting up nvidia-kernel-common-550 (550.120-0ubuntu0.24.04.1) ...
  update-initramfs: deferring update (trigger activated)
  update-initramfs: Generating /boot/initrd.img-6.1.0-17-amd64
  /usr/sbin/mkinitramfs: 102: .: cannot open 
/etc/initramfs-tools/initramfs.conf: No such file
  update-initramfs: failed for /boot/initrd.img-6.1.0-17-amd64 with 2.
  dpkg: error processing package nvidia-kernel-common-550 (--configure):
   installed nvidia-kernel-common-550 package post-installation script 
subprocess returned error exit status 2
  Setting up libdevmapper1.02.1:amd64 (2:1.02.185-3ubuntu3.2) ...
  Setting up linux-modules-6.11.0-19-generic (6.11.0-19.19~24.04.1) ...
  dpkg: dependency problems prevent configuration of 
linux-modules-nvidia-550-generic-hwe-24.04:
   linux-modules-nvidia-550-generic-hwe-24.04 depends on 
nvidia-kernel-common-550 (>= 550.120); however:
    Package nvidia-kernel-common-550 is not configured yet.

  dpkg: error processing package linux-modules-nvidia-550-generic-hwe-24.04 
(--configure):
   dependency problems - leaving unconfigured

  dpkg: dependency problems prevent configuration of 
linux-modules-nvidia-550-6.11.0-19-generic:
   linux-modules-nvidia-550-6.11.0-19-generic depends on 
nvidia-kernel-common-550 (>= 550.120); however:
    Package nvidia-kernel-common-550 is not configured yet.

  dpkg: error processing package linux-modules-nvidia-550-6.11.0-19-generic 
(--configure):
   dependency problems - leaving unconfigured

  Errors were encountered while processing:
   nvidia-kernel-common-550
   linux-modules-nvidia-550-generic-hwe-24.04
   linux-modules-nvidia-550-6.11.0-19-generic
  ```

  I guess that the cause lies in the postinst script of `nvidia-kernel-
  common-550`, which checks `/usr/sbin/update-initramfs` is an
  executable and executes it if so, not considering the case when the
  package `initramfs-tools` is unpacked but unconfigured, and its config
  files have not been created yet.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-550/+bug/2104031/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to