Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399213 - sys-kernel/dracut? - usrmount module insert wrong path into /etc/fstab : boot failed with "mount: can't find /sysroot/usr in /etc/fstab or /etc/mtab"
Summary: sys-kernel/dracut? - usrmount module insert wrong path into /etc/fstab : boot...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 21:39 UTC by claneys.skyne
Modified: 2012-01-31 09:03 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description claneys.skyne 2012-01-17 21:39:24 UTC
With a separate /usr, we needed to use either fstab-sys or usrmount dracut module to mount /usr before pivot into new root. But if we use usrmount, everything are fine (detection,fsck) but when it attempt to mount it, there is error:
"dracut: mount: can't find /sysroot/usr in /etc/fstab or /etc/mtab"


Reproducible: Always

Steps to Reproduce:
1. Generate an initramfs with usrmount dracut module
2. Reboot
Actual Results:  
Get this error:
"dracut: mount: can't find /sysroot/usr in /etc/fstab or /etc/mtab"

Expected Results:  
Mount /usr into newroot before pivot

To get what entry usrmount module insert into /etc/fstab, I done a cat on it. And it reveal this line
/dev/mapper/vgroot-lvusr /sysroot//usr ext4 0 1

It is almost fine, if there isn't a double slash into mountpoint.

Replacing the line
echo "$_dev $NEWROOT/$_mp $_fs ${_opts},ro $_rest"
by
echo "$_dev ${NEWROOT}${_mp} $_fs ${_opts},ro $_rest"
in the file mount-usr.sh of usrmount dracut module do the work.
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-01-23 19:06:12 UTC
What version of sys-apps/util-linux do you have? I've tried multiple slashed in a mount point (in /etc/fstab) with 2.20.1-r1 and mount doesn't have problem with recognizing it.
Comment 2 claneys.skyne 2012-01-23 21:56:57 UTC
I have sys-apps/util-linux-2.19.1-r1
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-01-24 09:37:41 UTC
Indeed. I have reproduced this with 2.19.1-r1. I will probably have to depend on newer version of util-linux, since it is the "mount" command broken in this regard.
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-01-30 18:03:19 UTC
I have changed dependency to >=sys-apps/util-linux-2.20. This is actually what upstream requires. Thank you for the report!
Comment 5 Nikoli 2012-01-30 21:42:52 UTC
Please make usrmount module optional instead of forcing usage of ~amd64 util-linux and sysvinit. I have amd64 stable system without separate /usr, dracut works fine.
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-01-31 09:03:01 UTC
Dracut requires >=util-linux-2.20 as of Oct 21. My oversight I haven't updated this dependency with version bump to 014. And this is not only because of usrmount. Please use 013 until util-linux-2.20 will become stable.