首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用BusyBox挂载ext2 SD卡

使用BusyBox挂载ext2 SD卡
EN

Stack Overflow用户
提问于 2012-08-18 05:02:11
回答 2查看 26.4K关注 0票数 2

我正在尝试挂载我放入平板电脑中的SD卡。SD卡为ext2格式。我在平板电脑上的终端应用程序中尝试使用BusyBox,命令如下:

代码语言:javascript
复制
busybox mkfs.ext2

但似乎我需要向命令中添加一些参数。我需要向它添加什么命令?或者有一种更简单的方法来挂载SD卡?

我不想格式化SD卡,因为它上面有数据;但无论如何,将其读取为ext2格式都可以。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-08-18 05:25:59

应为busybox mount /dev/block/something /mountpointmkfs在Windows中创建了一个类似于format的文件系统

http://www.busybox.net/downloads/BusyBox.html#mount

或者是否有更简单的方法来挂载SD卡?

它通常是自动发生的,如果busybox mount已经挂载在某个地方,请检查它是否没有参数。

票数 1
EN

Stack Overflow用户

发布于 2012-08-18 05:27:32

您需要挂载ext2文件系统,而不是创建文件系统。

根据您的平板电脑,/dev中的设备可能与我的示例有所不同。但通常情况下,您希望运行类似的命令:

代码语言:javascript
复制
busybox mount -t ext2 /dev/block/vold/179:2 /data/sd-ext

其中/dev/block/vold/179:2是您尝试装载的设备。

而/data/ sd -ext是您要将SD卡挂载到的路径。

以下是mount命令的帮助页面

代码语言:javascript
复制
1|shell@android:/ $ busybox mount -t
option requires an argument -- t
BusyBox v1.20.0.git (2012-03-21 01:44:00 GMT) multi-call binary.

Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE

Mount a filesystem. Filesystem autodetection requires /proc.

    -a      Mount all filesystems in fstab
    -f      Dry run
    -i      Don't run mount helper
    -r      Read-only mount
    -w      Read-write mount (default)
    -t FSTYPE[,...] Filesystem type(s)
    -O OPT      Mount only filesystems with option OPT (-a only)
-o OPT:
    loop        Ignored (loop devices are autodetected)
    [a]sync     Writes are [a]synchronous
    [no]atime   Disable/enable updates to inode access times
    [no]diratime    Disable/enable atime updates to directories
    [no]relatime    Disable/enable atime updates relative to modification time
    [no]dev     (Dis)allow use of special device files
    [no]exec    (Dis)allow use of executable files
    [no]suid    (Dis)allow set-user-id-root programs
    [r]shared   Convert [recursively] to a shared subtree
    [r]slave    Convert [recursively] to a slave subtree
    [r]private  Convert [recursively] to a private subtree
    [un]bindable    Make mount point [un]able to be bind mounted
    [r]bind     Bind a file or directory [recursively] to another location
    move        Relocate an existing mount point
    remount     Remount a mounted filesystem, changing flags
    ro/rw       Same as -r/-w

There are filesystem-specific -o flags.
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12013140

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档