Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406755 - sys-kernel/dracut-017-r1 does not correctly mount filesystem in fstab.sys
Summary: sys-kernel/dracut-017-r1 does not correctly mount filesystem in fstab.sys
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-03 12:19 UTC by Richard Freeman
Modified: 2012-03-27 19:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (einfo.txt,6.81 KB, text/plain)
2012-03-03 12:19 UTC, Richard Freeman
Details
init.log (init.log,37.36 KB, text/plain)
2012-03-03 12:20 UTC, Richard Freeman
Details
fstab.sys (fstab.sys,784 bytes, text/plain)
2012-03-03 12:20 UTC, Richard Freeman
Details
0001-Revert-do-not-check-dev-node-exist-for-fstab-sys-mou.patch (0001-Revert-do-not-check-dev-node-exist-for-fstab-sys-mou.patch,1014 bytes, patch)
2012-03-06 09:13 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff
0002-Revert-fstab-sys-mount-it-in-initramfs-instead-of-ne.patch (0002-Revert-fstab-sys-mount-it-in-initramfs-instead-of-ne.patch,1.09 KB, patch)
2012-03-06 09:13 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Freeman gentoo-dev 2012-03-03 12:19:33 UTC
Using the fstab-sys module, previous versions of dracut correctly mounted /data, /usr, and /var.  The current version does not.

Doing some debugging I believe the issue is the test on line 23 of mount-sys.sh (in the fstab-sys module).  For some reason it is taking the first branch, which means that /data is getting mounted in the dracut root, and not $NEWROOT.  Obviously it will not be available when the system boots.

I've confirmed this behavior using rd.break - inspecting the system from a shell before the pivot confirms that the system created a /data directory and mounted it.  If I unmount that and correctly mount things in /sysroot the system boots fine.

The other two bind mounts fail but that is expected since the source of those mounts didn't mount.

The directory /sysroot/data does exist - as far as I can see there is nothing unusual about it.  At least, it exists when the shell breaks - I can't imagine why it wouldn't be visible before that test runs.  In the init.log I had inserted an extra line in mount-sys.sh: info "test was $NEWROOT/$_mp" - the output is visible in the log as /sysroot//data.  The extra slash shouldn't matter I would think.

Happy to run additional tests if you have them.

Reproducible: Always
Comment 1 Richard Freeman gentoo-dev 2012-03-03 12:19:59 UTC
Created attachment 304109 [details]
emerge --info
Comment 2 Richard Freeman gentoo-dev 2012-03-03 12:20:19 UTC
Created attachment 304111 [details]
init.log
Comment 3 Richard Freeman gentoo-dev 2012-03-03 12:20:43 UTC
Created attachment 304113 [details]
fstab.sys
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-06 09:13:29 UTC
Created attachment 304367 [details, diff]
0001-Revert-do-not-check-dev-node-exist-for-fstab-sys-mou.patch
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-06 09:13:45 UTC
Created attachment 304369 [details, diff]
0002-Revert-fstab-sys-mount-it-in-initramfs-instead-of-ne.patch
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-06 09:14:31 UTC
rich0, could you try to apply these two patches (↑) and test again?
Comment 7 David 2012-03-27 05:27:52 UTC
I have the same issue.  Until this is fixed, I simply do:  dracut --mount "[device] [mountpoint] [filesystem type]"  since  "--add-fstab /etc/fstab" doesn't actually work at this time.
Comment 8 Richard Freeman gentoo-dev 2012-03-27 11:58:06 UTC
(In reply to comment #6)
> rich0, could you try to apply these two patches (↑) and test again?

Apologies - I just realized I never replied here.  I had forgotten about this but had manually applied patch #2 and the system boots fine.  I have not tried patch #1.
Comment 9 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-27 14:06:32 UTC
Could you try latest HEAD? It's just fixed, probably. You might want to do this with my live ebuild in "aidecoe" overlay.
Comment 10 Richard Freeman gentoo-dev 2012-03-27 15:04:41 UTC
(In reply to comment #9)
> Could you try latest HEAD? It's just fixed, probably. You might want to do
> this with my live ebuild in "aidecoe" overlay.

System boots fine.  Was this really the result of a double-bracket?  

Oh, just checked - it looks like dash doesn't implement a double-bracket.  That seems rather odd to me.
Comment 11 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-27 16:06:27 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Could you try latest HEAD? It's just fixed, probably. You might want to do
> > this with my live ebuild in "aidecoe" overlay.
> 
> System boots fine.

Thank you!

+*dracut-017-r3 (27 Mar 2012)
+
+  27 Mar 2012; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-017-r3.ebuild,
+  +files/dracut-017-fstab-sys-no-check-for-dev.patch,
+  +files/dracut-017-fstab-sys-remove-bashism.patch:
+  Fixed fstab-sys not working with dash wrt bug #406755.
+
+  Applied also patch removing check for existing /dev, because "there are a lot
+  of filesystems, which do not need an actual device node".


> Was this really the result of a double-bracket?
>
> Oh, just checked - it looks like dash doesn't implement a double-bracket. 
> That seems rather odd to me.

[[ isn't POSIX, so it's not so odd.
Comment 12 Richard Freeman gentoo-dev 2012-03-27 16:50:34 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Oh, just checked - it looks like dash doesn't implement a double-bracket. 
> > That seems rather odd to me.
> 
> [[ isn't POSIX, so it's not so odd.

My mistake.  For some reason I thought that dash aimed to implement the full bash syntax (minus interactive features of the shell).  Apparently it only purports to implement the posix sh syntax.