[Initramfs] E: /usr/share/initramfs-tools/hooks/kmod failed with return 1

Bug #1313085 reported by dino99
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This happen after trusty migration to utopic and purging an old installed kernel.
Then initramfs fail to configure the kernel(s)

oem@dev32:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic
cp: cannot stat ‘/lib/modprobe.d/*’: No such file or directory
E: /usr/share/initramfs-tools/hooks/kmod failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.13.0-24-generic with 1.

Trying to reinstall it, i get:
 E: Internal Error, No file name for initramfs-tools:i386

So it seems that the latest kmod (16.2ubuntu1) upgrade into utopic have broken the not yet upgraded initramfs-tools package.
The problem also exist with a newer kernel:

 run-parts: executing /etc/kernel/header_postinst.d/dkms 3.14.1-031401-generic /boot/vmlinuz-3.14.1-031401-generic
dpkg: dependency problems prevent configuration of linux-image-3.14.1-031401-generic:
 linux-image-3.14.1-031401-generic depends on initramfs-tools (>= 0.36ubuntu6); however:
 Package initramfs-tools is not configured yet.

dpkg: error processing package linux-image-3.14.1-031401-generic (--install):
dependency problems - leaving unconfigured

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: initramfs-tools 0.103ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3
Architecture: i386
CurrentDesktop: GNOME
Date: Sat Apr 26 14:34:47 2014
InstallationDate: Installed on 2013-10-25 (182 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20131021.1)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
dino99 (9d9) wrote :
description: updated
dino99 (9d9)
description: updated
dino99 (9d9)
summary: - E: /usr/share/initramfs-tools/hooks/kmod failed with return 1
+ [Initramfs] E: /usr/share/initramfs-tools/hooks/kmod failed with return
+ 1
tags: added: build init initramfs kernel
tags: added: kmod
removed: init
Revision history for this message
dino99 (9d9) wrote :

Purged the kernels installation, then reinstall one, but still fails:

Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.14.1-031401-generic /boot/vmlinuz-3.14.1-031401-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.14.1-031401-generic /boot/vmlinuz-3.14.1-031401-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.14.1-031401-generic /boot/vmlinuz-3.14.1-031401-generic
update-initramfs: Generating /boot/initrd.img-3.14.1-031401-generic
cp: cannot stat ‘/lib/modprobe.d/*’: No such file or directory
E: /usr/share/initramfs-tools/hooks/kmod failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.14.1-031401-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.14.1-031401-generic.postinst line 1025.
dpkg: error processing package linux-image-3.14.1-031401-generic (--install):
 subprocess installed post-installation script returned error exit status 2

Revision history for this message
dino99 (9d9) wrote :

Test with latest kernel:

oem@dev32:~/kern$ sudo dpkg -i *
[sudo] password for oem:

Selecting previously unselected package linux-headers-3.15.0-999.
(Reading database ... 228197 files and directories currently installed.)
Preparing to unpack linux-headers-3.15.0-999_3.15.0-999.201404260253_all.deb ...
Unpacking linux-headers-3.15.0-999 (3.15.0-999.201404260253) ...
Selecting previously unselected package linux-headers-3.15.0-999-generic.
Preparing to unpack linux-headers-3.15.0-999-generic_3.15.0-999.201404260253_i386.deb ...
Unpacking linux-headers-3.15.0-999-generic (3.15.0-999.201404260253) ...
Selecting previously unselected package linux-image-3.15.0-999-generic.
Preparing to unpack linux-image-3.15.0-999-generic_3.15.0-999.201404260253_i386.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 3.15.0-999-generic /boot/vmlinuz-3.15.0-999-generic
Done.
Unpacking linux-image-3.15.0-999-generic (3.15.0-999.201404260253) ...
Setting up linux-headers-3.15.0-999 (3.15.0-999.201404260253) ...
Setting up linux-headers-3.15.0-999-generic (3.15.0-999.201404260253) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.15.0-999-generic /boot/vmlinuz-3.15.0-999-generic
Setting up linux-image-3.15.0-999-generic (3.15.0-999.201404260253) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.13.0-24-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.15.0-999-generic /boot/vmlinuz-3.15.0-999-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.15.0-999-generic /boot/vmlinuz-3.15.0-999-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.15.0-999-generic /boot/vmlinuz-3.15.0-999-generic
update-initramfs: Generating /boot/initrd.img-3.15.0-999-generic
cp: cannot stat ‘/lib/modprobe.d/*’: No such file or directory
E: /usr/share/initramfs-tools/hooks/kmod failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.15.0-999-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.15.0-999-generic.postinst line 1025.
dpkg: error processing package linux-image-3.15.0-999-generic (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 k+
 linux-image-3.15.0-999-generic
oem@dev32:~/kern$

Revision history for this message
dino99 (9d9) wrote :

So i wonder if the "1025" line's script which is set to "die" on error(s) is not aborting due to that one:

Running depmod.
depmod: ERROR: Module 'hci_vhci' has devname (vhci) but lacks major and minor information. Ignoring.

That issue has been met and already fixed:
https://bugzilla.redhat.com/show_bug.cgi?id=1051748

So its the new kmod rules:
http://www.gossamer-threads.com/lists/linux/kernel/1870467?page=last

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
dino99 (9d9) wrote :

So by now the workaround is to downgrade kmod : use the Trusty one.
This let the kernels be installed as usual.
Only get that issue (but seems not a show stopper):

initrd.img(/boot/initrd.img-3.13.0-24-generic
) points to /boot/initrd.img-3.13.0-24-generic
 (/boot/initrd.img-3.13.0-24-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-extra-3.13.0-24-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-3.13.0-24-generic
) points to /boot/vmlinuz-3.13.0-24-generic
 (/boot/vmlinuz-3.13.0-24-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-extra-3.13.0-24-generic.postinst line 491.
Examining /etc/kernel/postinst.d.

Conclusion:
- that error (described as harmless, but stopped out the posinst script with the new kmod) "hci_vhci" have to be fixed with the kernels.
- and initramfs-tools might need some upgrade (Debian use 0.115)

Revision history for this message
dino99 (9d9) wrote :

The latest kmod 16.2ubuntu2 change seems to have resolved that initramfs-tools issue

Revision history for this message
Mark Lutring (marcus-elitemail) wrote :

It works for me too

Revision history for this message
dino99 (9d9) wrote :

has been fixed now.

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Fix Released
no longer affects: initramfs-tools
no longer affects: linux
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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