设为首页收藏本站
查看: 42514|回复: 9

mount文件系统时提示:unknown filesystem type 'ubifs' 错误

[复制链接]

231

主题

64

回帖

2145

积分

管理员

积分
2145
玉米糊 发表于 2014-6-17 14:38:05 | 显示全部楼层 |阅读模式
这是因为Ubuntu系统中缺少UBIFS驱动,执行以下命令安装:
[mw_shl_code=bash,true]
$ sudo apt-get install mtd-utils
[/mw_shl_code]
再同步系统:
[mw_shl_code=bash,true]
$ sync
[/mw_shl_code]
如果还不行,重启系统就可以了。
回复

使用道具 举报

0

主题

10

回帖

45

积分

新手上路

积分
45
lifeforu 发表于 2014-9-25 17:59:56 | 显示全部楼层
root@ubuntu:~# apt-get install mtd-utils
Reading package lists... Done
Building dependency tree      
Reading state information... Done
mtd-utils is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-38 linux-headers-2.6.32-38-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu:~# sync
root@ubuntu:~# mount -t ubifs ubi0_0 fsmount/
mount: unknown filesystem type 'ubifs'
root@ubuntu:~#
回复 支持 反对

使用道具 举报

231

主题

64

回帖

2145

积分

管理员

积分
2145
 楼主| 玉米糊 发表于 2014-9-26 14:06:42 | 显示全部楼层
lifeforu 发表于 2014-9-25 17:59
root@ubuntu:~# apt-get install mtd-utils
Reading package lists... Done
Building dependency tree    ...

再执行以下sudo apt-get update呢?
回复 支持 反对

使用道具 举报

5

主题

13

回帖

1028

积分

版主

积分
1028
jakebo 发表于 2014-9-26 14:58:15 | 显示全部楼层
lifeforu 发表于 2014-9-25 17:59
root@ubuntu:~# apt-get install mtd-utils
Reading package lists... Done
Building dependency tree    ...

方不方便发一下你的步骤呢,
或者用 lsmod | grep ubi 命令来看一下相关的 UBI 驱动模块有没有加载
回复 支持 反对

使用道具 举报

0

主题

10

回帖

45

积分

新手上路

积分
45
lifeforu 发表于 2014-9-27 07:53:06 | 显示全部楼层
玉米糊 发表于 2014-9-26 14:06
再执行以下sudo apt-get update呢?

执行后效果一样

edwin@ubuntu:~$ sudo apt-get update
[sudo] password for edwin:
Get:1 http://security.ubuntu.com lucid-security Release.gpg [198B]           
Ign http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US      
Ign http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Get:2 http://security.ubuntu.com lucid-security Release [57.3kB]
Hit http://us.archive.ubuntu.com lucid Release.gpg      
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Get:3 http://us.archive.ubuntu.com lucid-updates Release.gpg [198B]
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com lucid Release
Get:4 http://us.archive.ubuntu.com lucid-updates Release [101kB]            
Get:5 http://security.ubuntu.com lucid-security/main Packages [577kB]
Hit http://us.archive.ubuntu.com lucid/main Packages         
Hit http://us.archive.ubuntu.com lucid/restricted Packages
Hit http://us.archive.ubuntu.com lucid/main Sources   
Hit http://us.archive.ubuntu.com lucid/restricted Sources               
Hit http://us.archive.ubuntu.com lucid/universe Packages                 
Hit http://us.archive.ubuntu.com lucid/universe Sources                  
Hit http://us.archive.ubuntu.com lucid/multiverse Packages               
Hit http://us.archive.ubuntu.com lucid/multiverse Sources               
Get:6 http://us.archive.ubuntu.com lucid-updates/main Packages [780kB]  
Get:7 http://us.archive.ubuntu.com lucid-updates/restricted Packages [4,630B]                  
Get:8 http://us.archive.ubuntu.com lucid-updates/main Sources [337kB]                           
Get:9 http://security.ubuntu.com lucid-security/restricted Packages [2,867B]                    
Get:10 http://security.ubuntu.com lucid-security/main Sources [244kB]                           
Get:11 http://us.archive.ubuntu.com lucid-updates/restricted Sources [2,196B]                  
Get:12 http://us.archive.ubuntu.com lucid-updates/universe Packages [297kB]                     
Get:13 http://us.archive.ubuntu.com lucid-updates/universe Sources [110kB]                     
Get:14 http://security.ubuntu.com lucid-security/restricted Sources [1,267B]                    
Get:15 http://us.archive.ubuntu.com lucid-updates/multiverse Packages [11.5kB]                  
Get:16 http://security.ubuntu.com lucid-security/universe Packages [150kB]                     
Get:17 http://us.archive.ubuntu.com lucid-updates/multiverse Sources [5,817B]                  
Get:18 http://security.ubuntu.com lucid-security/universe Sources [46.7kB]                     
Get:19 http://security.ubuntu.com lucid-security/multiverse Packages [5,366B]                  
Get:20 http://security.ubuntu.com lucid-security/multiverse Sources [2,347B]                    
Fetched 2,736kB in 19s (143kB/s)                                                               
Reading package lists... Done
回复 支持 反对

使用道具 举报

0

主题

10

回帖

45

积分

新手上路

积分
45
lifeforu 发表于 2014-9-27 07:56:30 | 显示全部楼层
jakebo 发表于 2014-9-26 14:58
方不方便发一下你的步骤呢,
或者用 lsmod | grep ubi 命令来看一下相关的 UBI 驱动模块有没有加载

