echo "Usage: $0 [OPTION]... <initramfs> <kernel-version>
Creates initial ramdisk images for preloading modules
- -f, --force Overwrite existing initramfs file
+ -f, --force Overwrite existing initramfs file.
-m, --modules [LIST] Specify a space-separated list of dracut modules to
call when building the initramfs. Modules are located
- in /usr/lib/dracut/modules.d
- -o, --omit [LIST] Omit a space-separated list of dracut modules
+ in /usr/lib/dracut/modules.d.
+ -o, --omit [LIST] Omit a space-separated list of dracut modules.
-d, --drivers [LIST] Specify a space-separated list of kernel modules to
- include in the initramfs
+ include in the initramfs.
-h, --help This message
--debug Output debug information of the build process
-v, --verbose Verbose output during the build process
directory instead of the system-wide installed in
/usr/lib/dracut/modules.d.
Useful when running dracut from a git checkout.
- -h, --hostonly Host-Only mode: Install only what is needed for
+ -H, --hostonly Host-Only mode: Install only what is needed for
booting the local host instead of a generic host.
-i, --include [SOURCE] [TARGET]
- Include the files in SOURCE in the final initramfs
- --skip-missing
+ Include the files in the SOURCE directory into the
+ Target directory in the final initramfs.
+ -I, --install [LIST] Install the space separated list of files into the
+ initramfs.
+ --skip-missing Do not quit on missing module dependencies but skip
+ these.
"
}
-v|--verbose) beverbose="yes";;
-c|--conf) conffile="$2"; shift;;
-l|--local) allowlocal="yes" ;;
- -h|--hostonly) hostonly="-h" ;;
+ -H|--hostonly) hostonly="-h" ;;
-i|--include) include_src="$2"; include_target="$3"; shift 2;;
+ -I|--install) install_items="$2"; shift;;
--skip-missing) skipmissing="yes" ;;
*) break ;;
esac
cp -a -t "$initdir$include_target" "$include_src"/*
}
+for item in $install_items; do
+ dracut_install "$item"
+done
+unset item
+
[[ "$beverbose" = "yes" ]] && (du -c "$initdir" | sort -n)
( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )