Commit Graph

135 Commits (0a66b74b51f7d58916504e0e8bb01b6e981b489b)

Author SHA1 Message Date
Harald Hoyer 8bc04b98c7 kernel-modules/module-setup.sh:installkernel() fix return code 2012-06-29 12:41:26 +02:00
Harald Hoyer b6fd45163a kernel-modules/module-setup.sh: include omapdrm in the arm modules to include 2012-06-06 11:46:19 +02:00
Harald Hoyer 51153fb18c removed scsi_wait_scan from standard install 2012-05-31 09:14:17 +02:00
Dennis Gilmore 59aa65c9b2 ARM: make sure that we get the storage modules into the initramfs 2012-05-21 11:11:31 +02:00
Cong Wang a6d3be9dd5 check kernel module existance
This patch adds check of kernel module existance and
propagate errors to upper callers.

In case of break other callers of instmods(), this patch
adds an option '-c' to it, only when "-c" is specified
we fail, otherwise, errors are ignored.

Reported-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Harald Hoyer <harald@redhat.com>
2012-05-16 11:43:25 +02:00
Olivier Blin 40913ad219 90kernel-modules/module-setup.sh: install xhci-hcd
to allow booting and using kbd devices from USB 3.0
2012-05-16 11:43:25 +02:00
Harald Hoyer 8b6e099892 90kernel-modules/module-setup.sh: exclude nfs* lockd from standard
do not install nfs* lockd filesystems for the standard kernel modules
2012-02-22 16:14:38 +01:00
Harald Hoyer b6e244f794 90kernel-modules/module-setup.sh: install modules.* in installkernel()
modules.* should be in the kernel initramfs
2012-02-22 15:15:22 +01:00
Harald Hoyer e0e2fb26c9 90kernel-modules: removed hard-removal of "ocfs2"
put omit_driver+=" ocfs2 " in the distribution configuration file
2012-02-15 15:46:23 +01:00
Harald Hoyer dfb08e9f1c removed now useless cleanup hooks
in Fedora 17, we unpack /boot/initramfs-$(uname -r).img
on shutdown for a pivot root to disassemble the root device
2012-02-15 10:08:59 +01:00
Harald Hoyer 682a2a9d1a 90kernel-modules/module-setup.sh: add "ata_piix" to hardcoded modules 2012-02-13 18:16:48 +01:00
Harald Hoyer 56ac6c7e76 move all file removal cleanups to "cleanup" hook 2012-02-07 19:44:03 +01:00
Harald Hoyer a178ca6b5c more cleanup in pre-pivot 2012-02-07 10:32:35 +01:00
Harald Hoyer 43a8f6133d kernel-modules: add hid-logitech-dj to hardcoded hid devices
https://bugzilla.redhat.com/show_bug.cgi?id=786303
2012-02-03 12:03:36 +01:00
Harald Hoyer 39339512e2 plymouth/kernel: cleanup not needed parts for shutdown
remove plymouth and kernel parts from /run/initramfs, which are not
needed at shutdown.

https://bugzilla.redhat.com/show_bug.cgi?id=751189
2012-01-23 10:41:41 +01:00
James Buren 7fffc9f11f add xz compression for kernel modules 2012-01-23 09:59:39 +01:00
Harald Hoyer 2e7b661681 90kernel-modules/module-setup.sh: install modules.order
Also install modules.order and all modules.builtin*
2012-01-20 12:06:41 +01:00
Colin Guthrie fa20c18525 kernel-modules: Find (and ulitmately dereference) any symlinks in modprobe.d dir.
Also only do the top level of files (ignore any subdirs and files within)
2012-01-09 13:29:24 +01:00
Harald Hoyer 480d772f22 */module-setup.sh: use host_fs_types host_devs
For the $hostonly case, use $host_fs_types and $host_devs to determine,
if a module has to be included in the initramfs.
2011-12-15 14:49:03 +01:00
Harald Hoyer e696ade15d 90kernel-modules/module-setup.sh: include usb mass storage drivers 2011-11-07 09:38:30 +01:00
Harald Hoyer e2d92b5adf */module-setup.sh: turn off debugging for module search
turn off debugging for module search, because it clutters the debug log
2011-10-20 13:06:37 +02:00
Michal Soltys c32bda6bb9 bash3 compat patch
This patch replaces:

- {var}>... redirections with functionally identical eval construct +
  explicit FDs
- ^^ and ,, case modifiers with temporary shopt

This allows us to lower minimum required bash version
to at least 3.1 (with current code).

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-10-11 09:37:01 +02:00
John Reiser d23159a69c dracut [PATCH]es: parallelize block_module filter and net_module_filter
Filtering modules requires enough work that instmods() in the
next pipeline stage was rarely busy.  Parallelize the two
filters which do the most work.  Also fix a filename-vs-contents
mistake in net_module_filter.

--
John Reiser, jreiser@BitWagon.com

>From f4533a2ceca52c443ddebec01eeaa35d51c39c1b Mon Sep 17 00:00:00 2001
From: John Reiser <jreiser@BitWagon.com>
Date: Tue, 13 Sep 2011 17:41:43 -0700
Subject: [PATCH 1/3] Parallelize block_module_filter
2011-09-30 09:40:49 +02:00
John Reiser 881eda695e instmods: get filenames from stdin if no args; use it
Use bash  "[[ string =~ pattern ]]"  instead of "egrep -q".
Replace control-dominated serial fondling
	for var in $(proc1); do proc2 var; done
with data-dominated parallel pipeline
	proc1  |  while read var; do proc2 var; done
Together this is a large savings.

