All of lore.kernel.org
 help / color / mirror / Atom feed
* sysroot not mounted in case several rootflags=subvol=@ boot params are passed
@ 2014-01-20 16:41 Thomas Renninger
  2014-01-20 19:40 ` Alexander Tsoy
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Renninger @ 2014-01-20 16:41 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Hi,

due to a bug in another tool it came out that
systemd/dracut cannot mount /sysroot if the same rootflags=
parameter is passed twice:
rootflags=subvol=@ rootflags=subvol=@

Yep, this should be fixed somewhere else, but I still
like to make the /sysroot mount more robust or at least find
out what what is going on more detailed.

journalctl -b -u  sysroot.mount
Jan 20 15:02:30 localhost systemd[1]: Failed to mount /sysroot.
Jan 20 15:02:30 localhost systemd[1]: Unit sysroot.mount entered failed state.
Jan 20 15:16:46 localhost systemd[1]: Mounting /sysroot...
Jan 20 15:16:46 localhost mount[970]: mount: wrong fs type, bad option, bad superblock on /dev/vda2,
Jan 20 15:16:46 localhost systemd[1]: sysroot.mount mount process exited, code=exited status=32


It looks like in
modules.d/99base/parse-root-opts.sh
rflags is made to "subvol=@,subvol=@"
and
modules.d/95rootfs-block/mount-root.sh
fails due to passing this as -o to mount?

But what I am mostly missing is any dracut warning.
I should see:
modules.d/95rootfs-block/mount-root.sh:
    while ! mount -t ${rootfs} -o "$_rflags_ro" "${root#block:}" "$NEWROOT"; do
        warn "Failed to mount -t ${rootfs} -o $_rflags_ro ${root#block:} $NEWROOT"
        fsck_ask_err
    done
?

This would give an obvios hint what is going wrong.

But I cannot find where "warn" is even defined.

Could be that I came on the wrong track somewhere.
I guess there cannot be made much against passing bad (or doubled) rootflags=
options, things will simply fail then, right?

Still it would be nice if someone can give me a hint how I can
debug similar stuff easier next time.

Thanks!

    Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sysroot not mounted in case several rootflags=subvol=@ boot params are passed
  2014-01-20 16:41 sysroot not mounted in case several rootflags=subvol=@ boot params are passed Thomas Renninger
@ 2014-01-20 19:40 ` Alexander Tsoy
       [not found]   ` <20140120234054.1f45a631-gl4+DzqHFJLpx9ONITL1FA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Tsoy @ 2014-01-20 19:40 UTC (permalink / raw)
  To: Thomas Renninger; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

В Mon, 20 Jan 2014 17:41:10 +0100
Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org> пишет:

> Hi,
> 
> due to a bug in another tool it came out that
> systemd/dracut cannot mount /sysroot if the same rootflags=
> parameter is passed twice:
> rootflags=subvol=@ rootflags=subvol=@
> 
> Yep, this should be fixed somewhere else, but I still
> like to make the /sysroot mount more robust or at least find
> out what what is going on more detailed.
> 
> journalctl -b -u  sysroot.mount
> Jan 20 15:02:30 localhost systemd[1]: Failed to mount /sysroot.
> Jan 20 15:02:30 localhost systemd[1]: Unit sysroot.mount entered
> failed state. Jan 20 15:16:46 localhost systemd[1]:
> Mounting /sysroot... Jan 20 15:16:46 localhost mount[970]: mount:
> wrong fs type, bad option, bad superblock on /dev/vda2, Jan 20
> 15:16:46 localhost systemd[1]: sysroot.mount mount process exited,
> code=exited status=32
> 
> 
> It looks like in
> modules.d/99base/parse-root-opts.sh
> rflags is made to "subvol=@,subvol=@"
> and
> modules.d/95rootfs-block/mount-root.sh
> fails due to passing this as -o to mount?
> 
> But what I am mostly missing is any dracut warning.
> I should see:
> modules.d/95rootfs-block/mount-root.sh:
>     while ! mount -t ${rootfs} -o "$_rflags_ro" "${root#block:}"
> "$NEWROOT"; do warn "Failed to mount -t ${rootfs} -o $_rflags_ro
> ${root#block:} $NEWROOT" fsck_ask_err
>     done
> ?

No. In your case rootflags are handled by systemd-fstab-generator.
Comment from systemd sources (src/fstab-generator/fstab-generator.c):

/* root= and roofstype= may occur more than once, the last instance
should take precedence.
 * In the case of multiple rootflags= the arguments should be
concatenated */

You can see the generated mount unit from emergency shell. It should be
located here:
/run/systemd/generator/sysroot.mount

> 
> This would give an obvios hint what is going wrong.
> 
> But I cannot find where "warn" is even defined.
> 
> Could be that I came on the wrong track somewhere.
> I guess there cannot be made much against passing bad (or doubled)
> rootflags= options, things will simply fail then, right?
> 
> Still it would be nice if someone can give me a hint how I can
> debug similar stuff easier next time.
> 
> Thanks!
> 
>     Thomas
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs"
> in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Alexander Tsoy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sysroot not mounted in case several rootflags=subvol=@ boot params are passed
       [not found]   ` <20140120234054.1f45a631-gl4+DzqHFJLpx9ONITL1FA@public.gmane.org>
