From: dyoung@redhat.com Date: Thu, 23 Aug 2012 03:02:24 +0000 (+0800) Subject: Add a dracut option --device to bring up a device in initramfs X-Git-Tag: 024~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52f1b04183a6a1e0cfbb7e5b46c8d371fdadea5b;p=thirdparty%2Fdracut.git Add a dracut option --device to bring up a device in initramfs Kdump support dump to raw device which could be on top of complex storage such as multipath and iscsi which are standalone dracut modules. Add a --device option to dracut which will add the device to host_devs so dracut can add the dependent modules automaticlly and enable them in initramfs. --device will accept device node name as the param. Signed-off-by: Dave Young Tested-by: Chao Wang --- diff --git a/dracut.8.asc b/dracut.8.asc index 0902b3b26..203f9cde6 100644 --- a/dracut.8.asc +++ b/dracut.8.asc @@ -321,6 +321,9 @@ provide a valid _/etc/fstab_. Mount __ on __ with __ and __ in the initramfs +**--device** __ :: + Bring up __ in initramfs, __ should be the device name + **-i, --include** __ __:: include the files in the SOURCE directory into the TARGET directory in the final initramfs. If SOURCE is a file, it will be diff --git a/dracut.sh b/dracut.sh index 2b0b08559..a6f619322 100755 --- a/dracut.sh +++ b/dracut.sh @@ -133,6 +133,7 @@ Creates initial ramdisk images for preloading modules --mount "[DEV] [MP] [FSTYPE] [FSOPTS]" Mount device [DEV] on mountpoint [MP] with filesystem [FSTYPE] and options [FSOPTS] in the initramfs + --device "[DEV]" Bring up [DEV] in initramfs -i, --include [SOURCE] [TARGET] Include the files in the SOURCE directory into the Target directory in the final initramfs. @@ -261,6 +262,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \ --long fscks: \ --long add-fstab: \ --long mount: \ + --long device: \ --long nofscks: \ --long ro-mnt \ --long kmoddir: \ @@ -327,6 +329,7 @@ while :; do --fscks) push fscks_l "$2"; shift;; --add-fstab) push add_fstab_l "$2"; shift;; --mount) push fstab_lines "$2"; shift;; + --device) push host_devs "$2"; shift;; --nofscks) nofscks_l="yes";; --ro-mnt) ro_mnt_l="yes";; -k|--kmoddir) drivers_dir_l="$2"; shift;;