fengyuganyu 发表于 2012-5-12 17:14:36

请教关于Linux上使用UBIFS做根文件系统的问题

本帖最后由 fengyuganyu 于 2012-5-12 20:02 编辑

硬件:S3C2440核心
ROM:256M Nandflash
RAM:64M
文件系统:ubifs
Kernel:linux-2.6.33.7
编译环境:Ubuntu
遇到问题:我在Ubuntu上制作好ubifs的镜像后,烧写到板上,启动之后出现以下界面提示:
               
             我的cmdline输入参数是:ubi.mtd=3,2048 root=ubi0:rootfs rootfstype=ubifs console=ttySAC0,115200 init=/linuxrc
            主要是在UBI那不无法挂载到我的MTD分区上。

请大神们指教下

fengyuganyu 发表于 2012-5-12 17:15:30

帖张清晰的 logo内容:
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI warning: ubi_scan: 42 PEBs are corrupted
corrupted PEBs are: 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 92 93 94
UBI error: vtbl_check: volume table check failed: record 0, error 9
UBI error: ubi_init: cannot attach mtd3
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
dm9000 Ethernet Driver, V1.31
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
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
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
No soundcards found.
TCP cubic registered
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
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             128 mtdblock0 (driver?)
1f01             384 mtdblock1 (driver?)
1f02            3072 mtdblock2 (driver?)
1f03         61440 mtdblock3 (driver?)
1f04             512 mtdblock4 (driver?)
1f05         60928 mtdblock5 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Backtrace:
[<c00308ec>] (dump_backtrace+0x0/0x114) from [<c0332f98>] (dump_stack+0x18/0x1c)
r7:00008000 r6:c388b000 r5:c0026a08 r4:c04517e4
[<c0332f80>] (dump_stack+0x0/0x1c) from [<c0332fe8>] (panic+0x4c/0x12c)
[<c0332f9c>] (panic+0x0/0x12c) from [<c0009110>] (mount_block_root+0x1e0/0x220)
r3:00000000 r2:20000013 r1:c381bf84 r0:c03bcbb6
[<c0008f30>] (mount_block_root+0x0/0x220) from [<c00092e0>] (prepare_namespace+0x94/0x1c4)
r8:00000000 r7:00000000 r6:00000000 r5:c0026a08 r4:c0026a18
[<c000924c>] (prepare_namespace+0x0/0x1c4) from [<c0008630>] (kernel_init+0xe0/0x114)
r5:00000000 r4:c0450e80
[<c0008550>] (kernel_init+0x0/0x114) from [<c004f998>] (do_exit+0x0/0x5b0)
r4:00000000

fengyuganyu 发表于 2012-5-12 17:15:59

以上是主要出现问题的地方,无法启动Linux文件系统

fengyuganyu 发表于 2012-5-20 10:42:26

结贴,自己已经解决

WXF_mabg 发表于 2012-5-20 10:53:51

怎么解决的 分享一下

fengyuganyu 发表于 2012-5-21 17:56:08

WXF_mabg 发表于 2012-5-20 10:53 static/image/common/back.gif
怎么解决的 分享一下

主要在于,制作镜像的问题,制作的镜像,在设置最大擦除块数时,不要设置太大,设置太大就会出问题

xiaoniu 发表于 2013-9-14 17:49:05

fengyuganyu 发表于 2012-5-21 17:56 static/image/common/back.gif
主要在于,制作镜像的问题,制作的镜像,在设置最大擦除块数时,不要设置太大,设置太大就会出问题 ...

-C最多逻辑可擦除块数目不是nandflash 总的块数目吗?

茶亦爽 发表于 2015-7-17 20:03:51

楼主,能不能说这个问题与uboot有关系吗?

fengyuganyu 发表于 2015-7-19 21:33:05

茶亦爽 发表于 2015-7-17 20:03
楼主,能不能说这个问题与uboot有关系吗?

uboot在烧写文件系统区时,一定要把指定的区完整擦出,否则会导致文件系统破损

茶亦爽 发表于 2015-7-22 20:45:22

fengyuganyu 发表于 2015-7-19 21:33
uboot在烧写文件系统区时,一定要把指定的区完整擦出,否则会导致文件系统破损 ...

我也是出现了跟楼主一样的-19问题,现在还是无法解决,我用的是at91sam9g25

fengyuganyu 发表于 2015-7-23 10:40:52

茶亦爽 发表于 2015-7-22 20:45
我也是出现了跟楼主一样的-19问题,现在还是无法解决,我用的是at91sam9g25

这个和CPU平台关系不大,主要是文件系统在flash上的逻辑错误,你制作UBI文件系统时,你的最大擦除块数要和实际分区的块数接近,不要超过它,否则会失败,我之前的问题
主要就是文件系统的制作出问题,你在好好查下你的文件系统的制作参数对不对

茶亦爽 发表于 2015-7-23 13:04:49

fengyuganyu 发表于 2015-7-23 10:40
这个和CPU平台关系不大,主要是文件系统在flash上的逻辑错误,你制作UBI文件系统时,你的最大擦除块数要 ...

谢谢楼主!
页: [1]
查看完整版本: 请教关于Linux上使用UBIFS做根文件系统的问题