ubifs文件系统挂载失败

andy1658 2013-05-24 02:59:41
最近由于工作需求,想做一个ubifs文件系统,但是挂载失败,请大侠帮忙分析一下,错误信息如下:
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd2 to ubi0
UBI: MTD device name: "nand.rootfs"
UBI: MTD device size: 235 MiB
UBI: number of good PEBs: 1873
UBI: number of bad PEBs: 7
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1851
UBI: total number of reserved PEBs: 22
UBI: number of PEBs reserved for bad PEB handling: 18
UBI: max/mean erase counter: 2/1
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 337
UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 16384 mtdblock0 (driver?)
1f01 5120 mtdblock1 (driver?)
1f02 240640 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[<8002a128>] (unwind_backtrace+0x0/0xe0) from [<8030fb8c>] (panic+0x68/0xdc)
[<8030fb8c>] (panic+0x68/0xdc) from [<80008d58>] (mount_block_root+0x234/0x284)
[<80008d58>] (mount_block_root+0x234/0x284) from [<80008e8c>] (prepare_namespace+0x88/0x174)
[<80008e8c>] (prepare_namespace+0x88/0x174) from [<800089e0>] (kernel_init+0x120/0x160)
[<800089e0>] (kernel_init+0x120/0x160) from [<800268b4>] (kernel_thread_exit+0x0/0x8)

