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

Bug#384043: marked as done (initramfs-tools: hook manual_add_modules don't copy/link some kernel modules)



Your message dated Mon, 21 Aug 2006 22:40:12 +0200
with message-id <20060821204012.GU4868@baikonur.stro.at>
and subject line Bug#384043: initramfs-tools: hook manual_add_modules don't copy/link some kernel modules
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: initramfs-tools
Version: 0.75
Severity: important


I'm working on a small thin client project based on initramfs called TCOS[1].

This is similar to pxes, but I copy my debian installed apps and libs 
into initramfs and boot from network throught tftp.

In older version of initramfs-tools sound work ok, but in newer not.
Not know when sound break.

Tcos have a dir in /etc like this:

/etc/tcos
|-- hooks
|   |-- tcosbin
|   `-- tcosmods
|-- hooks-addons
|   |-- debug
|   |-- devices
|   |-- dhclient
|   |-- discover
|   |-- freenx
|   |-- hwclock
|   |-- inetd
|   |-- italc
|   |-- sound
|   |-- ssh
|   |-- tcos
|   |-- tcosmonitor
|   |-- tinylogin
|   |-- vnc
|   |-- web_browser
|   `-- xorg
|-- initramfs.conf
|-- scripts
|   |-- tcos
|   |-- tcos-bottom
|   |   |-- 05inittcos
|   |   |-- 10initsound
|   |   |-- 20devices
|   |   |-- 25freespace
|   |   |-- 30startx
|   |   `-- 50error
|   |-- tcos-premount
|   |   |-- 05network
|   |   |-- 10fstab
|   |   |-- 15uselocal
|   |   |-- 20swapon
|   |   |-- 25download_settings
|   |   |-- 30sqmount
|   |   |-- 50ldconfig
|   |   `-- 60autofs
|   `-- tcos-top
|       `-- 10foo

There are some file not listed....

I create initramfs images with:

mkinitramfs -d /etc/tcos -o /tftpboot/tcos/initramfs 2.6.16-1-486

mkinitramfs work ok and generate initramfs that boot ok but without sound.

The important hook is tcosmods that copy some kernel modules into 
initramfs with manual_add_modules:

A simple hook like next will copy this modules into initramfs:

##################  8<  #######################

MODULES="ide-core ide-disk ide-generic ide-cd cdrom isofs ext3 vfat
 floppy autofs autofs4 ehci-hcd ohci-hcd uhci-hcd sl811-hcd usbcore
 usb-storage scsi_mod sr_mod sd_mod loop unionfs squashfs nls_cp437
 nls_iso8859-1 pcnet32 3c59x video psmouse mousedev evbug evdev agpgart
 vgastate lkkbd xtkbd pcspkr soundcore snd-seq-device snd-pcm snd-rawmidi
 snd snd-hwdep snd-mixer-oss snd-pcm-oss snd-ac97-codec snd-ens1371 snd-via82xx
 piix via82cxxx parport_pc"

for x in ${MODULES} ; do
      echo "Adding module ${x}"
      manual_add_modules ${x}
done

##################  >8  #######################

But, if I check later, next file/modules are not into initramfs:

snd-pcm.ko
snd.ko
snd-ens1371.ko
snd-via82xx.ko

If I debug manual_add_modules i obtain for example with snd-via82xx:

+ set -x
+ manual_add_modules snd-via82xx
++ modprobe --set-version=2.6.16-1-486 --show-depends snd-via82xx
++ awk '/^insmod/ { print $2 }'
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/soundcore.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/seq/snd-seq-device.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-rawmidi.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko ']'
++ dirname /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
+ mkdir -p /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401
++ dirname /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
+ ln -s /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401
+ '[' -n n -a n = y ']'
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-page-alloc.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-timer.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/pci/ac97/snd-ac97-bus.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/pci/ac97/snd-ac97-codec.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/drivers/input/gameport/gameport.ko ']'
+ continue
+ set +x


As you can see via-82xx.ko is not processed and linked....


I have uploaded code into mentors:

deb-src http://mentors.debian.net/debian unstable main

$ apt-get source initramfs-tools-tcos


[1] http://soleup.eup.uva.es/mediawiki/index.php/Tcos (now server is down)


No other important info...

Thanks for attention.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-k7
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)

Versions of packages initramfs-tools depends on:
ii  busybox                       1:1.1.3-2  Tiny utilities for small and embed
ii  cpio                          2.6-17     GNU cpio -- a program to manage ar
ii  klibc-utils                   1.4.19-2   small statically-linked utilities 
ii  module-init-tools             3.2.2-3    tools for managing Linux kernel mo
ii  udev                          0.097-2    /dev/ and hotplug management daemo

initramfs-tools recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
hello mario,

that is not a bug,
please ask for help next time on debian-kernel mailinglist.


