0

I enabled root for adb, and then tried the following:

root@crespo:/ # mount /dev/block/platform/s3c-sdhci.0/by-name/media /storage/sdcard0
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|root@crespo:/ # mount /dev/block/mmcblk0p3 /storage/sdcard0
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|root@crespo:/ # mount /dev/block/mmcblk0 /storage/sdcard0
Usage: mount [-r] [-w] [-o options] [-t type] device directory

but, even if -t is optional, I get a different error message by adding it:

1|root@crespo:/ # mount -t vfat /dev/block/mmcblk0 /storage/sdcard0
mount: Device or resource busy

maybe the arguments parsing of the command is messed up... seems like a bug in busybox, or is something much more pedestrian going wrong?

7
  • Check that /dev/block/mmcblk0 is a device node, and that /system/sdcard0 exists and is a directory (not a symlink).
    – Dan Hulme
    Jan 20, 2014 at 13:45
  • whoops, I realized that the correct target is /storage/sdcard0 not /system/sdcard0... the result is still the same btw
    – berdario
    Jan 20, 2014 at 13:59
  • @DanHulme stat /dev/block/mmcblk0 says it's a block special file and stat /storage/sdcard0 says it's directory
    – berdario
    Jan 20, 2014 at 14:01
  • I also sent a mail to the busybox mailing list: lists.busybox.net/pipermail/busybox/2014-January/080328.html
    – berdario
    Jan 20, 2014 at 14:33
  • You can't mount mmcblk0, you can only mount partitions (xxxxxxYpZ) Jan 20, 2014 at 14:51

1 Answer 1

0

It turned out that mount isn't actually supplied by busybox, but by toolbox.

With this knowledge, it was easy to track down the cause of the bug: unlike busybox, since I don't have another "toolbox" implementation with a correctly working mount command, it's likely that the behavior would've been easy to see from the code.

In fact the problem is here at line 330: it checks if type == NULL, but then outputs an USAGE that erroneously shows -t as optional

Compare with busybox at line 1930: // Loop through filesystem types until mount succeeds

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .