[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#676400: initramfs-tools: update-initramfs -u fails with modprobe options



tags 676400 + confirmed patch
thanks

On Wed, Jun 06, 2012 at 07:27:54PM +0200, Mourad De Clerck wrote:
> Package: initramfs-tools
> Version: 0.104
> Severity: grave
> Justification: renders package unusable
> 
> Using update-initramfs -u gives me the following output:
> 
> # update-initramfs -u
> update-initramfs: Generating /boot/initrd.img-3.3.0-trunk-amd64
> install: cannot stat `/lib/modules/3.3.0-trunk-amd64/kernel/drivers/hid/hid-apple.ko fnmode=2 ': No such file or directory
> ERROR: Module /lib/modules/3.3.0-trunk-amd64/kernel/drivers/hid/hid-apple.ko fnmode=2  not found.
> install: cannot stat `/lib/modules/3.3.0-trunk-amd64/kernel/drivers/gpu/drm/radeon/radeon.ko modeset=1 ': No such file or directory
> E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
> update-initramfs: failed for /boot/initrd.img-3.3.0-trunk-amd64 with 1.
> 
> # cat /etc/modprobe.d/radeon-kms.conf
> options radeon modeset=1
> 
> # dpkg -S /etc/modprobe.d/radeon-kms.conf
> xserver-xorg-video-radeon: /etc/modprobe.d/radeon-kms.conf

Looks like modprobe's current behavior doesn't quite match what it
appeared to do when I originally wrote the patch for bug 652525; in
particular, modprobe --show-depends now outputs the options for a
module, not just the module.  (It must not have done so at the time I
wrote the patch, or I would have seen this failure when I tested the
patch on my system, since I have the same option set for i915.)

The attached patch fixes this bug.

- Josh Triplett
>From bac12c6d01e9684254f79fe23f7cc06ffca880d0 Mon Sep 17 00:00:00 2001
From: Josh Triplett <josh@joshtriplett.org>
Date: Wed, 6 Jun 2012 11:30:02 -0700
Subject: [PATCH] initramfs-tools: Ignore module options printed by modprobe

When reading the output of modprobe, only use the first word after
"insmod" as the module name, not the remainder of the line (which may
include module options).

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 hook-functions |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hook-functions b/hook-functions
index 9057a12..d9225c9 100644
--- a/hook-functions
+++ b/hook-functions
@@ -43,10 +43,10 @@ add_modules_from_file()
 # Add dependent modules + eventual firmware
 manual_add_modules()
 {
-	local prefix kmod firmware
+	local prefix kmod options firmware
 
 	modprobe --all --set-version="${version}" --ignore-install --quiet --show-depends "$@" |
-	while read prefix kmod ; do
+	while read prefix kmod options ; do
 		if [ "${prefix}" != "insmod" ]; then
 			continue
 		fi
-- 
1.7.10


Reply to: