Bug 709681 - failure to mount if a mount point ends with a slash in /etc/fstab
Summary: failure to mount if a mount point ends with a slash in /etc/fstab
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 15
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
: 708489 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2011-06-01 11:32 UTC by tranquilmmf
Modified: 2011-08-25 12:17 UTC (History)
11 users (show)

Fixed In Version: util-linux-2.19.1-1.2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-06-21 17:39:47 UTC

Attachments (Terms of Use)

Description tranquilmmf 2011-06-01 11:32:42 UTC
Description of problem:
Systemd crashes with misconfigured /etc/fstab while mount -a works fine with it.

Version-Release number of selected component (if applicable):
fedora 15 x86_64

How reproducible:

Steps to Reproduce:
0. Create logical volume /dev/mapper/vg_john-qwe, make ext4 filesystem on it.
1. Add the line in /etc/fstab:
/dev/mapper/vg_john-qwe    /mnt/qwe/     ext4    defaults        0 0
2. Check it with mount -a. All works fine.
3. Reboot
Actual results:
System fails to boot, gives prompt for root password and emergency mode.

Expected results:
Normal boot with /dev/mapper/vg_john-qwe mounted into /mnt/qwe/

Additional info:
If we remove trailing slash for /mnt/qwe path in /etc/fstab, a system boots without errors.

Comment 1 Michal Schmidt 2011-06-01 14:15:33 UTC
My nitpicking: It does not crash. It just fails to mount /mnt/qwe/ and since the option "nofail" is not present, local-fs.target is considered failed too, which causes the switch to emergency.target.

Here's why it fails to mount it:
When systemd parses /etc/fstab, it trims the trailing slashes. When it comes to the mounting, it spawns "/bin/mount /mnt/qwe". mount complains:
  mount: can't find /mnt/qwe in /etc/fstab or /etc/mtab

systemd could be fixed to preserve the trailing slash for the benefit of /bin/mount, but I'm thinking mount itself could be more tolerant of the trailing slashes in fstab.

Karel, what do you think?

Comment 2 Karel Zak 2011-06-02 12:55:59 UTC
Fixed by upstream commit aab72640daa7ee2db3d42fc8278ab86e3aef2d71. 

Fedora package will be updated ASAP.

Comment 3 Vytas 2011-06-10 18:57:57 UTC
*** Bug 708489 has been marked as a duplicate of this bug. ***

Comment 4 Michal Schmidt 2011-06-13 07:00:07 UTC
(In reply to comment #2)
> Fixed by upstream commit aab72640daa7ee2db3d42fc8278ab86e3aef2d71. 
> Fedora package will be updated ASAP.

would you make the update soon please?

Comment 5 Fedora Update System 2011-06-14 10:07:14 UTC
util-linux-2.19.1-1.2.fc15 has been submitted as an update for Fedora 15.

Comment 6 Fedora Update System 2011-06-15 18:29:29 UTC
Package util-linux-2.19.1-1.2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing util-linux-2.19.1-1.2.fc15'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-06-21 17:39:41 UTC
util-linux-2.19.1-1.2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Julio Silva 2011-08-24 15:25:50 UTC
Hi guy and gals,

First, I must say that I am impressed by the quality of this bug report.  

Second, I noticed that the "util-linux-2.19.1-1.2.fc15 has been pushed to the Fedora 15 stable repository" on 22-JUN-2011.  But, I just did an upgrade on my laptop from Fedora 13 to Fedora 15 via Internet and I hit this issue last night (23-AUG-2011).  So I am wondering if the package was actually "pushed".

Thank you in advance for your much appreciated feedback.

Have a great day!


Comment 9 Michal Schmidt 2011-08-24 15:53:30 UTC
Yes, the update was pushed. And there were even two more updates for the util-linux package since then.
I don't know what upgrade method you used. Is it possible that you did not have the updates repository enabled for the upgrade?
Use "rpm -q util-linux" to check what version of the package do you actually have installed.

Comment 10 Julio Silva 2011-08-25 12:17:10 UTC

Thank you for the feedback!  My hypothesis was incorrect.  The util-linux package is up to date.  The version is: util-linux-2.19.1-1.4.fc15.i686.

I upgraded my Laptop using the "Software Update" GUI application on the desktop, which downloaded all the packages via Internet and then installed them.  When I rebooted the machine, I got directed to the command line in safe mode.  I entered the root password and tried to run "init 5", but got an error like "command too dangerous".

- Julio

Note You need to log in before you can comment on or make changes to this bug.