On Mon, Aug 21, 2006 at 04:37:44PM +0200, Mario Izquierdo (mariodebian) wrote:
> 
> I'm working on a small thin client project based on initramfs called TCOS[1].
> 
> This is similar to pxes, but I copy my debian installed apps and libs 
> into initramfs and boot from network throught tftp.
> 
> In older version of initramfs-tools sound work ok, but in newer not.
> Not know when sound break.
> 
> Tcos have a dir in /etc like this:
> 
> /etc/tcos
> |-- hooks
> |   |-- tcosbin
> |   `-- tcosmods
> |-- hooks-addons
> |   |-- debug
> |   |-- devices
> |   |-- dhclient
> |   |-- discover
> |   |-- freenx
> |   |-- hwclock
> |   |-- inetd
> |   |-- italc
> |   |-- sound
> |   |-- ssh
> |   |-- tcos
> |   |-- tcosmonitor
> |   |-- tinylogin
> |   |-- vnc
> |   |-- web_browser
> |   `-- xorg
> |-- initramfs.conf
> |-- scripts
> |   |-- tcos
> |   |-- tcos-bottom
> |   |   |-- 05inittcos
> |   |   |-- 10initsound
> |   |   |-- 20devices
> |   |   |-- 25freespace
> |   |   |-- 30startx
> |   |   `-- 50error
> |   |-- tcos-premount
> |   |   |-- 05network
> |   |   |-- 10fstab
> |   |   |-- 15uselocal
> |   |   |-- 20swapon
> |   |   |-- 25download_settings
> |   |   |-- 30sqmount
> |   |   |-- 50ldconfig
> |   |   `-- 60autofs
> |   `-- tcos-top
> |       `-- 10foo
> 
> There are some file not listed....
> 
> I create initramfs images with:
> 
> mkinitramfs -d /etc/tcos -o /tftpboot/tcos/initramfs 2.6.16-1-486
> 
> mkinitramfs work ok and generate initramfs that boot ok but without sound.

that all looks fine.
nice to know initramfs-tools has so nice usage out there. :)
 
> The important hook is tcosmods that copy some kernel modules into 
> initramfs with manual_add_modules:
> 
> A simple hook like next will copy this modules into initramfs:
> 
> ##################  8<  #######################
> 
> MODULES="ide-core ide-disk ide-generic ide-cd cdrom isofs ext3 vfat
>  floppy autofs autofs4 ehci-hcd ohci-hcd uhci-hcd sl811-hcd usbcore
>  usb-storage scsi_mod sr_mod sd_mod loop unionfs squashfs nls_cp437
>  nls_iso8859-1 pcnet32 3c59x video psmouse mousedev evbug evdev agpgart
>  vgastate lkkbd xtkbd pcspkr soundcore snd-seq-device snd-pcm snd-rawmidi
>  snd snd-hwdep snd-mixer-oss snd-pcm-oss snd-ac97-codec snd-ens1371 snd-via82xx
>  piix via82cxxx parport_pc"
> 
> for x in ${MODULES} ; do
>       echo "Adding module ${x}"
>       manual_add_modules ${x}
> done
> 
> ##################  >8  #######################

this one is definetly wrong,
please checkout man initramfs-tools(8) for minimal hook scripts
or any other hook script that ships with initramfs-tools has 
an prereqs() function on top as standard preamble.
 
> But, if I check later, next file/modules are not into initramfs:
> 
> snd-pcm.ko
> snd.ko
> snd-ens1371.ko
> snd-via82xx.ko

expected due to faulty hook, also no idea what you mean
by "file/modules".
 
> If I debug manual_add_modules i obtain for example with snd-via82xx:
> 
> + set -x
> + manual_add_modules snd-via82xx
> ++ modprobe --set-version=2.6.16-1-486 --show-depends snd-via82xx
> ++ awk '/^insmod/ { print $2 }'
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/soundcore.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/seq/snd-seq-device.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-rawmidi.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko ']'
> ++ dirname /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
> + mkdir -p /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401
> ++ dirname /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
> + ln -s /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401
> + '[' -n n -a n = y ']'
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-page-alloc.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-timer.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/pci/ac97/snd-ac97-bus.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/pci/ac97/snd-ac97-codec.ko ']'
> + continue
> + for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
> + '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/drivers/input/gameport/gameport.ko ']'
> + continue
> + set +x
> 
> 
> As you can see via-82xx.ko is not processed and linked....

manual_add_modules only uses the insmod lines, checkout 
modprobe --show-depends via-82xx
and your according /etc/modprobe.d settings

 
> I have uploaded code into mentors:
> 
> deb-src http://mentors.debian.net/debian unstable main
> 
> $ apt-get source initramfs-tools-tcos

old copy of initramfs-tools,
blaeh adding xorg to initramfs, sorry i won't look any farer.
an initramfs is not the place for xorg.
no idea what you are trying to solve by this.
 

anyway closing, good luck.
 
-- 
maks

--- End Message ---

Reply to: