Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 807971 - sys-kernel/dracut-055 fails to mount /sysroot/usr ("mount point does not exist")
Summary: sys-kernel/dracut-055 fails to mount /sysroot/usr ("mount point does not exist")
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-08-13 07:11 UTC by Sven Eden
Modified: 2021-08-17 17:24 UTC (History)
2 users (show)

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


Attachments
dracut log from 2021-08-04 (CONFIG_TMPFS_INODE64=y) (rdsosreport.txt,107.81 KB, text/plain)
2021-08-13 07:14 UTC, Sven Eden
Details
dracut log from 2021-08-13 (CONFIG_TMPFS_INODE64 is not set) (rdsosreport2.txt,100.37 KB, text/plain)
2021-08-13 07:15 UTC, Sven Eden
Details
mount-usr.patch (mount-usr.patch,734 bytes, text/plain)
2021-08-16 11:32 UTC, Alexander Tsoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2021-08-13 07:11:58 UTC
Since sys-kernel/dracut-055, the version 053 works correctly, I have to mount sysroot/usr by hand, because dracut mounting /usr to /sysroot/usr failed.

I basically cat /sysroor/etc/fstab and mount /usr into /sysroot/usr with exactly the information from fstab, so there is absolutely no magic involved.

And in case this wasn't clear: The mount point *does* exist, I do not have to mkdir it first.

Reproducible: Always

Steps to Reproduce:
1. Upgrade to sys-kernel/dracut-055
2. Create new initramfs with usrmount module enabled
3. reboot
Actual Results:  
dracut complains that mounting /usr into /sysroot/usr failed

Expected Results:  
machine should boot without any issues
Comment 1 Sven Eden 2021-08-13 07:14:31 UTC
Created attachment 732555 [details]
dracut log from 2021-08-04 (CONFIG_TMPFS_INODE64=y)

Log from a boot session with the kernel being configured with
CONFIG_TMPFS_INODE64=y
Comment 2 Sven Eden 2021-08-13 07:15:33 UTC
Created attachment 732557 [details]
dracut log from 2021-08-13 (CONFIG_TMPFS_INODE64 is not set)

dracut log with kernel configured without CONFIG_TMPFS_INODE64.
Comment 3 Mike Gilbert gentoo-dev 2021-08-13 14:48:42 UTC
The usrmount module reads /sysroot/etc/fstab, transforms the mount targets to include /sysroot, and writes this to /etc/fstab. Perhaps this transformation is not happening correctly.

When you get the rescue shell, take a look at what /etc/fstab looks like.
Comment 4 Sven Eden 2021-08-16 10:23:56 UTC
(In reply to Mike Gilbert from comment #3)
> The usrmount module reads /sysroot/etc/fstab, transforms the mount targets
> to include /sysroot, and writes this to /etc/fstab. Perhaps this
> transformation is not happening correctly.
> 
> When you get the rescue shell, take a look at what /etc/fstab looks like.

Alright, I am updating to 055 again.
If there is a discrepancy, I'll take a photo and write the diff here.
Comment 5 Sven Eden 2021-08-16 10:45:22 UTC
The two relevant entries in /etc/fstab are:

--------------------------------
/dev/nvme1n1p4  /          ext4   defaults,rw,noatime,errors=remount-ro,discard         0 1
/dev/nvme0n1p5  /usr       ext4   defaults,rw,noatime,errors=remount-ro,discard         0 1
--------------------------------

And dracut-055 turns them into:

--------------------------------
/dev/disk/by-uuid/d03f8a0c-d8d6-4a8b-9d9d-41ac175ad60c /sysroot ext4 rw,noatime,discard,errors=remount-ro,ro 0 0
 /sysroot/usr ext4 defaults,rw,noatime,errors=remount-ro,discard,ro 0 1
--------------------------------

So basically the /usr device is missing.

Note: I know that some options are redundant.
Comment 6 Alexander Tsoy 2021-08-16 11:32:07 UTC
Created attachment 733285 [details]
mount-usr.patch

This looks like regression introduced by
https://github.com/dracutdevs/dracut/commit/d3532978de04c78f53664dad7b37705a49a7ee54

Does the attached patch work for you?
Comment 7 Alexander Tsoy 2021-08-16 16:06:34 UTC
PR:
https://github.com/dracutdevs/dracut/pull/1586
Comment 8 Sven Eden 2021-08-16 18:31:52 UTC
(In reply to Alexander Tsoy from comment #6)
> Created attachment 733285 [details]
> mount-usr.patch
> 
> Does the attached patch work for you?

Yes! That patch fixed the issue, my machine is now booting successfully with an image made with dracut-055-r1 !

Thank you very much!
Comment 9 Sven Eden 2021-08-17 17:19:20 UTC
I have just seen, that the PR got merged. Thank you very much again!

->closed
Comment 10 Sven Eden 2021-08-17 17:20:57 UTC
*meh*

Stupid me should control at least *twice* _which_ PR got merge.

-> Reopened until the *correct* PR got merged!
Comment 11 Larry the Git Cow gentoo-dev 2021-08-17 17:24:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85685d7b73395bddcf58a7550a0220ee9175e3f2

commit 85685d7b73395bddcf58a7550a0220ee9175e3f2
Author:     Alexander Tsoy <alexander@tsoy.me>
AuthorDate: 2021-08-17 10:51:21 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2021-08-17 17:23:41 +0000

    sys-kernel/dracut: fix usr mount regression
    
    Closes: https://bugs.gentoo.org/807971
    Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/22009

 .../{dracut-055-r1.ebuild => dracut-055-r2.ebuild} |  1 +
 ...5-fix-usrmount-do-not-empty-_dev-variable.patch | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)