您的位置:首页 > 运维架构 > Linux

解决CentOS自动挂载U盘/SD Card被识别为只读文件系统

2012-07-26 18:37 513 查看
今天往U盘/SD Card 写文件时发现无法写入,仔细看了下,U盘是只读权限,用了N种方法试着解决:

1. chmod u+x /media/usbdisk

提示“只读文件系统 ”无法更改。

2. sudo mount -o rw -o remount -o user -t vfat /dev/sdb1 /media/usbdisk

还是出现只读文件系统的提示。

3. 格式化,也是提示“只读文件系统”。。

最后,解决方法:

https://bugs.launchpad.net/ubuntu/+bug/228608
上,Chris Coulson
给的解释:

This card has filesystem errors without a doubt. They might be minor
and it might work in other devices, but the kernel has mounted it
read-only to prevent the filesystem from being damaged further. Please
run 'sudo dosfsck -v -a /dev/mmcblk0p1' after unmounting the device (do
not do this whilst it is mounted).

中文翻译:产生这个问题的原因是SD卡的文件系统损坏,操作系统为了防止进一步毁坏文件系统,而将其设置成了只读。修复方法是:卸载设备后在终端下输入sudo dosfsck -v -a /dev/mmcblk0p1 即可。

检查文件系统的方法如下:

在没挂载SD卡的时候在shell中输入:tail -f /var/log/syslog,查看动态日志文件。

然后插入SD卡,可以看到日志文件的变化,
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: