This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Read-only file system

你好: 我使用的ARM是am335x,SD卡启动。文件系统一直可以正常启动。但是今天不知怎么回事,文件系统起来后我想删除一个文件,但是不成功,提示:“Read-only file system”,chmod、mkdir也是如此,内核和uboot我都没变,请问这是什么原因引起的?

  • 1.SD卡的只读打开了

    2.不排除SD卡有问题了,更换SD卡重新做一张启动卡和文件系统

    3.看下内核这个地方是否有影响

    drivers/mmc/card/block.c文件,去掉只读模式,

    static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) {

    … /* * Set the read-only status based on the supported commands * and the write protect switch. */

    //md->read_only = mmc_blk_readonly(card);

    … }

  • 什么板子?要确定一下文件系统在什么介质上哦,如果在SD卡,可参照楼上的做法试试

    或者重新烧写一次文件系统试试

  • 我使用了kooking的第三种方法已经解决了。我想再请教几个问题:我确认了SD卡的只读没有打开,我把SD卡格式化重新做启动卡和文件系统还是出现了相同的问题。使用方法三可以解决。

  • 内核把SD卡锁定为只读比较常见,如果要找到原因,可能要结合电路原理图和驱动,如果只需要使用,一般情况下,这样修改下内核就可以了

  • 谢谢kooking的解答。