Your message dated Fri, 3 Aug 2018 16:52:05 +0200
with message-id <20180803145205.rs3st3l42ltoav7v@mbpah>
and subject line Re: bind mounting a device node produces the wrong error 
message
has caused the Debian Bug report #903881,
regarding bind mounting a device node produces the wrong error message
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
903881: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903881
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mount
Version: 2.29.2-1+deb9

I foolishly had typed:

mount -o bind /dev/sdc1 /mnt/boot

when I was trying to do a chroot/cross-install of Debian from Debian
onto another drive, and the error only further confused the situation
because it was not the correct error. It said this:

mount: mount(2) failed: /mnt/boot: Not a directory

which it WAS a directory just created, as evident from the output of ls -l /mnt:

drwxr-xr-x 2 root root  4096 Jul 16 00:54 boot

what it seems to have MEANT was, that /dev/sdc1 is not a directory, as
I was trying to bind when a bind wasn't required for this. I am
reporting this so another user less experienced and perhaps more
confused doesn't have to bang their head off their keyboard. ;)

suggested fix is to have it output the correct error message and/or
maybe check to see if something is not a directory before saying that
it isn't so as not to further confuse a situation.

This is a standard Stretch system, stock kernel and all, amd64, I am
sure the bug is likely easily reproducible on any Debian system.

I'll leave classification of this bug up to the maintainer. Its
obviously not real serious, because as far as I know bind is only
suppose to bind one dir to another and this was incorrect usage, the
only problem is that the error was not only not helpful, but was also
incorrect and misled me to try figure out why it said a directory
wasn't a directory until it dawned on me that I was binding when no
bind was necessary. The whole point of plain language errors is to aid
in resolving the problem which this error only compounds if you don't
have the experience and knowledge to realize what is wrong when you
step back and look at what you did.

--- End Message ---
--- Begin Message ---
Hello,

On Mon, Jul 16, 2018 at 01:28:20AM -0400, Katy Tolsen wrote:
[...]
> mount: mount(2) failed: /mnt/boot: Not a directory
[...]

This literally means that mount asked the kernel to mount with the
information you provided but the kernel returned errno 20 (ENOTDIR).
The official plain english description of ENOTDIR is 'Not a directory'
as produced by perror().

As far as your suggested solution, I don't think mount should
second-guess what the kernel says.

Feel free to argue about this upstream, either that the kernel should be
changed to return a different error or whatever you think util-linux
should change. This is simply not a debian issue, so I'm going to tag
it wontfix and close it here. This is not the place to discuss upstream
changes.

Regards,
Andreas Henriksson

--- End Message ---

Reply via email to