Browse Source

add parameter to specify additional kernel modules to include

--add-drivers for dracut
add_drivers for dracut.conf
master
Harald Hoyer 15 years ago
parent
commit
cb47caf786
  1. 9
      dracut
  2. 4
      dracut.8
  3. 4
      dracut.conf
  4. 2
      modules.d/90kernel-modules/installkernel

9
dracut

@ -34,7 +34,9 @@ Creates initial ramdisk images for preloading modules @@ -34,7 +34,9 @@ Creates initial ramdisk images for preloading modules
-o, --omit [LIST] Omit a space-separated list of dracut modules.
-a, --add [LIST] Add a space-separated list of dracut modules.
-d, --drivers [LIST] Specify a space-separated list of kernel modules to
include in the initramfs.
exclusively include in the initramfs.
--add-drivers [LIST] Specify a space-separated list of kernel
modules to add to the initramfs.
-k, --kmoddir [DIR] Specify the directory, where to look for kernel
modules
--fwdir [DIR] Specify additional directories, where to look for
@ -69,6 +71,7 @@ while (($# > 0)); do @@ -69,6 +71,7 @@ while (($# > 0)); do
-o|--omit) omit_dracutmodules_l="$2"; shift;;
-a|--add) add_dracutmodules_l="$2"; shift;;
-d|--drivers) drivers_l="$2"; shift;;
--add-drivers) add_drivers_l="$2"; shift;;
-k|--kmoddir) drivers_dir_l="$2"; shift;;
--fwdir) fw_dir_l="$2"; shift;;
--kernel-only) kernel_only="yes"; nokernel="no";;
@ -107,6 +110,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH @@ -107,6 +110,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
[[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l
[[ $add_dracutmodules_l ]] && add_dracutmodules="$add_dracutmodules $add_dracutmodules_l"
[[ $drivers_l ]] && drivers=$drivers_l
[[ $add_drivers_l ]] && add_drivers=$add_drivers_l
[[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l
[[ $fw_dir_l ]] && fw_dir=$fw_dir_l
[[ $do_strip_l ]] && do_strip=$do_strip_l
@ -158,7 +162,8 @@ trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die. @@ -158,7 +162,8 @@ trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
chmod 755 "$initdir"

export initdir hookdirs dsrc dracutmodules drivers \
fw_dir drivers_dir debug beverbose no_kernel kernel_only
fw_dir drivers_dir debug beverbose no_kernel kernel_only \
add_drivers

if [[ $kernel_only != yes ]]; then
# Create some directory structure first

4
dracut.8

@ -28,7 +28,9 @@ omit a space-separated list of dracut modules. @@ -28,7 +28,9 @@ omit a space-separated list of dracut modules.
add a space-separated list of dracut modules.
.TP
.BR \-d ", " \-\-drivers " \fILIST\fR"
specify a space-separated list of kernel modules to include in the initramfs.
specify a space-separated list of kernel modules to exclusively include in the initramfs.
.BR \-\-add-drivers " \fILIST\fR"
specify a space-separated list of kernel modules to add to the initramfs.
.TP
.BR \-k ", " \-\-kmoddir " \fI{DIR}\fR
specify the directory, where to look for kernel modules

4
dracut.conf

@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
# Dracut modules to omit
#omit_dracutmodules=""

# Additional kernel modules to install
#drivers=""
# additional kernel modules to the default
#add_drivers=""

# build initrd only to boot current hardware
#hostonly="-h"

2
modules.d/90kernel-modules/installkernel

@ -18,4 +18,6 @@ else @@ -18,4 +18,6 @@ else
instmods $drivers
fi

[[ $add_drivers ]] && instmods $add_drivers

instmods scsi_wait_scan

Loading…
Cancel
Save