就是按用户使用手册1.4上的步骤一步一步来做的,按照http://bbs.myir-tech.com/thread-6190-1-1.html这个步骤也是一样的。
root@ubuntu:~# lsmod |grep ubi
ubi                    75453  0
mtd                    18457  5 ubi,mtdchar,nandsim,nand
加载光盘上的rootfs.ubi也是同样的问题。


root@ubuntu:~# apt-get install mtd-utils
Reading package lists... Done
Building dependency tree      
Reading state information... Done
mtd-utils is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-38 linux-headers-2.6.32-38-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

root@ubuntu:~# modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95
root@ubuntu:~# ls /dev/mtd*
/dev/mtd0  /dev/mtd0ro

root@ubuntu:~# flash_erase /dev/mtd0 0 0
Erase Total 0 Units
done

root@ubuntu:~# flash_eraseall /dev/mtd0
Erasing 128 Kibyte @ 10000000 -- 100 % complete.

root@ubuntu:~# ubiformat /dev/mtd0 -O 2048 -f /share/share/images/rootfs.ubi
ubiformat: mtd0 (nand), size 268435456 bytes (256.0 MiB), 2048 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 2047 -- 100 % complete  
ubiformat: 2048 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 236 -- 100 % complete  
ubiformat: formatting eraseblock 2047 -- 100 % complete  

root@ubuntu:~# modprobe ubi mtd=0,2048
root@ubuntu:~# ls fsmount

root@ubuntu:~# mount -t ubifs ubi0_0 fsmount/
mount: unknown filesystem type 'ubifs'
回复 支持 反对

使用道具 举报

0

主题

10

回帖

45

积分

新手上路

积分
45
lifeforu 发表于 2014-9-27 07:58:43 | 显示全部楼层
jakebo 发表于 2014-9-26 14:58
方不方便发一下你的步骤呢,
或者用 lsmod | grep ubi 命令来看一下相关的 UBI 驱动模块有没有加载

root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID:        Ubuntu
Description:        Ubuntu 10.04.4 LTS
Release:        10.04
Codename:        lucid
root@ubuntu:~# uname
Linux
root@ubuntu:~# uname -r
2.6.32-66-generic
回复 支持 反对

使用道具 举报

231

主题

64

回帖

2145

积分

管理员

积分
2145
 楼主| 玉米糊 发表于 2014-10-8 17:14:17 | 显示全部楼层
lifeforu 发表于 2014-9-27 07:58
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID:        Ubuntu

如果安装了mtd-utils还是不行,有另外解决办法,使用较新的擦除和装载命令,将擦除命令改为:
[mw_shl_code=bash,true]$ sudo flash_erase /dev/mtd0 0 0[/mw_shl_code]
原来是:sudo flash_eraseall /dev/mtd0
装载命令改为:
[mw_shl_code=bash,true]$ sudo ubiformat /dev/mtd0 -O 2048 -f Angstrom-x11-at91samg-image-eglibc-ipk-v20110624-at91sam9x5ek.rootfs.ubi[/mw_shl_code]
原来是:sudo dd if=Angstrom-x11-at91samg-image-eglibc-ipk-v20110624-at91sam9x5ek.rootfs.ubi of=/dev/mtd0
回复 支持 反对

使用道具 举报

0

主题

10

回帖

45

积分

新手上路

积分
45
lifeforu 发表于 2014-10-8 22:17:07 | 显示全部楼层
玉米糊 发表于 2014-10-8 17:14
如果安装了mtd-utils还是不行,有另外解决办法,使用较新的擦除和装载命令,将擦除命令改为:
[mw_shl_c ...

你说的这两步都有试过。。。奇怪。。。

就是按用户使用手册1.4上的步骤一步一步来做的,按照http://bbs.myir-tech.com/thread-6190-1-1.html这个步骤也是一样的。
root@ubuntu:~# lsmod |grep ubi
ubi                    75453  0
mtd                    18457  5 ubi,mtdchar,nandsim,nand
加载光盘上的rootfs.ubi也是同样的问题。


root@ubuntu:~# apt-get install mtd-utils
Reading package lists... Done
Building dependency tree      
Reading state information... Done
mtd-utils is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-38 linux-headers-2.6.32-38-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

root@ubuntu:~# modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95
root@ubuntu:~# ls /dev/mtd*
/dev/mtd0  /dev/mtd0ro

root@ubuntu:~# flash_erase /dev/mtd0 0 0
Erase Total 0 Units
done

root@ubuntu:~# flash_eraseall /dev/mtd0
Erasing 128 Kibyte @ 10000000 -- 100 % complete.

root@ubuntu:~# ubiformat /dev/mtd0 -O 2048 -f /share/share/images/rootfs.ubi
ubiformat: mtd0 (nand), size 268435456 bytes (256.0 MiB), 2048 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 2047 -- 100 % complete  
ubiformat: 2048 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 236 -- 100 % complete  
ubiformat: formatting eraseblock 2047 -- 100 % complete  

root@ubuntu:~# modprobe ubi mtd=0,2048
root@ubuntu:~# ls fsmount

root@ubuntu:~# mount -t ubifs ubi0_0 fsmount/
mount: unknown filesystem type 'ubifs'
回复 支持 反对

使用道具 举报

0

主题

10

回帖

45

积分

新手上路

积分
45
lifeforu 发表于 2014-10-9 07:35:29 | 显示全部楼层
我想可能是编译buildroot出问题了:
ubinize: volume size was not specified in section "ubifs", assume minimum to fit image "/opt/linux/Buildroot-at91/buildroot-at91/output/images/rootfs.ubifs"29839360 bytes (28.5 MiB)
cp support/misc/target-dir-warning.txt /opt/linux/Buildroot-at91/buildroot-at91/output/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2024-3-29 20:21 , Processed in 0.054353 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表