红联Linux门户
Linux帮助

linux开机启动挂载mmc错误解决

发布时间:2017-06-27 15:15:31来源:blog.csdn.net/qqliyunpeng作者:qqliyunpeng
1.简介:
项目中用am3359从TF卡的reiser文件系统转到ext4文件。转化原因是reiser文件系统的官网都没有了,还有文章提到reiserfs4的代码风格不符合Linux代码风格,因此,linux不再主动将reiserfs的代码融合到linux中,即使reiserfs开发团队说会提供linux内核的补丁,但是,在查找网络上的文章的时候,资料实在是少,也不知道是不是网络的原因,自己所在的北京地区,在没有越狱的情况下是登不上reiserfs官网的。转换到ext4势在必行。
 
2.问题:
在更改linux内核,让其支持ext4,将TF卡格式化成ext4格式,启动arm板,在reboot开机之后提示一些错误:
EXT2-fs (mmcblk0): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (mmcblk0): couldn't mount as ext3 due to feature incompatibilities
EXT2-fs (mmcblk0): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (mmcblk0): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (mmcblk0): no journal found
EXT2-fs (mmcblk0p1): error: couldn't mount because of unsupported optional features (244)
EXT4-fs (mmcblk0p1): couldn't mount as ext3 due to feature incompatibilities
EXT2-fs (mmcblk0p1): error: couldn't mount because of unsupported optional features (244)
EXT4-fs (mmcblk0p1): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (mmcblk0p1): recovery complete
EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
 
3.解决:
经过多方验证,此错误的原因是,linux的根文件系统自动挂载导致的,自动挂载的命令是mount /dev/mmc.....,可以了解到挂载时是没有指定文件系统的类型的,因此,在存在ext2、ext3、ext4的情况下,系统会优先从ext2开始检查,然后是ext3,ext4.其实,之前的ext2-fs(mmcblk0):error: ... 就是这个意思了。因此,我们要把启动时这些的错误信息去掉,只要更改挂载mmc时的命令,指定具体文件系统就可以了:mount -t ext4 /dev/mmc....  ,具体的方法是:
如果你采用的是udev,你在udev文件夹下mount.blacklist 中去掉 /dev/mmcblk ,然后在想使用的时候,自己手动/脚本挂载。
如果你采用的是mdev,你在mdev.conf文件中驱动自动挂载mmc的规则,依然是手动挂载。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/31753.html