@ 2014-01-20 20:40     ` Alexander Tsoy
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Tsoy @ 2014-01-20 20:40 UTC (permalink / raw)
  To: Thomas Renninger; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Mon Jan 20 23:40:54 2014 Alexander Tsoy <alexander-EP/B3+myoZc@public.gmane.org> wrote:
> В Mon, 20 Jan 2014 17:41:10 +0100
> Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org> пишет:
> 
> > Hi,
> > 
> > due to a bug in another tool it came out that
> > systemd/dracut cannot mount /sysroot if the same rootflags=
> > parameter is passed twice:
> > rootflags=subvol=@ rootflags=subvol=@
> > 
> > Yep, this should be fixed somewhere else, but I still
> > like to make the /sysroot mount more robust or at least find
> > out what what is going on more detailed.
> > 
> > journalctl -b -u   sysroot.mount
> > Jan 20 15:02:30 localhost systemd[1]: Failed to mount /sysroot.
> > Jan 20 15:02:30 localhost systemd[1]: Unit sysroot.mount entered
> > failed state. Jan 20 15:16:46 localhost systemd[1]:
> > Mounting /sysroot... Jan 20 15:16:46 localhost mount[970]: mount:
> > wrong fs type, bad option, bad superblock on /dev/vda2, Jan 20
> > 15:16:46 localhost systemd[1]: sysroot.mount mount process exited,
> > code=exited status=32
> > 
> > 
> > It looks like in
> > modules.d/99base/parse-root-opts.sh
> > rflags is made to "subvol=@,subvol=@"
> > and
> > modules.d/95rootfs-block/mount-root.sh
> > fails due to passing this as -o to mount?
> > 
> > But what I am mostly missing is any dracut warning.
> > I should see:
> > modules.d/95rootfs-block/mount-root.sh:
> > while ! mount -t ${rootfs} -o "$_rflags_ro" "${root#block:}"
> > "$NEWROOT"; do warn "Failed to mount -t ${rootfs} -o $_rflags_ro
> > ${root#block:} $NEWROOT" fsck_ask_err
> > done
> > ?
> 
> No. In your case rootflags are handled by systemd-fstab-generator.

And, of course, systemd is actually mounting root fs, not the mount-root.sh script.

> Comment from systemd sources (src/fstab-generator/fstab-generator.c):
> 
> /* root= and roofstype= may occur more than once, the last instance
> should take precedence.
>   * In the case of multiple rootflags= the arguments should be
> concatenated */
> 
> You can see the generated mount unit from emergency shell. It should be
> located here:
> /run/systemd/generator/sysroot.mount
> 
> > 
> > This would give an obvios hint what is going wrong.
> > 
> > But I cannot find where "warn" is even defined.
> > 
> > Could be that I came on the wrong track somewhere.
> > I guess there cannot be made much against passing bad (or doubled)
> > rootflags= options, things will simply fail then, right?
> > 
> > Still it would be nice if someone can give me a hint how I can
> > debug similar stuff easier next time.
> > 
> > Thanks!

-- 
Alexander Tsoy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-20 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 16:41 sysroot not mounted in case several rootflags=subvol=@ boot params are passed Thomas Renninger
2014-01-20 19:40 ` Alexander Tsoy
     [not found]   ` <20140120234054.1f45a631-gl4+DzqHFJLpx9ONITL1FA@public.gmane.org>
2014-01-20 20:40     ` Alexander Tsoy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.