From: Dylan Cali <calid1984@gmail.com>
To: util-linux@vger.kernel.org
Subject: Re: mount error message
Date: Thu, 11 Sep 2014 01:52:44 +0000 (UTC) [thread overview]
Message-ID: <loom.20140911T034049-77@post.gmane.org> (raw)
In-Reply-To: 20140910084732.GN21325@x2.net.home
Karel Zak <kzak@...> writes:
>
> On Sun, Sep 07, 2014 at 01:19:05PM -0500, Bruce Dubbs wrote:
> > I have a user that complains that mount is giving an incorrect error message
> > under some circumstances. For instance if mtab is symlinked to
> > /proc/self/mounts the command and /run is not in fstab:
> >
> > $ mount /run
> >
> > returns an error message:
> >
> > mount: /run: No such file or directory
> >
> > However if mtab is a regular file, the error message is:
> >
> > mount: can't find /run in /etc/fstab
>
> $ test -d /mnt/test && echo "yes" || echo "no"
> yes
> $ test -d /nothing && echo "yes" || echo "no"
> no
>
> $ ls -l /etc/mtab
> lrwxrwxrwx 1 root root 12 Jun 17 15:42 /etc/mtab -> /proc/mounts
>
> $ mount /mnt/test
> mount: can't find /mnt/test in /etc/fstab
>
> $ mount /nothing
> mount: /nothing: No such file or directory
>
> $ ls -l /etc/mtab
> -r--r--r-- 1 root root 2693 Sep 10 10:16 /etc/mtab
>
> $ mount /mnt/test
> mount: can't find /mnt/test in /etc/fstab
> $ mount /nothing
> mount: /nothing: No such file or directory
>
> All works as expected.
>
> Note that mount(8) sanitize paths specified by non-root users on
> command line, so the message "No such file or directory" is really
> expected and it's far before libmount starts to evaluate things in
> mtab/fstab.
>
> Karel
>
Hello I'm the user in question. The specific situation was a boot time
failure where /proc had failed to mount. So to enumerate the conditions and
the result:
1) /proc is not mounted (or has failed to mount)
2) /etc/mtab is a symlink to /proc/mounts (or /proc/self/mounts)
3) /run is not in /etc/fstab
4) The directory /run exists on the filesystem
In this situation 'mount /run' results in:
mount: /run: mount failed: No such file or directory
Obviously mount is referring to /etc/mtab not existing, so the error message
at present is misleading.
next prev parent reply other threads:[~2014-09-11 2:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-07 18:19 mount error message Bruce Dubbs
2014-09-07 20:13 ` Helmut Hullen
2014-09-10 7:03 ` Bruce Dubbs
2014-09-07 20:57 ` Dale R. Worley
2014-09-10 8:47 ` Karel Zak
2014-09-11 1:52 ` Dylan Cali [this message]
2014-09-16 13:36 ` Karel Zak
2014-09-16 16:13 ` Dylan Cali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20140911T034049-77@post.gmane.org \
--to=calid1984@gmail.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).