* mount error message
@ 2014-09-07 18:19 Bruce Dubbs
2014-09-07 20:13 ` Helmut Hullen
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Bruce Dubbs @ 2014-09-07 18:19 UTC (permalink / raw)
To: util-linux
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
It would be appropriate if both situations could return the 2nd message.
-- Bruce Dubbs
linuxfromscratch.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
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
2 siblings, 1 reply; 8+ messages in thread
From: Helmut Hullen @ 2014-09-07 20:13 UTC (permalink / raw)
To: util-linux
Hallo, Bruce,
Du meintest am 07.09.14:
> 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
> It would be appropriate if both situations could return the 2nd
> message.
There's no need to put the device into a special line in "/etc/fstab".
mount /dev/sdxn /run
should always work, with the appropriate values for x and n.
Viele Gruesse!
Helmut
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
2014-09-07 18:19 mount error message Bruce Dubbs
2014-09-07 20:13 ` Helmut Hullen
@ 2014-09-07 20:57 ` Dale R. Worley
2014-09-10 8:47 ` Karel Zak
2 siblings, 0 replies; 8+ messages in thread
From: Dale R. Worley @ 2014-09-07 20:57 UTC (permalink / raw)
To: Bruce Dubbs; +Cc: util-linux
> From: Bruce Dubbs <bruce.dubbs@gmail.com>
> $ mount /run
>
> returns an error message:
>
> mount: /run: No such file or directory
Does the directory /run exist on the system?
If it exists, then this message should not be appearing.
If it does exist, and also /run isn't in /etc/fstab, then mount has
the choice of which error to report.
Dale
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
2014-09-07 20:13 ` Helmut Hullen
@ 2014-09-10 7:03 ` Bruce Dubbs
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Dubbs @ 2014-09-10 7:03 UTC (permalink / raw)
To: helmut; +Cc: Helmut Hullen, util-linux
Helmut Hullen wrote:
> Hallo, Bruce,
>
> Du meintest am 07.09.14:
>
>> 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
>
>> It would be appropriate if both situations could return the 2nd
>> message.
>
> There's no need to put the device into a special line in "/etc/fstab".
>
> mount /dev/sdxn /run
>
> should always work, with the appropriate values for x and n.
Unless your script does not know what x or n are in advance.
Actually I followed up my original post and said the it was invalid.
-- Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
2014-09-07 18:19 mount error message Bruce Dubbs
2014-09-07 20:13 ` Helmut Hullen
2014-09-07 20:57 ` Dale R. Worley
@ 2014-09-10 8:47 ` Karel Zak
2014-09-11 1:52 ` Dylan Cali
2 siblings, 1 reply; 8+ messages in thread
From: Karel Zak @ 2014-09-10 8:47 UTC (permalink / raw)
To: Bruce Dubbs; +Cc: util-linux
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
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
2014-09-10 8:47 ` Karel Zak
@ 2014-09-11 1:52 ` Dylan Cali
2014-09-16 13:36 ` Karel Zak
0 siblings, 1 reply; 8+ messages in thread
From: Dylan Cali @ 2014-09-11 1:52 UTC (permalink / raw)
To: util-linux
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
2014-09-11 1:52 ` Dylan Cali
@ 2014-09-16 13:36 ` Karel Zak
2014-09-16 16:13 ` Dylan Cali
0 siblings, 1 reply; 8+ messages in thread
From: Karel Zak @ 2014-09-16 13:36 UTC (permalink / raw)
To: Dylan Cali; +Cc: util-linux
On Thu, Sep 11, 2014 at 01:52:44AM +0000, Dylan Cali wrote:
> 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
Very special use-case :-)
> 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.
Fixed in master branch. Thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mount error message
2014-09-16 13:36 ` Karel Zak
@ 2014-09-16 16:13 ` Dylan Cali
0 siblings, 0 replies; 8+ messages in thread
From: Dylan Cali @ 2014-09-16 16:13 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Tue, Sep 16, 2014 at 8:36 AM, Karel Zak <kzak@redhat.com> wrote:
> On Thu, Sep 11, 2014 at 01:52:44AM +0000, Dylan Cali wrote:
>> 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
>
> Very special use-case :-)
>
>> In this situation 'mount /run' results in:
>> mount: /run: mount failed: No such file or directory
>
> Fixed in master branch. Thanks!
Always trust random internet user to find the corner case :) Thanks
for your help!
Dylan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-09-16 16:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2014-09-16 13:36 ` Karel Zak
2014-09-16 16:13 ` Dylan Cali
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.