modules will be copied over and things should be good to go. If you'd
like to customize the list of modules copied in, edit /etc/dracut.conf
and set
- modules="foo bar baz"
+ dracutmodules="foo bar baz"
+Note that dracut calls functional components in modules.d "modules"
+while kernel modules are called "drivers".
Requirements:
* udev
-f|--force) force=yes;;
-m|--modules) dracutmodules_l="$2"; shift;;
-o|--omit) omit_dracutmodules_l="$2"; shift;;
- -d|--drivers) modules_l="$2"; shift;;
+ -d|--drivers) drivers_l="$2"; shift;;
-h|--help) usage; exit 1 ;;
--debug) debug="yes"; set -x;;
-v|--verbose) beverbose="yes";;
# these options override the stuff in the config file
[[ $dracutmodules_l ]] && dracutmodules=$dracutmodules_l
[[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l
-[[ $modules_l ]] && modules=$modules_l
+[[ $drivers_l ]] && drivers=$drivers_l
[[ $allowlocal && -f "$(dirname $0)/dracut-functions" ]] && dsrc="$(dirname $0)" || dsrc=/usr/lib/dracut
if [[ -f $dsrc/dracut-functions ]]; then
# Need to be able to have non-root users read stuff (rpcbind etc)
chmod 755 "$initdir"
-export initdir hookdirs dsrc dracutmodules modules debug beverbose
+export initdir hookdirs dsrc dracutmodules drivers debug beverbose
# Create some directory structure first
for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot tmp dev/pts var/run; do
done
}
-# install modules, and handle installing all their dependencies as well.
+# install kernel modules, and handle installing all their dependencies as well.
instmods() {
local mod mpargs modpath modname cmd
local srcmods="/lib/modules/$kernel/"
#!/bin/bash
dracut_install ip dhclient hostname
-instmods ${modules:-=net}
+instmods ${drivers:-=net}
inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
instmods =networking ecb arc4
#!/bin/bash
# FIXME: hard-coded module list of doom.
-instmods ${modules:-=ata =block sd_mod =fs}
+instmods ${drivers:-=ata =block sd_mod =fs}
# Grab modules for all filesystem types we currently have mounted
while read d mp t rest; do
#dracutmodules="base crypt lvm kernel-modules debug resume rootfs-block udev-rules network NFS"
#omit_dracutmodules="plymouth"
-#modules="ata_piix ext2 sd_mod"
+#drivers="ata_piix ext2 sd_mod"