Bug#426404: initramfs-tools: firmware related problems in hook-functions
reassign 426404 udev severity 426404 important severity 427643 important merge 426404 427643 stop On Wed, Jun 27, 2007 at 10:43:20PM +0200, Emanuele Rocca wrote: * maximilian attems [EMAIL PROTECTED], [2007-06-24 16:51 +0200]: hmm diff looks sane, so can you check that if you land in the initramfs that qla2xxx is loaded? cat /proc/modules The module is loaded but it cannot find firmware images. I think I've found the reason, though: with initramfs-tools 0.88 here's what goes under /lib/udev: ls /tmp/new/lib/udev/ firmware.agent firmware.agent tries (and fails) to source /lib/udev/hotplug.functions And the following is /lib/udev with former versions of initramfs-tools: ls /tmp/old/lib/udev/ ata_idedd_id hotplug.functions path_id usb_id cdrom_id firmware.agent ide.agent scsi_id vol_id uii, thanks for your analysis. indeed the set -e /usr/share/initramfs-tools/hooks/udev with the failure of mkdir prevents the following to land on initramfs -- cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/ copy_exec /lib/udev/ide.agent /lib/udev/ for program in /lib/udev/*_id; do copy_exec $program /lib/udev/ done -- reassigning the udev hook for mkdir -p repair. -- maks -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#426404: initramfs-tools: firmware related problems in hook-functions
* maximilian attems [EMAIL PROTECTED], [2007-06-24 16:51 +0200]: hmm diff looks sane, so can you check that if you land in the initramfs that qla2xxx is loaded? cat /proc/modules The module is loaded but it cannot find firmware images. I think I've found the reason, though: with initramfs-tools 0.88 here's what goes under /lib/udev: ls /tmp/new/lib/udev/ firmware.agent firmware.agent tries (and fails) to source /lib/udev/hotplug.functions And the following is /lib/udev with former versions of initramfs-tools: ls /tmp/old/lib/udev/ ata_idedd_id hotplug.functions path_id usb_id cdrom_id firmware.agent ide.agent scsi_id vol_id ciao, ema -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#426404: initramfs-tools: firmware related problems in hook-functions
Hey max, * maximilian attems [EMAIL PROTECTED], [2007-06-21 12:02 +0200]: On Mon, 28 May 2007, Emanuele Rocca wrote: Trying to boot with this initrd the kernel is not able to find the firmware for my qla2xxx, although a diff -Nur between the contents of the following two images yields to nothing: could you post the diff? I've tried today with -rc5 after a dist-upgrade and actually there are some differences (see attached diff). I can confirm that with initramfs-tools 0.87b the initrd is created properly. ciao, ema diff -Nur old/init new/init --- old/init 2007-06-24 13:07:47.0 +0200 +++ new/init 2007-06-24 13:07:56.0 +0200 @@ -47,7 +47,6 @@ export readonly=y export rootmnt=/root export debug= -export cryptopts=${CRYPTOPTS} export ROOTDELAY= export panic= export blacklist= @@ -80,9 +79,11 @@ ;; rootdelay=*) ROOTDELAY=${x#rootdelay=} - ;; - cryptopts=*) - cryptopts=${x#cryptopts=} + case ${ROOTDELAY} in + *[![:digit:].]*) + ROOTDELAY= + ;; + esac ;; nfsroot=*) NFSROOT=${x#nfsroot=} @@ -101,6 +102,11 @@ ;; panic=*) panic=${x#panic=} + case ${panic} in + *[![:digit:].]*) + panic= + ;; + esac ;; quiet) quiet=y Binary files old/lib/libvolume_id.so.0 and new/lib/libvolume_id.so.0 differ Binary files old/lib/udev/ata_id and new/lib/udev/ata_id differ Binary files old/lib/udev/cdrom_id and new/lib/udev/cdrom_id differ Binary files old/lib/udev/edd_id and new/lib/udev/edd_id differ diff -Nur old/lib/udev/hotplug.functions new/lib/udev/hotplug.functions --- old/lib/udev/hotplug.functions 2007-06-24 13:07:47.0 +0200 +++ new/lib/udev/hotplug.functions 1970-01-01 01:00:00.0 +0100 @@ -1,151 +0,0 @@ -# Setup and shell utility functions for use in hotplug agents. -# vim: syntax=sh - -#DEBUG=yes - -#EVENTS_LOG='/dev/hotplug.log' - -FIRMWARE_DIRS='/lib/firmware /usr/local/lib/firmware /usr/lib/hotplug/firmware' - -EVENTS_DIR='/dev/.events' - -MODPROBE='/sbin/modprobe -s -q' - -PATH='/sbin:/bin:/usr/sbin:/usr/bin' - -[ -e /etc/default/hotplug ] . /etc/default/hotplug - - -if [ -x /usr/bin/logger ]; then - LOGGER=/usr/bin/logger -elif [ -x /bin/logger ]; then - LOGGER=/bin/logger -else - unset LOGGER -fi - -# for diagnostics -if [ -t 1 -a -z $LOGGER ] || [ ! -e '/dev/log' ]; then - mesg() { -echo $@ 2 - } -elif [ -t 1 ]; then - mesg() { -echo $@ -$LOGGER -t ${0##*/}[$$] $@ - } -else - mesg() { -$LOGGER -t ${0##*/}[$$] $@ - } -fi - -debug_mesg() { -[ -z $DEBUG -o $DEBUG = no ] return 0 -mesg $@ -} - -wait_for_file() { - local file=$1 - local timeout=$2 - [ $timeout ] || timeout=120 - - local count=$timeout - while [ $count != 0 ]; do -[ -e $file ] return 0 -sleep 1 -count=$(($count - 1)) - done - - mesg $file did not appear before the timeout! - exit 1 -} - -# Read a single line from file $1 in the $DEVPATH directory. -# The function must not return an error even if the file does not exist. -sysread() { - local file=$1 - [ -e /sys$DEVPATH/$file ] || return 0 - local value - read value /sys$DEVPATH/$file || return 0 - echo $value -} - -sysreadlink() { - local file=$1 - [ -e /sys$DEVPATH/$file ] || return 0 - readlink -f /sys$DEVPATH/$file 2 /dev/null || true -} - -# returns true if a directory is writeable -writeable() { - if ln -s check $1/.is-writeable 2 /dev/null; then -rm -f $1/.is-writeable -return 0 - else -return 1 - fi -} - -## -lock_rules_file() { - [ -e /dev/.udev/ ] || return 0 - - RULES_LOCK=/dev/.udev/.lock-${RULES_FILE##*/} - - retry=30 - while ! mkdir $RULES_LOCK 2 /dev/null; do -if [ $retry -eq 0 ]; then - echo Cannot lock $RULES_FILE! 2 - exit 2 -fi -sleep 1 -retry=$(($retry - 1)) - done -} - -unlock_rules_file() { - [ $RULES_LOCK ] || return 0 - rmdir $RULES_LOCK || true -} - -choose_rules_file() { - local tmp_rules_file=/dev/.udev/tmp-rules--${RULES_FILE##*/} - [ -e $RULES_FILE -o -e $tmp_rules_file ] || PRINT_HEADER=1 - - if writeable ${RULES_FILE%/*}; then -RO_RULES_FILE='/dev/null' - else -RO_RULES_FILE=$RULES_FILE -RULES_FILE=$tmp_rules_file - fi -} - -## -raw_find_next_available() { - local links=$1 - - local basename=${links%%[ 0-9]*} - local max=-1 - for name in $links; do -local num=${name#$basename} -[ $num ] || num=0 -[ $num -gt $max ] max=$num - done - - local max=$(($max + 1)) - # name0 actually is just name - [ $max -eq 0 ] return - echo $max -} - -find_all_rules() { - local key=$1 - local linkre=$2 - local match=$3 - - local search='.*[[:space:],]'$key'\('$linkre'\)[[:space:]]*\(,.*\|\\\|\)$' - - echo $(sed -n -e ${match}s/${search}/\1/p $RO_RULES_FILE $RULES_FILE) -} - diff -Nur old/lib/udev/ide.agent new/lib/udev/ide.agent --- old/lib/udev/ide.agent 2007-06-24 13:07:47.0
Bug#426404: initramfs-tools: firmware related problems in hook-functions
hello, On Sun, 24 Jun 2007, Emanuele Rocca wrote: * maximilian attems [EMAIL PROTECTED], [2007-06-21 12:02 +0200]: On Mon, 28 May 2007, Emanuele Rocca wrote: Trying to boot with this initrd the kernel is not able to find the firmware for my qla2xxx, although a diff -Nur between the contents of the following two images yields to nothing: could you post the diff? I've tried today with -rc5 after a dist-upgrade and actually there are some differences (see attached diff). hmm diff looks sane, so can you check that if you land in the initramfs that qla2xxx is loaded? cat /proc/modules also please check the existence of the root device and the fstype /lib/udev/vol_id -t /dev/sda1 thanks -- maks -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#426404: initramfs-tools: firmware related problems in hook-functions
On Mon, 28 May 2007, Emanuele Rocca wrote: Hi, there seems to be something wrong with recent changes to hook-functions. With initramfs-tools 0.88: [EMAIL PROTECTED]:~# LANG=C dpkg-reconfigure linux-image-2.6.22-rc3 Running depmod. Finding valid ramdisk creators. Using mkinitramfs-kpkg to build the ramdisk. Other valid candidates: mkinitramfs-kpkg mkinitrd.yaird mkdir: cannot create directory `/tmp/mkinitramfs_FD9659/lib/udev/': File exists urgs thats due udev hook not using mkdir -p, so that should be harmless. cp: `/lib/firmware/ql2100_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2100_fw.bin' are the same file cp: `/lib/firmware/ql2200_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2200_fw.bin' are the same file cp: `/lib/firmware/ql2300_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2300_fw.bin' are the same file cp: `/lib/firmware/ql2322_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2322_fw.bin' are the same file cp: `/lib/firmware/ql2400_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2400_fw.bin' are the same file should be harmless too. Trying to boot with this initrd the kernel is not able to find the firmware for my qla2xxx, although a diff -Nur between the contents of the following two images yields to nothing: could you post the diff? [EMAIL PROTECTED]:~# ls -l /boot/initrd.img-2.6.22* -rw-r--r-- 1 root root 5268495 2007-05-28 12:33 /boot/initrd.img-2.6.22-rc3 -rw-r--r-- 1 root root 5269374 2007-05-27 22:30 /boot/initrd.img-2.6.22-rc3.bak The one suffixed with '.bak' is a working initrd built with 0.87b. Albeit it's not the source of this problem, notice the creation of the local variable man_x and the usage of mam_x in the script: thanks fixed in git repo. hmm i need more info on that one as i don't have the hardware to reproduce. could you try to run the initramfs without firmware-qlogic installed, does it than boot? -- maks -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#426404: initramfs-tools: firmware related problems in hook-functions
Package: initramfs-tools Version: 0.88 Severity: important Hi, there seems to be something wrong with recent changes to hook-functions. With initramfs-tools 0.88: [EMAIL PROTECTED]:~# LANG=C dpkg-reconfigure linux-image-2.6.22-rc3 Running depmod. Finding valid ramdisk creators. Using mkinitramfs-kpkg to build the ramdisk. Other valid candidates: mkinitramfs-kpkg mkinitrd.yaird mkdir: cannot create directory `/tmp/mkinitramfs_FD9659/lib/udev/': File exists cp: `/lib/firmware/ql2100_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2100_fw.bin' are the same file cp: `/lib/firmware/ql2200_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2200_fw.bin' are the same file cp: `/lib/firmware/ql2300_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2300_fw.bin' are the same file cp: `/lib/firmware/ql2322_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2322_fw.bin' are the same file cp: `/lib/firmware/ql2400_fw.bin' and `/tmp/mkinitramfs_FD9659/lib/firmware/ql2400_fw.bin' are the same file Trying to boot with this initrd the kernel is not able to find the firmware for my qla2xxx, although a diff -Nur between the contents of the following two images yields to nothing: [EMAIL PROTECTED]:~# ls -l /boot/initrd.img-2.6.22* -rw-r--r-- 1 root root 5268495 2007-05-28 12:33 /boot/initrd.img-2.6.22-rc3 -rw-r--r-- 1 root root 5269374 2007-05-27 22:30 /boot/initrd.img-2.6.22-rc3.bak The one suffixed with '.bak' is a working initrd built with 0.87b. Albeit it's not the source of this problem, notice the creation of the local variable man_x and the usage of mam_x in the script: diff -Nur initramfs-tools-0.87b/hook-functions initramfs-tools-0.88/hook-functions --- initramfs-tools-0.87b/hook-functions2007-04-16 19:58:58.0 +0200 +++ initramfs-tools-0.88/hook-functions 2007-05-27 00:55:26.0 +0200 @@ -38,8 +38,11 @@ done } +# Add dependent modules + eventual firmware manual_add_modules() { + local man_x firmwares firmware + for mam_x in $(modprobe --set-version=${version} --ignore-install \ ciao, ema -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]