[harald@redhat.com: fixed network kernel module filter]
2011-09-01 10:30:29 +02:00
Harald Hoyer e59f58f854 use inst_simple to install non-binary files 2011-08-12 13:11:30 +02:00
Harald Hoyer 016c3cfed2 90kernel-modules: add unix module 2011-08-12 10:08:09 +02:00
Amadeusz Żołnowski d083dd4c39 90kernel-modules: fixed handling rd.driver.post= 2011-07-01 10:15:26 +02:00
Harald Hoyer 29b10e65b1 dracut-functions: make local vars local and prefix with "_" 2011-05-12 11:06:47 +02:00
Harald Hoyer 3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer 3cf14ae1ae parse-kernel.sh: wrong index was used in for loop
Thanks Mike Snitzer <msnitzer@redhat.com>
2011-05-06 12:06:20 +02:00
Amadeusz Żołnowski 64fcb3cce7 kernel-modules: inst modules.builtin if there's no modules.builtin.bin
Also report failure if none of them exist.
2011-04-28 15:44:54 +02:00
Harald Hoyer fb59f4c967 get rid of absolute PATHs 2011-04-08 13:49:06 +02:00
Harald Hoyer 7838ab5010 kernel-modules/module-setup.sh: fix instmods $filesystems
especially in host_only mode, $filesystems was not honored
2011-03-10 17:22:55 +01:00
Harald Hoyer 5078c98abe move insmodpost and blacklisting to 90kernel-modules
also correctly parse rd.driver.{blacklist,pre,post}
2011-03-10 17:22:25 +01:00
Harald Hoyer 4c4c8b7239 rd.driver.*: accept comma separated list
accept a comma seperated list of kernel drivers for
rd.driver.blacklist
rd.driver.pre
rd.driver.post
2011-03-10 14:11:42 +01:00
Harald Hoyer 9d49507f80 kernel-modules: add hid-cherry hid-logitech hid-microsoft kbd drivers 2011-02-23 16:34:23 +01:00
Harald Hoyer 71df3c4329 renamed module-info.sh to module-setup.sh 2011-02-02 16:35:18 +01:00
Harald Hoyer 95d2dabc25 replaced check,install,installkernel with module-info.sh 2011-02-02 13:56:03 +01:00
Harald Hoyer 3003cfdf9e kernel-modules/installkernel: add hid_sunplus to keyboard drivers 2010-12-02 17:13:15 +01:00
Christian Heinz ab9b7eee0a fix installation of `modules.builtin.bin'
`modules.builtin.bin' is installed like a regular file, thereby ending
up in the wrong place when `--kmoddir' is in effect. Fix this by
specifying the installation destination.
2010-11-26 09:36:18 +01:00
Harald Hoyer fa7ada31d0 new parameter option names with "rd.*" namespace
Renamed Options
       Here is a list of options, which were used in dracut prior to
       version 008, and their new replacement.

       rdbreak
           rd.break

       rd_CCW
           rd.ccw

       rdcopystate
           rd.copystate

       rd_DASD_MOD
           rd.dasd_mod.dasd

       rd_DASD
           rd.dasd

       rdinitdebug rdnetdebug
           rd.debug

       rd_NO_DM
           rd.dm=0

       rd_DM_UUID
           rd.dm.uuid

       rdblacklist
           rd.driver.blacklist

       rdinsmodpost
           rd.driver.post

       rdloaddriver
           rd.driver.pre

       rd_NO_FSTAB
           rd.fstab=0

       rdinfo
           rd.info

       check
           rd.live.check

       rdlivedebug
           rd.live.debug

       live_dir
           rd.live.dir

       liveimg
           rd.live.image

       overlay
           rd.live.overlay

       readonly_overlay
           rd.live.overlay.readonly

       reset_overlay
           rd.live.overlay.reset

       live_ram
           rd.live.ram

       rd_NO_CRYPTTAB
           rd.luks.crypttab=0

       rd_LUKS_KEYDEV_UUID
           rd.luks.keydev.uuid

       rd_LUKS_KEYPATH
           rd.luks.keypath

       rd_NO_LUKS
           rd.luks=0

       rd_LUKS_UUID
           rd.luks.uuid

       rd_LUKS_UUID
           rd.luks.uuid

       rd_NO_LVMCONF
           rd.lvm.conf

       rd_LVM_LV
           rd.lvm.lv

       rd_NO_LVM
           rd.lvm=0

       rd_LVM_SNAPSHOT
           rd.lvm.snapshot

       rd_LVM_SNAPSIZE
           rd.lvm.snapsize

       rd_LVM_VG
           rd.lvm.vg

       rd_NO_MDADMCONF
           rd.md.conf=0

       rd_NO_MDIMSM
           rd.md.imsm=0

       rd_NO_MD
           rd.md=0

       rd_MD_UUID
           rd.md.uuid

       rd_NFS_DOMAIN
           rd.nfs.domain

       rd_NO_PLYMOUTH
           rd.plymouth=0

       rd_retry
           rd.retry

       rdshell
           rd.shell

       rd_NO_SPLASH
           rd.splash

       rdudevdebug
           rd.udev.debug

       rdudevinfo
           rd.udev.info

       rd_NO_ZFCPCONF
           rd.zfcp.conf=0

       rd_ZFCP
           rd.zfcp
2010-10-28 17:11:27 +02:00
Amadeusz Żołnowski 6bde7a17be suppress modprobe errors on builtins (credits to Kay Sievers)
Install /lib/modules/$kv/modules.builtin.bin to suppress modprobe error
messages saying module was not found, while it's built-in.

Credits go to Kay Sievers who enlighten us about meaning of this cool
file.
2010-10-15 09:52:45 +02:00
Harald Hoyer cc02093d69 reformat source code
removed tabs and set indention to 4 spaces
added emacs and vi format headers
2010-09-10 15:34:36 +02:00
Andrey Borzenkov 0493f9c849 Fix ahci detection in kernel 2.6.35
Kernel 2.6.35 (may be, earlier) split ahci into libahci.ko and ahci.ko
and added ahci_platform.ko. As a result, drivers ahci and ahci_platform
do not contain any symbol that are checked for storage modules (it is
libahci.ko that references ata_scsi_ioctl now). So add additional
symbol ahci_init_controller; it seems this is expected to be called by
every driver based on libahci.ko.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
2010-08-05 18:16:37 +02:00
Harald Hoyer 5be225d299 use "grep" directly without "nm" to drop binutils requirement 2010-05-07 10:44:30 +02:00
Harald Hoyer 1d323cd938 kernel-modules: add more hardcoded modules 2010-05-03 11:33:52 +02:00
Harald Hoyer e9e93e2ec6 kernel-modules: only remove ocfs2, if all filesystems are installed 2010-04-15 12:47:52 +02:00
Harald Hoyer d4abad2288 kernel-modules: hardcode sr_mod 2010-04-15 12:47:26 +02:00
Harald Hoyer 3b0f71921d kernel-modules/installkernel: force install some modules even in
hostonly mode
2010-03-17 11:50:18 +01:00
Harald Hoyer a56e93c10c kernel-modules: add keyboard kernel modules 2010-03-04 14:06:46 +01:00
Philippe Seewer 3121677949 parse-kernel.sh must have a shebang 2010-03-03 17:29:26 +01:00
Harald Hoyer 6ca1d346be kernel: add rdloaddriver kernel command line parameter
rdloaddriver=<drivername>
force loading kernel module <drivername>
2010-01-13 15:34:18 +01:00
Harald Hoyer ba67b9239b changed hostonly documentation and handling 2009-11-27 14:29:32 +01:00
Harald Hoyer 5841610c7f kernel-modules: add firewire-ohci to hardcoded modules list 2009-11-23 12:28:58 +01:00
Harald Hoyer f21b3f874f kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc 2009-11-12 13:50:12 +01:00
Dan Horák 8fa510d483 control filesystems included in the generic initramfs
New "filesystems" command line/config file option is added with the ability to
control the list of kernel filesystem modules that are included in the generic
initramfs.

Signed-off-by: Dan Horák <dan@danny.cz>
2009-11-10 11:16:50 +01:00
Harald Hoyer b82e22dcaf kernel-modules: install all usb storage modules also 2009-11-05 17:06:26 +01:00
Philippe Seewer dc490a0f08 Add old style ide drivers if available
Some distros, including debian unstable with 2.6.30, still ship
old style ide drivers. These should be installed as well.

Sadly there are no symbols to use for nm, so a simple =ide needs
to suffice.
2009-10-27 16:02:56 +01:00
Harald Hoyer 2727e45b43 kernel-modules: force install of scsi_wait_scan in hostonly mode 2009-09-18 12:20:04 +02:00
Harald Hoyer 4839a7995e add pcmcia adapter 2009-09-14 19:30:20 +02:00
Harald Hoyer cb47caf786 add parameter to specify additional kernel modules to include
--add-drivers for dracut
add_drivers for dracut.conf
2009-09-09 17:02:37 +02:00
Harald Hoyer 71094bee63 base/init: add scsi_wait_scan to wait for host adapter scans 2009-09-09 11:09:04 +02:00
Victor Lowther 240cc7c480 Abstract out hostonly vs. generic module installation differences.
This introduces filter_kernel_modules, which should be used to install
all kernel modules that match whatever criteria you want.

If running in --hostonly, filter_kernel_modules will only consider
modules that are loaded in the kernel, otherwise it will consider
all the modules installed on the system for the appropriate kernel.

This drastically reduces initramfs generation time when using --hostonly
by eliminating lots of unneeded filesystem activity.
2009-08-20 15:52:45 -05:00
Victor Lowther f76ef3aa3d Speed up loading block drivers when running with --hostonly
Instead of grovelling through all the modules available for the
kernel looking for block devices, only look at the modules that are
actually loaded. This speeds things up by a rather large amount
when generating the initramfs with --hostonly.

While we are at it, only load the filesystem module that will actually
be used for the root filesystem when running in --hostonly instead
of all the filesystem modules that happen to be loaded at the time.
2009-08-19 22:21:29 -05:00
Victor Lowther ddfd1d10a0 Split kernel module loading into smaller chunks.
This prepares to more tightly integrate dracut-gencmdline with the
rest of the dracut scripts
2009-08-16 15:28:45 -05:00
Harald Hoyer 9d2eb35d7a 90kernel-modules/installkernel: do not install fs/ocfs2 filesystems 2009-07-31 12:40:53 +02:00
Harald Hoyer 5ea16f2790 kernel-modules: add modules for virtio devices 2009-07-31 12:40:53 +02:00
Harald Hoyer 33ee031c4a dracut: add --kernel-only and --no-kernel arguments
--kernel-only
              only install kernel drivers and firmware files

       --no-kernel
              do not install kernel drivers and firmware files

All kernel module related install commands moved from "install"
to "installkernel".

For "--kernel-only" all installkernel scripts of the specified
modules are used, regardless of any checks, so that all modules
which might be needed by any dracut generic image are in.

The basic idea is to create two images. One image with the kernel
modules and one without. So if the kernel changes, you only have
to replace one image.

Grub and the kernel can handle multiple images, so grub entry can
look like this:

title Fedora (2.6.29.5-191.fc11.i586)
        root (hd0,0)
        kernel /vmlinuz-2.6.29.5-191.fc11.i586 ro rhgb quiet
        initrd /initrd-20090722.img
        initrd /initrd-kernel-2.6.29.5-191.fc11.i586.img
        initrd /initrd-config.img

initrd-20090722.img
  the image provided by the initrd rpm
  one old backup version is kept like with the kernel

initrd-kernel-2.6.29.5-191.fc11.i586.img
  the image provided by the kernel rpm

initrd-config.img
  optional image with local configuration files
2009-07-22 15:07:11 +02:00
Harald Hoyer 441d31b927 use kernel module directory specified on command line in modules also 2009-07-21 17:37:41 +02:00
Warren Togami 696e68c643 Really fix --drivers 2009-06-30 15:35:18 -04:00
Warren Togami d8b3d672c3 Fix case where --drivers was specified. 2009-06-30 15:17:08 -04:00
Warren Togami 8af0a48521 Detect block drivers during dracut since we cannot rely on the modules.block list. 2009-06-30 14:36:57 -04:00
Victor Lowther e314863e67 Several updates to make dracut a bit more robust.
First, add a check script to 99base to ensure that it will load its
prerequisites.

Second, disable the udev magic dracut normally uses when generating
test images -- it was causing random failures when creating the test
root filesystem, presumably due to race conditions between the
rootfs creation scripts and udev.

Third, consolidate the rootfs creation scripts into one script.
2009-05-30 16:53:12 -05:00
Warren Togami c1143d3d6c Filesystem modules already included in =fs, no runtime detection allowed in default dracut 2009-05-28 16:29:22 -04:00
Warren Togami ba126e82af $drivers specified from .conf or --drivers get copied once, instead of multiple times with other calls to instmods() 2009-05-28 15:55:44 -04:00
Warren Togami e19d6bf603 Disambiguate modules and drivers. modules are dracutmodules. drivers are kernel modules. 2009-05-28 14:27:02 -04:00
Warren Togami 1a1b179a5b module-init-tools only recognizes files ending in *.conf, so only copy files of that pattern. 2009-05-21 11:38:25 -04:00
Harald Hoyer 9d5fc7b46e add filesystem modules to the initrd 2009-03-24 11:28:25 +01:00
Victor Lowther 4620284073 Move loading crypt kernel modules to the crypt module 2009-03-20 03:36:21 -05:00
Victor Lowther f8fc759574 Modify modprobe.d installation and add check for plymouth 2009-03-06 16:42:05 -06:00
Victor Lowther cb330cac77 Tighten up 90kernel-modules/install a bit. 2009-03-06 15:34:43 -06:00
Harald Hoyer 8123d43838 /etc/modprobe.d might have subdirs, so install them also 2009-03-06 16:58:44 +01:00
Harald Hoyer 4ab702040a install modprobe.d for special rules and blacklists 2009-03-06 15:44:50 +01:00
Harald Hoyer 0515a94129 add sd_mod to hardcode module list of doom 2009-03-06 15:44:25 +01:00
Victor Lowther 20abd91484 Create a self-contained structure for dracut modules
All modules now live in a subdirectory /modules.d.  Each module is
self-contained -- it should contain everything that it will install
on the initrd.  All modules must include a script named install, which
will be sourced by dracut.  This script should do the actual file installation
using inst methods.  The moddir variable will point to the full path to the
module dracut is currently working on.

As usual, this patch series applies on top of my previous patch series,
and is available as normalize-modules from http://git.fnordovax.org/dracut.
2009-03-04 16:55:14 +01:00