Uninformative mount error when mounting unknown filesystem

Denys Vlasenko vda.linux at googlemail.com
Thu Jun 24 02:12:42 UTC 2010


On Wednesday 23 June 2010 21:57, Silas Silva wrote:
> Hi all,
> 
> I recently modified the Debian Lenny installer to automated some install
> tasks.  I modified the ``init`` script on the initrd to make what I
> wanted.  In this script, I have full access to the busybox binary in
> /bin (an all the symlinks that point to it).
> 
> 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.
-- 
vda


More information about the busybox mailing list