summaryrefslogtreecommitdiff
path: root/hook-functions
AgeCommit message (Collapse)Author
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
2009-03-29hook-functions: MODULES=most add all fb modules per defaultmaximilian attems
"with kernel mode setting, i'd imagine that including framebuffer drivers becomes even more important, too" -dilinger this is basedon a patch by Maik Zumstrull <Maik.Zumstrull@gmx.de>, but instead of hardcoding a list just copy over all fb from the relevant driver directory. first part of #416063.
2009-03-29hook-functions: Add firmware from versioned directories too.maximilian attems
First see if there is a $(uname -r) versioned firmware around and if there is add it first. should make ubuntu sync easier too, as they shipp their firmware there. (closes: #521370)
2009-03-27hook-functions: stricter match on loaded module for firmware warning.maximilian attems
Otherwise it likes to warn for e100 even if e1000e is in use: grep e100 /proc/modules e1000e 110896 0 - Live 0xffffffffa0028000
2009-03-24hook-functions: MODULES=dep fix for luks over cciss devicesFrançois Delawarde
I needed to run update-initramfs w/ MODULES=dep (for some 15M BIOS size limitation w/ lilo on an HP server), turns out that I found the same bug as #507619 (please refer to it for details), except that I have a LUKS format over the cciss device. As bug #507619 describes: "dep_add_modules() expects to find a /sys/block/cciss/c0d0p file, but it should be trying /sys/block/cciss!c0d0" It also mentions: "fyi, I suspect this may also apply to old-style smart array devices, where device names are similar, but use 'ida' intead of 'cciss' - e.g. /dev/ida/c0d0p1." The following patch fixes it for me (on cciss) and should also fix it for ida devices. [ patch got checked and tested life on #debian-boot channel, see below -maks ] fixed warning: mkinitramfs: missing cciss!c0d0p2 root /dev/mapper/quakelive-root /sys entry of course, since the new value of block comes out of /sys/block/dm-${minor}/slaves, it makes sense that it would already be in sysfs syntax. Tested-by: Timothee Besset <ttimo@ttimo.net>
2009-03-20hook-functions: MODULES=dep fix for mmc rootmaximilian attems
update-initramfs: Generating /boot/initrd.img-2.6.26-1-versatile mkinitramfs: missing mmcblk root /dev/mmcblk0p3 /sys entry (closes: #520198) Tested-by: Paul Malishev <afunix@hing.rednet.ru>
2009-03-18hook-functions: reword MODULES=dep error messagemaximilian attems
seems confusing for users..
2009-03-10mkinitramfs: usage() fix conffile name.maximilian attems
woow that went unnoticed for some years now. people seem really to use update-initramfs(8).
2009-03-10MODULES=dep: ide-disk got renamed to ide-gd_mod since 2.6.28.maximilian attems
try to add one or the other.
2009-02-17MODULES=dep fix for Xen virtual block devicesIan Campbell
Ferenc seems to be using the xvda1=img1,xvda2=img2 scheme of Xen disks (this is what xentools gets you) rather than the whole disk with partition scheme. In the xvda1/xvda2 scheme /sys/block contains: # ls /sys/block/ ram0 ram1 ram10 ram11 ram12 ram13 ram14 ram15 ram2 ram3 ram4 ram5 ram6 ram7 ram8 ram9 xvda1 xvda2 In the whole disk scheme it contains xvda as you would expect: # ls /sys/block/ loop0 loop1 loop2 loop3 loop4 loop5 loop6 loop7 ram0 ram1 ram10 ram11 ram12 ram13 ram14 ram15 ram2 ram3 ram4 ram5 ram6 ram7 ram8 ram9 xvda I've attached a patch which takes care of this difference. [ remove largest suffix pattern, so that we don't stumble on big minors -maks ] Signed-off-by: maximilian attems <maks@debian.org>
2009-02-16MODULES=dep fix for minor partitions > 9maximilian attems
always remove the largest possible suffix pattern on the block device. (closes: #513958) Reported-by: Nicola Canepa <canne74@gmail.com>
2009-02-14hook-functions: Add hid_* modules.Luke Yelavich
since some keyboards will not be usable at the initramfs/busybox prompt without them. [ Ubuntu sync for 0.92bubuntu19 port it to Debian - maks ]
2009-02-05hook-functions: just ship old iee1394 if around.maximilian attems
no need to deprecate it in initramfs-tools. Lenny ships due to userspace with it and Juju firewire not yet feature complete..
2008-12-18hook-functions: MODULES=dep fix encrypted loop deviceS. Sakar
i've set up an encrypted loop-AES device as the root partition (boot paramter dev=/dev/loopX) and update-initramfs fails with : mkinitramfs: missing loop root /dev/loop2 /sys entry
2008-12-17hook-functions: Fix MODULES=dep for lvm LABEL fstab notationEugene Paskevich
The root fs is located on LVM and is described in /etc/fstab with LABEL= notation, which leads to the following mount output for root filesystem: mount | grep "on / " /dev/dm-0 on / type ext3 (rw,noatime,errors=remount-ro) The /dev/dm-0 itself isn't a symlink to /dev/mapper/, therefore root var remains /dev/dm-0 after readlink -f attempt. fix the consequent root detection failure. (closes: #508906)