summaryrefslogtreecommitdiff
path: root/hook-functions
AgeCommit message (Collapse)Author
2010-09-07initramfs-tools: Add hid-cherry and hid-logitech to initramfsEckhart Wörner
Both a Cherry and a Logitech keyboard I own cannot be used at early boot time unless one also adds the hid-cherry / the hid-logitech module to the initramfs. The attached patch adds those two modules to hook-functions. For the Cherry keyboard, kernels up to 2.6.32-3 are not affected, from 2.6.32-5 (squeeze default) onwards all tested kernels were affected. Didn't do detailed checks for the Logitech keyboard. The used devices that exhibit this problem are: ID 046d:c30a Logitech, Inc. iTouch Composite ID 046a:0023 Cherry GmbH CyMotion Master Linux Keyboard Severity level important, since this makes booting with encrypted root partition impossible using those keyboards. Closes: #595827 Reported-by: Eckhart Wörner <ewoerner@kde.org> Signed-off-by: maximilian attems <max@stro.at>
2010-06-22mkinitramfs: set nounset and errexitmaximilian attems
Better catch both early than stupid mistakes cropping in. Signed-off-by: maximilian attems <maks@debian.org>
2010-06-17hook-functions: install virtio_pci module if /sys/bus/virtio is present and ↵Michael Prokop
using modules=dep Thanks: Vincent Danjean <vdanjean@debian.org> Closes: #585992 Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-16hook-functions: do not install ubi module by default via auto_add_modules()Michael Prokop
d-i does not support UBI/UBIFS yet and adding ubi.ko it by default to initrd when MODULES=most is set doesn't provide any benefits yet. Therefore don't waste ~125kb disk space by default, instead leave the installation of ubi to d-i through a hook. Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-16hook-functions/init/scripts/local: add support for ubifs.Martin Michlmayr
MODULES=dep fails when / is ubifs. This patch adds support for something like root=ubi0:rootfs when ubi is modular. Quoting Martin: It essentially does three things: - adds the correct modules to the ramdisk (for MODULES=dep and MODULES=most) - reads ubi.mtd= from the command line - loads ubi with the ubi.mtd info and ignores the "Waiting for root" check I've successfully tested this with a kernel with modular ubi and with the following boot variants: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs console=ttyS0,115200 ubi.mtd=2 root=ubi0_0 rootfstype=ubifs With console=ttyS0,115200 ubi.mtd=2 root=/dev/ubi0_0 rootfstype=ubifs I get an error that it cannot mount root but I suspect this is an ubifs error and has nothing to do with i-t (since at this point I can manually mount it with -t ubifs ubi0_0 whereas the /dev/ variant doesn't work). Tested with MODULES=dep and MODULES=most as well as with a kernel that has ubifs built in. Closes: #582858 Thanks: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Reviewed-by: Michael Prokop <mika@debian.org>
2010-06-15hook-functions: replace awk calls with sed in dep_add_modules()Michael Prokop
If mawk is installed as default awk version it won't handle [:digit:], instead let's replace the grep/awk/shell version with one single sed invocation. Closes: #585991 Thanks: Thorsten Glaser <tg@mirbsd.de> Signed-off-by: Michael Prokop <mika@grml.org>
2010-06-14code cleanup: consequently use "W:" for warnings.Michael Prokop
The only exception is log_warning_msg() inside scripts/functions which is/can be used by external scripts. Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-14code cleanup: consequently replace spaces in indentions with tabs to unify ↵Michael Prokop
coding stile Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-14code cleanup: drop trailing whitespaces.Michael Prokop
Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-14hook-functions/mkinitramfs/update-initramfs: consequently output error ↵Michael Prokop
messages to stderr Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-13Produce an error when root cannot be determined with MODULES=depMartin Michlmayr
A lot of code in dep_add_modules() uses $root. Therefore, produce an error message if we cannot determine the root device. [ error out on this condtion too. -maks ] Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: maximilian attems <maks@debian.org>
2010-06-08dep_add_modules(): handle ubifs and return since ubifs root is a char deviceMichael Prokop
Add additional check to handle ubifs and return since ubifs root is a char device but most of the following commands in dep_add_modules() only work with block devices. Patch by Martin Michlmayr <tbm@cyrius.com> [Closes: #582858] Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-08hook-functions: make device name handling for /proc/mdstat more flexible for ↵Michael Prokop
MODULES=dep We can't assume it's always [hs]dX# in /proc/mdstat. It can be e.g. also [hs]dX (raw device) or dm-## as well. So don't statically calculate the string based on string length but instead try to be as smart as possible. Also add support for handling additional arguments in the /proc/mdstat output like "(auto-read-only)". This affects MODULES=dep only. [Closes: #584520] + [Closes: #514756] Reported-by: Simon Richter <Simon.Richter@hogyros.de> Reported-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-08Make sure copy_exec hook function does not exit with a non-zero return value ↵Michael Prokop
in non-verbose mode. [Closes: #584520] Reported-by: Gerrit Keller <gerrit.keller@gmail.com> Signed-off-by: Michael Prokop <mika@debian.org>
2010-05-28hook-functions: Fix copy_modules_dir()maximilian attems
overseen variable renaming. Signed-off-by: maximilian attems <maks@debian.org>
2010-05-28mkinitramfs: fix MODULES=dep on mylex raid devices (DAC960)Claus Herwig
mkinitramfs fails to generate a initrd file for root filesystems on an old mylex raid controller (kernel module DAC960). In my case this breaks installation for lenny (5.0.3) on a FJS Primergy server - as this bug is not only in the mentioned version but also in 0.92 which ships on the lenny install cd: The installer can boot, as the old kernel module is still present. But the base install step fails when it tries to generate the initrd. The error in detail, when invoking mkinitramfs manually with -x ----------- (...) + manual_add_modules ext2 + local mam_x firmwares firmware ++ modprobe --set-version=2.6.29.6-vs2.3.0.36.14-beng --ignore-install --quiet --show-depends ext2 ++ awk '/^insmod/ { print $2 }' + for mam_x in '$(modprobe --set-version="${version}" --ignore-install --quiet --show-depends "${1}" | awk '\''/^insmod/ { print $2 }'\'')' + '[' -e /tmp/mkinitramfs_lNjzuV//lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/mbcache.ko ']' ++ dirname /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/mbcache.ko + mkdir -p /tmp/mkinitramfs_lNjzuV//lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs ++ dirname /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/mbcache.ko + ln -s /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/mbcache.ko /tmp/mkinitramfs_lNjzuV//lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs + '[' n = y ']' ++ modinfo -F firmware /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/mbcache.ko + firmwares= + '[' -z '' ']' + continue + for mam_x in '$(modprobe --set-version="${version}" --ignore-install --quiet --show-depends "${1}" | awk '\''/^insmod/ { print $2 }'\'')' + '[' -e /tmp/mkinitramfs_lNjzuV//lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2/ext2.ko ']' ++ dirname /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2/ext2.ko + mkdir -p /tmp/mkinitramfs_lNjzuV//lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2 ++ dirname /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2/ext2.ko + ln -s /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2/ext2.ko /tmp/mkinitramfs_lNjzuV//lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2 + '[' n = y ']' ++ modinfo -F firmware /lib/modules/2.6.29.6-vs2.3.0.36.14-beng/kernel/fs/ext2/ext2.ko + firmwares= + '[' -z '' ']' + continue + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + '[' /dev/rd/c0d0p1 '!=' /dev/rd/c0d0p1 ']' + block=rd/c0d0p1 + block=rd/c + '[' -z rd/c ']' + '[' '!' -e /sys/block/rd/c ']' + echo 'mkinitramfs: for root /dev/rd/c0d0p1 missing rd/c /sys/block/ entry' mkinitramfs: for root /dev/rd/c0d0p1 missing rd/c /sys/block/ entry + echo 'mkinitramfs: workaround is MODULES=most' mkinitramfs: workaround is MODULES=most + echo 'mkinitramfs: Error please report the bug' mkinitramfs: Error please report the bug + exit 1 ------------- So the reason is that mkinitramfs fails to derive the correct block device notation from the root device as the DAC960 driver uses a strange format for it. Once figured out, this is easily corrected. Please find a short patch for /usr/share/initramfs-tools/hook-functions attached. Thank you, Claus Herwig -- CHECON EDV-Consulting und Redaktion Claus Herwig * Barer Straße 70 * 80799 München +49 89 27826981 * Fax 27826982 * c.herwig@checon.de Closes: #579702 [ whitespace cleanups -maks ] Signed-off-by: maximilian attems <maks@debian.org>
2010-05-28hook-functions: re-add hid-microsoftmaximilian attems
people use it and thus complain.. Closes: 577253 Signed-off-by: maximilian attems <maks@debian.org>
2010-05-19Support booting from USB 3 xHCI-based controllersMichael Prokop
using kernel driver xhci. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-11hook-functions: add hid-applemaximilian attems
got axed while reverting the include any hid commit. Closes: #577253 Signed-off-by: maximilian attems <maks@debian.org>
2010-04-08hook-functions: copy_modules_dir() small simplificationsmaximilian attems
use meaningful variable name. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-08hook-functions: manual_add_modules simplifymaximilian attems
use meaningful variable s/mam_x/kmod/ loop directly on the modinfo output. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-07mkinitramfs: Fix several unbound variablesmaximilian attems
might not be all, but a first go in stricter mkinitramfs. as bonus remove old amusing unused varialbe from day 2.. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-06mkinitramfs: check only once for existing lddmaximilian attems
no point to recheck on every copy_exec. now copy_exec starts to get redable.. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-06hook-functions: refactor copy_execmaximilian attems
try to have an easier logic flow, also: * fail if wanted source does not exist * do not overwrite, no point in warning this add FIXME's to point missing /lib64 symlink parts. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-05hook-functions: Add btrfs to base modulesmaximilian attems
seems lots of people fancy it so lets add it. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-05mkinitramfs: generate pre-cached boot order fileScott James Remnant
if tsort is available, use it instead of custom sorting code if a pre-cached order file is available, use that instead [ move cache_run_scripts from scripts/functions to hook-scripts as only used on mkinitramfs build and not on boot ] Signed-off-by: maximilian attems <maks@debian.org>
2010-04-04mkinitramfs: -c compression support / commandline overrideBert Schulze
fixed the commandline argument to select the compressor. also your test with "command" needed to be negated otherwise the fallback to gzip would take place everytime. -- frohe ostern Bert Schulze [ nuked trailing whitespace, and add comment for usage() ] Signed-off-by: maximilian attems <maks@debian.org>
2010-03-28MODULES=DEP: Check superblock on initramfs blockmaximilian attems
do not trust mount as this is not the thing we look at on boot. (closes: #519800) as bonus run blkid if fstype has no idea. Reported-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: maximilian attems <maks@debian.org>
2010-03-26MODULES=DEP Use driver/module syfs attributemaximilian attems
I thought I'd experiment a bit with MODULES=DEP, but it seems this will not work. The atiixp module is properly installed into the initrd (I'm not sure how), but it doesn't end up in /conf/modules. Instead, the /conf/modules ends up as: radeonfb fbcon vesafb pci:v00001002d00004376sv00001462sd00000131bc01sc01i8a ide-gd ATIIXP_IDE pci:v00001002d00004376sv00001462sd00000131bc01sc01i8a unix Of these, the ide-gd and ATIIXP_IDE modules come from walking /sys/devices/pci0000\:00/0000\:00\:14.1/ide0/0.0/. However, the module is called atiixp, not ATIIXP_IDE. The ATIIXP_IDE comes directly from sysfs, though: readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/driver /sys/bus/pci/drivers/ATIIXP_IDE Using driver/module instead of just driver is more robust: $ readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/driver/module /sys/module/atiixp This would also fix the ide-gd module, which really seems to be called ide-gd_mod: $ readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/ide0/0.0/driver /sys/bus/ide/drivers/ide-gd $ readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/ide0/0.0/driver/module /sys/module/ide_gd_mod $ sudo modprobe ide-gd FATAL: Module ide_gd not found. $ sudo modprobe ide-gd_mod (closes: #567189) Reported-by: Matthijs Kooijman <matthijs@stdin.nl> [ checked that this already works in Lenny ] Signed-off-by: maximilian attems <maks@debian.org>
2010-03-24hook-functions: let dep_add_modules() recurse into lvm slave devicesNikolaus Schulz
When searching for the root block device, there may be multiple device mapper indirections. Fixes MODULES=dep if crypto-root fs has snapshot. (closes: 573761) Signed-off-by: Nikolaus Schulz <microschulz@web.de> Signed-off-by: maximilian attems <maks@debian.org>
2010-03-24MODULES=dep fix boot with MMC Martin Michlmayr
It doesn't boot with MODULES=dep because mmc_block is missing. (closes: #548711) Signed-off-by: maximilian attems <maks@debian.org>
2010-03-24update-initramfs breaks if /etc/mtab is a symlink to /proc/mountsPiotr Lewandowski
The attached patch fixes the problem for me (udev no longer ships vol_id since 146-1). (closes: #525606) [ Fix not hardcoding blkid path ] Signed-off-by: maximilian attems <maks@debian.org>
2010-02-24auto_add_modules: Copy all modules from net, excluding some subdirectoriesBen Hutchings
This removes the need to maintain an explicit list, which always has some drivers missing. fixes #553024 partly. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: maximilian attems <maks@debian.org>
2010-02-24copy_modules_dir: Take a list of exclusions after the base directoryBen Hutchings
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: maximilian attems <maks@debian.org>
2010-02-22mkinitramfs: add all usb storage devicesAvi Rozen
USB storage device is not recognized at boot after kernel upgrade to 2.6.30. It seems that the usb-storage module has been split into several mini modules, which are not copied to the initramfs image. In my case usb-storage.ko is copied but ums-cypress.ko is not copied. I've attached a patch against hook-functions that fixes this, by using copy_modules_dir to copy all the modules in kernel/drivers/usb/storage, instead of just usb-storage. I've set the severity to important because my USB storage device also happens to be the boot device... Cheers, Avi (closes: #543568) Signed-off-by: maximilian attems <maks@debian.org>
2010-02-22hook-functions: Avoid firmware copy error.Michael Prokop
Fix a2127d33 for systems without /proc/modules because the check has the wrong logic order. (closes: #570678) Signed-off-by: maximilian attems <maks@debian.org>
2009-11-16copy_exec: Check if ldd is aroundmaximilian attems
got report of a box with missing ldd. as the errors get seded away the user is left with no idea of the failure. Signed-off-by: maximilian attems <maks@debian.org>
2009-11-08mkinitramfs: Be opportunistic when calling modprobe thus showing errorsmaximilian attems
don't suppress the modprobe error output!!! this can happen when your depmod was generated by newer m-i-t then Lenny's. make deb-pkg generated images don't call yet depmod -a in postinst thus it can happend there and it was already triggered. (closes: #554873) Reported-by: Michael Prokop <mika@debian.org> Signed-off-by: maximilian attems <maks@debian.org>
2009-10-28hook-funcitions: Only warn about missing firmware if /proc/modules existsmaximilian attems
makes no sense to look up if there are no modules. seen on a piuparts installation of linux-2.6 Signed-off-by: maximilian attems <maks@debian.org>
2009-08-08hook-functions: Fix mounted /sys check for openvz container.maximilian attems
ls -l /sys total 0 drwxr-xr-x 5 root root 0 2009-08-08 11:53 class drwxr-xr-x 2 root root 0 2009-08-08 11:53 devices
2009-07-29Revert "hook-functions: Add hid_* modules."maximilian attems
don't support any possible usb keyboard under earth, the usbhid is default the rest should be added by the appropriate sysadmin. revert this ubuntu sync for smaller initramfs and thus faster boot. This reverts commit 7d28901223a8f5fa47ddb0b0d39b34b04d43b8e9. Signed-off-by: maximilian attems <maks@debian.org>
2009-07-29Redefinde MODULES=most to not carry any fb driver per default.maximilian attems
this allows for a much smaller initramfs and thus faster boot. Signed-off-by: maximilian attems <maks@debian.org>
2009-06-25MODULES=most: Add virtio_net to initramfs.maximilian attems
allows boot via PXE in a KVM virtualiziation environment. (closes: #533894) Reported-by: Michael Prokop <mika@debian.org> Signed-off-by: maximilian attems <maks@debian.org>
2009-06-23hook-functions: Fix loading of entries without newline in /etc/i-t/modulesmaximilian attems
don't use the overcomplicated sed to add a newline to really strip it, just use the simple /etc/init.d/module-init-tools parsing that should be well enough tested. ;) (closes: #532745) Signed-off-by: maximilian attems <maks@debian.org>
2009-05-18mkinitramfs: Invoke dpkg --print-architecturemaximilian attems
Fixes: > Running update-initramfs. > update-initramfs: Generating /boot/initrd.img-2.6.29-2-amd64 > dpkg : avertissement : obsolete option > '--print-installation-architecture', please use '--print-architecture' > instead. > dpkg : avertissement : obsolete option > '--print-installation-architecture', please use '--print-architecture' > instead. While we are it nuke duplicate invocation, since DPKG_ARCH is an exported variable anyway. (closes: #529222) Reported-by: Raphaël Hertzog <hertzog@debian.org> Signed-off-by: maximilian attems <maks@debian.org>
2009-05-11hook-functions: MODULES=most fix old typo s/smc911x/smc91x/maximilian attems
commit 8761821795732a9755d673e92fb45ac9202270df had the error. (closes: #528094)
2009-04-21hook-functions: MODULES=dep error out if sysfs not mounted on /sys.maximilian attems
currently we fail sylently later, make it explicit. (closes: #524179) Signed-off-by: maximilian attems <maks@debian.org>
2009-04-21copy_exec: also avoid picking sse2, neon, and vfp hwcaps libs.Loic Minier
merge 0.92bubuntu29 Signed-off-by: maximilian attems <maks@debian.org>
2009-04-13hook-functions: Add i915 module for kms.maximilian attems
people still need to enable kernel mode setting, but the module should be on the initramfs by default. currently no other drm module supports kms yet. Reported-by: Yves-Alexis Perez <corsac@debian.org> Signed-off-by: maximilian attems <maks@debian.org>
2009-03-30hook-functions: MODULES=most fb add all available agp modulesmaximilian attems
this was proposed in patch on #416063 by Maik Zumstrull <Maik.Zumstrull@gmx.de> but don't hardcode the list, just add all build ones: ls /lib/modules/2.6.29-1-amd64/kernel/drivers/char/agp/ intel-agp.ko sis-agp.ko via-agp.ko