我制作ubifs文件系统步骤如下:
1、在kernel中添加ubifs文件系统相关的选项
2、制作ubifs.img文件并烧写经nand flash,但是就是挂载不上,请大虾帮忙分析,谢谢
...全文
595 点赞 收藏 8
写回复
8 条回复
jie_12dcs 2013年09月14日
我也遇到了类似的问题,请大神们帮忙解决一下啊 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP) 9 cmdlinepart partitions found on MTD device nx_2017 Creating 9 MTD partitions on "nx_2017": 0x000000000000-0x000000100000 : "unused1" 0x000000100000-0x000000200000 : "unused2" 0x000000200000-0x000000800000 : "kernel" 0x000000800000-0x000004800000 : "root" 0x000004800000-0x000011000000 : "appfs" 0x000011000000-0x00002a000000 : "datac" 0x00002a000000-0x00002a100000 : "splash1" 0x00002a100000-0x00002a200000 : "splash2" 0x00002a200000-0x000040000000 : "extra" JEDEC ID = 0x20ba17 , Extended Device ID = 0x1000 nx_sfc nx_sfc: n25q064 (8192 Kbytes) 4 cmdlinepart partitions found on MTD device nx_sfc Creating 4 MTD partitions on "nx_sfc": 0x000000000000-0x000000100000 : "uldr" 0x000000100000-0x000000200000 : "u-boot" 0x000000200000-0x000000300000 : "settings" 0x000000300000-0x000000800000 : "sfcextra" UBI: attaching mtd3 to ubi0 UBI: physical eraseblock size: 262144 bytes (256 KiB) UBI: logical eraseblock size: 253952 bytes UBI: smallest flash I/O unit: 4096 UBI: VID header offset: 4096 (aligned 4096) UBI: data offset: 8192 UBI error: vtbl_check: volume table check failed: record 1, error 9 UBI error: ubi_init: cannot attach mtd3 UBI error: ubi_init: UBI error: cannot initialize UBI, error -22 PPP generic driver version 2.4.2 usbcore: registered new interface driver asix lipp_6300Eth_init_module: Call Clink_SetMocaReset... GMAC:Internal PHY being used with GMAC0 GMAC:Registering Ethernet ISR number 40 GMAC:Ethernet interface eth0 registered ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver usb-ip9028 usb-ip9028.0: IP9028 embedded EHCI USB controller usb-ip9028 usb-ip9028.0: new USB bus registered, assigned bus number 1 usb-ip9028 usb-ip9028.0: irq 93, io base 0xe066c000 usb-ip9028 usb-ip9028.0: USB 2.0 started, EHCI 1.00 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: IP9028 embedded EHCI USB controller usb usb1: Manufacturer: Linux 2.6.34 ehci_hcd usb usb1: SerialNumber: ip9028 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected usb-ip9028 usb-ip9028.1: IP9028 embedded EHCI USB controller usb-ip9028 usb-ip9028.1: new USB bus registered, assigned bus number 2 usb-ip9028 usb-ip9028.1: irq 94, io base 0xe066d000 usb-ip9028 usb-ip9028.1: USB 2.0 started, EHCI 1.00 usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: IP9028 embedded EHCI USB controller usb usb2: Manufacturer: Linux 2.6.34 ehci_hcd usb usb2: SerialNumber: ip9028 hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usbcore: registered new interface driver libusual usbcore: registered new interface driver usbserial usbserial: USB Serial Driver core USB Serial support registered for Moschip 7840/7820 USB Serial Driver mos7840: 1.3.2:Moschip 7840/7820 USB Serial Driver usbcore: registered new interface driver mos7840 USB Serial support registered for pl2303 usbcore: registered new interface driver pl2303 pl2303: Prolific PL2303 USB to serial adaptor driver mice: PS/2 mouse device common for all mice using rtc device, rtc_apollo, for alarms rtc_apollo rtc_apollo: rtc core: registered rtc_apollo as rtc0 i2c /dev entries driver sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman nx_sdiomc nx_sdiomc.0: SD/SDIO/MMC controller IP_3413 Version is 0x99 nx_sdiomc nx_sdiomc.0: SD/SDIO/MMC controller IP_3413 found @ [e096a000] (rev 9) mmc0: Unknown controller version (2). You may experience problems. mmc0: Invalid maximum block size, assuming 512 bytes mmc0: SDHCI controller on IP_3413 [nx_sdiomc.0] using ADMA usbcore: registered new interface driver usbhid usbhid: USB HID core driver logger: created 8K log 'log_main' logger: created 1K log 'log_events' logger: created 1K log 'log_radio' NF_TPROXY: Transparent proxy support initialized, version 4.1.0 NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd. ip_tables: (C) 2000-2006 Netfilter Core Team TCP cubic registered NET: Registered protocol family 17 Bridge firewalling registered ThumbEE CPU extension supported. VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 rtc_apollo rtc_apollo: setting system clock to 1970-01-01 00:00:00 UTC (0) UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19 VFS: Cannot open root device "ubi0:rootfs" or unknown-block(31,2) Please append a correct "root=" boot option; here are the available partitions: 1f00 1024 mtdblock0 (driver?) 1f01 1024 mtdblock1 (driver?) 1f02 6144 mtdblock2 (driver?) 1f03 65536 mtdblock3 (driver?) 1f04 204800 mtdblock4 (driver?) 1f05 409600 mtdblock5 (driver?) 1f06 1024 mtdblock6 (driver?) 1f07 1024 mtdblock7 (driver?) 1f08 358400 mtdblock8 (driver?) 1f09 1024 mtdblock9 (driver?) 1f0a 1024 mtdblock10 (driver?) 1f0b 1024 mtdblock11 (driver?) 1f0c 5120 mtdblock12 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
回复 点赞
jie_12dcs 2013年09月14日
求楼主解答啊
回复 点赞
j-j-c-s-d-n 2013年05月28日
1.在uboot里,setenv nand_root ubi0:rootfs rw ubi.mtd=2,2048 2.制作imgae时,mkfs.ubifs -c 这个参数要仔细计算,些参数影响较大,再就是改一下ubinize.cfg这个文件的相关参数 3.再说一个我遇到的,开发用了gpio结果一个复用io被改了,结果造成nand read only,这个是驱动造成的,改一下内核驱动就可以了。 我就遇到这些,希望能帮到你。
回复 点赞
andy1658 2013年05月28日
问题已经解决了,是我在uboot下烧写rootfs的时候,没有跳过坏块导致,谢谢各位的回答
回复 点赞
andy1658 2013年05月27日
求高人指点啊
回复 点赞
andy1658 2013年05月24日
引用 2 楼 voice_shen 的回复:
1. 制作ubi image的命令行,reference: https://github.com/voiceshen/scripts4linux/tree/master/ubifs 2. 启动系统的命令行参数。
我就是按照这个方式制作的ubi image,但是我不知道ubi0_0这个文件是怎么创建的,启动的时候会导致失败,请高手指点,谢谢
回复 点赞
voice_shen 2013年05月24日
1. 制作ubi image的命令行,reference: https://github.com/voiceshen/scripts4linux/tree/master/ubifs 2. 启动系统的命令行参数。
回复 点赞
andy1658 2013年05月24日
怎么没人回帖呢?
回复 点赞
发动态
发帖子
驱动开发/核心开发
创建于2007-09-28

9168

社区成员

2.1w+

社区内容

硬件/嵌入开发 驱动开发/核心开发
社区公告
暂无公告