From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [patch 3/3] Add a dracut option --device to bring up a device in initramfs Date: Fri, 17 Aug 2012 13:04:08 -0400 Message-ID: <20120817170408.GC11604@redhat.com> References: <20120817123519.082687047@redhat.com> <20120817123905.353853040@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20120817123905.353853040-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, Aug 17, 2012 at 08:35:22PM +0800, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org wrote: > Kdump support dump to raw device which could be on top of complex sto= rage > such as multipath and iscsi which are standalone dracut modules. >=20 > Add a --device option to dracut which will add the device to host_dev= s so > dracut can add the dependent modules automaticlly and enable them in = initramfs. >=20 > --device will accept device node name as the param. Last time you mentioned that device should be device node as /dev/sda. = I think that can fail due to device renaming. So make sure to specify here that device name here should be persistent device name as generated by udev. (/dev/disk/by-id/* or /dev/disk/by-uu= id/*). Thanks Vivek >=20 > Signed-off-by: Dave Young > Tested-by: Chao Wang > --- > dracut.8.asc | 3 +++ > dracut.sh | 3 +++ > 2 files changed, 6 insertions(+) >=20 > --- dracut.orig/dracut.sh > +++ dracut/dracut.sh > @@ -133,6 +133,7 @@ Creates initial ramdisk images for prelo > --mount "[DEV] [MP] [FSTYPE] [FSOPTS]" > Mount device [DEV] on mountpoint [MP] with f= ilesystem > [FSTYPE] and options [FSOPTS] in the initram= fs > + --device "[DEV]" Bring up [DEV] in initramfs > -i, --include [SOURCE] [TARGET] > Include the files in the SOURCE directory in= to the > Target directory in the final initramfs. > @@ -261,6 +262,7 @@ TEMP=3D$(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=3D"yes";; > --ro-mnt) ro_mnt_l=3D"yes";; > -k|--kmoddir) drivers_dir_l=3D"$2"; shift;; > --- dracut.orig/dracut.8.asc > +++ dracut/dracut.8.asc > @@ -321,6 +321,9 @@ provide a valid _/etc/fstab_. > Mount __ on __ with __ and = _ options>_ in the initramfs > =20 > +**--device** __ :: > + Bring up __ in initramfs, __ should be the devic= e name > + > **-i, --include**=A0__=A0__:: > include the files in the SOURCE directory into the > TARGET directory in the final initramfs. If SOURCE is a file, it= will be