On Tue, Feb 18, 2014 at 01:19:46PM +0800, Dave Young wrote:
> On 02/17/14 at 10:55am, Vivek Goyal wrote:
> > On Fri, Feb 14, 2014 at 04:49:21PM +0800, Dave Young wrote:
> > > It's useful for passing a full fstab line including like fs_passno so fsck
> > > can take effect.
> > > 
> > > Previously it's assumed that there's no fs_freq and fs_passno in fstab 
> > > lines
> > > so original code just append "0 0" at the end of each fstab lines.
> > > 
> > > Improve this issue by assign default value in case they are not passed in.
> > > Three field are handled here:
> > > fs_mntops: default to "defaults"
> > > fs_freq: default to "0"
> > > fs_passno: default to "0" 
> > > 
> > > Signed-off-by: Dave Young <[email protected]>
> > > ---
> > >  dracut.8.asc |    8 ++++++--
> > >  dracut.sh    |    6 +++++-
> > >  2 files changed, 11 insertions(+), 3 deletions(-)
> > > 
> > > --- dracut.orig/dracut.sh
> > > +++ dracut/dracut.sh
> > > @@ -1222,7 +1222,11 @@ if [[ $kernel_only != yes ]]; then
> > >      [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> 
> > > "${initdir}/etc/cmdline.d/01-default.conf"
> > >  
> > >      while pop fstab_lines line; do
> > > -        printf "%s\n" "$line 0 0" >> "${initdir}/etc/fstab"
> > > +        line=($line)
> > > +        [ -z "${line[3]}" ] && line[3]="defaults"
> > > +        [ -z "${line[4]}" ] && line[4]="0"
> > > +        [ -z "${line[5]}" ] && line[5]="0"
> > > +        echo "${line[@]}" >> "${initdir}/etc/fstab"
> > >      done
> > >  
> > >      for f in $add_fstab; do
> > > --- dracut.orig/dracut.8.asc
> > > +++ dracut/dracut.8.asc
> > > @@ -311,9 +311,13 @@ provide a valid _/etc/fstab_.
> > >  **--add-fstab** _<filename>_::
> > >      Add entries of _<filename>_ to the initramfs /etc/fstab.
> > >  
> > > -**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem 
> > > options>_"::
> > > +**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem 
> > > options>_ _<dump options>_ _<fsck order>_"::
> > >      Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and 
> > > _<filesystem
> > > -    options>_ in the initramfs
> > > +    options>_ in the initramfs. _<dump options>_ and _<fsck order>_ can 
> > > also be
> > 
> > How do you differentiate between filesystem options and dump option?  IOW,
> > what is used as separator so that dracut and find out what is a a
> > filesystem option and what is a dump option or pass number option?
> 
> It should be same as fstab format, use space or tab to seperate them.

Ok, so filesystem options have to be comma separated. This was not clear
from man page to me. I checked it on my system and we are passing
comma separated filesystem options.

dracut --hostonly -o 'plymouth dash' --mount 
'/dev/disk/by-uuid/87faf930-fd28-49e0-8b0f-d775141e7f59 /mnt/wd-ssd1 ext4 
rw,relatime,seclabel,data=ordered,nofail' -f 
/boot/initramfs-3.14.0-rc1+kdump.img 3.14.0-rc1+

If that's the case, then this approach should work.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to