Uninformative mount error when mounting unknown filesystem
Denys Vlasenko
vda.linux at googlemail.com
Sun Jun 27 14:23:08 UTC 2010
On Thursday 24 June 2010 09:46, beebee at piments.com wrote:
> >> I then tried to mount a ext3 partition, but got an error:
> >>
> >> # mount /dev/sda1 /mnt
> >> mount: mounting /dev/sda1 on /mnt failed: No such file or directory
> >>
> >> I also tried to pass the ``-t ext3`` flag:
> >>
> >> # mount -t ext3 /dev/sda1 /mnt
> >> mount: mounting /dev/sda1 on /mnt failed: No such device
> >>
> >> I took some time to discover that the problem was actually that the
> >> initrd didn't have the ext3 module, but the error is really not clear.
> >
> > The program simply displays a textual equivalent of numeric
> > errno value. It has no idea what really caused the error.
> >
> >> Something like "mount: unknown filesystem type 'ext3'" or "do you have
> >> the ext3 kernel module" or whatever would be better. Is there any
> >> interest about making that? Actually, is this possible in busybox'es
> >> environments?
> >
> > I think mount error codes just do not map well to
> > existing errno values. There is no ENOSUCHMODULE code.
> >
> > What solution do you propose.
>
> If I try a similar command on a desktop system using an fs that is not
> in my kernel and has no module, it gives a sensible error:
>
> bash# mount -t yaffs /dev/sda11 /mnt/tmp
> mount: unknown filesystem type 'yaffs'
>
> It seems standard mount does detect this condition , and the wrong
> error code is being attributed here.
Can you run
strace -oLOG -f mount -t yaffs /dev/sda11 /mnt/tmp
and post resulting LOG file?
--
vda
More information about the busybox
mailing list