ubifs: can't mount ubifs as rootfs

Nancy nancydreaming at gmail.com
Wed Feb 20 10:00:00 EST 2008


Dear all,
        As you can see at last, ubifs can't mount ubifs as rootfs,
why? How can I make it right?
        same kernel image, just different kernel command line.

PAVO # boot
TFTP from server 192.168.1.20; our IP address is 192.168.1.187
Filename 'yrtan/uImage.26'.
Load address: 0x80600000
Loading: *#T T
 ################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###############################################################
done
Bytes transferred = 1984678 (1e48a6 hex)
Unknown command 'dhcpboot' - try 'help'
## Booting image at 80600000 ...
   Image Name:   Linux-2.6.22
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1984614 Bytes =  1.9 MB
   Load Address: 80100000
   Entry Point:  80529000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.22 (yrtan at st.linux) (gcc version 4.1.2) #3 PREEMPT
 Wed Feb 20 19:24:25 CST 2008
CPU revision is: 0ad0024f
System clocks setup: cclk=336MHZ hclk=112MHZ pclk=112MHZ mclk=112MHZ
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 16256
Kernel command line: mem=64m console=ttyS0,57600 ip=off
 ethaddr=00:a0:dd:ec:ff ubi.mtd=3 root=ubi0:ubifs rw rootfstype=ubifs
Primary instruction cache 16kB, physically tagged, 4-way, linesize 32
 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 59324k/65536k available (3473k kernel code, 6156k reserved,
 783k data, 168k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Generic PHY: Registered new driver
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
Total 4MB memory at 0x3c00000 was reserved for IPU
PM initialize
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
UBIFS error (pid 1): compr_init: cannot initialize compressor LZO
yaffs Feb 20 2008 12:05:35 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
LCDC: PixClock:9081081 LcdClock:25846153
Console: switching to colour frame buffer device 60x34
fb0: jz-lcd frame buffer device, using 512K of video memory
JzSOC onchip RTC installed !!!
JzSOC Watchdog Timer: timer margin 60 sec
JzSOC: char device family.
JzSOC Camera Interface Module (CIM) driver registered
Ingenic CMOS camera sensor driver registered
Jz generic touch screen driver registered
JZ4740 SAR-ADC driver registered
UDC starting monitor thread
JZ UDC hotplug driver installed
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 4 ports, IRQ sharing
 disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 9) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
Jz CS8900A driver for Linux (V0.02)
eth%d: CS8900A rev E detected
block2mtd: version $Revision: 1.30 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB
 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 522 at 0x082bf800
Creating 6 MTD partitions on "NAND 1GiB 3,3V 8-bit":
0x00000000-0x00400000 : "NAND BOOT partition"
0x00400000-0x00800000 : "NAND KERNEL partition"
0x00800000-0x08000000 : "NAND ROOTFS partition"
0x08000000-0x10000000 : "NAND DATA1 partition"
0x10000000-0x20000000 : "NAND DATA2 partition"
0x20000000-0x40000000 : "NAND VFAT partition"
UBI: attached mtd3 to ubi0
UBI: MTD device name:            "NAND DATA1 partition"
UBI: MTD device size:            128 MiB
UBI: physical eraseblock size:   262144 bytes (256 KiB)
UBI: logical eraseblock size:    258048 bytes
UBI: number of good PEBs:        511
UBI: number of bad PEBs:         1
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             298
UBI: total number of reserved PEBs: 213
UBI: number of PEBs reserved for bad PEB handling: 5
UBI: max/mean erase counter: 2/1
UBI: background thread "ubi_bgt0d" started, PID 699
jz-ohci jz-ohci.0: JZ OHCI
jz-ohci jz-ohci.0: new USB bus registered, assigned bus number 1
jz-ohci jz-ohci.0: irq 3, io mem 0x13030000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
JZ SD/MMC card driver registered
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
JzSOC On-Chip I2S controller registered (DAC: DMA(play):2/IRQ34,
 ADC: DMA(record):3/IRQ35)
JZ I2S OSS audio driver initialized
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "ubi0:ubifs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available
 partitions:
1f00       3584 mtdblock0 (driver?)
1f01       3584 mtdblock1 (driver?)
1f02     120320 mtdblock2 (driver?)
1f03     128512 mtdblock3 (driver?)
1f04     257024 mtdblock4 (driver?)
1f05     519168 mtdblock5 (driver?)
1f06      51408 mtdblock6 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on
 unknown-block(2,0)





U-Boot 1.1.6 (Oct  9 2007 - 09:41:44)

Board: Ingenic PAVO (CPU Speed 336 MHz)
DRAM:  64 MB
Flash:  0 kB
NAND:1024 MiB
In:    serial
Out:   lcd
Err:   lcd
Hit any key to stop autoboot:  3  2  1  0
TFTP from server 192.168.1.20; our IP address is 192.168.1.187
Filename 'yrtan/uImage.26'.
Load address: 0x80600000
Loading:
 *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###############################################################
done
Bytes transferred = 1984678 (1e48a6 hex)
Unknown command 'dhcpboot' - try 'help'
## Booting image at 80600000 ...
   Image Name:   Linux-2.6.22
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1984614 Bytes =  1.9 MB
   Load Address: 80100000
   Entry Point:  80529000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.22 (yrtan at st.linux) (gcc version 4.1.2) #3 PREEMPT
 Wed Feb 20 19:24:25 CST 2008
CPU revision is: 0ad0024f
System clocks setup: cclk=336MHZ hclk=112MHZ pclk=112MHZ mclk=112MHZ
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 16256
Kernel command line: mem=64m console=ttyS0,57600 ip=dhcp
 nfsroot=192.168.1.20:/nfsroot/root26 rw ethaddr=00:a0:dd:ec:ff ubi.mtd=3
Primary instruction cache 16kB, physically tagged, 4-way, linesize 32
 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 59324k/65536k available (3473k kernel code, 6156k reserved,
 783k data, 168k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Generic PHY: Registered new driver
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
Total 4MB memory at 0x3c00000 was reserved for IPU
PM initialize
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
UBIFS error (pid 1): compr_init: cannot initialize compressor LZO
yaffs Feb 20 2008 12:05:35 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
LCDC: PixClock:9081081 LcdClock:25846153
Console: switching to colour frame buffer device 60x34
fb0: jz-lcd frame buffer device, using 512K of video memory
JzSOC onchip RTC installed !!!
JzSOC Watchdog Timer: timer margin 60 sec
JzSOC: char device family.
JzSOC Camera Interface Module (CIM) driver registered
Ingenic CMOS camera sensor driver registered
Jz generic touch screen driver registered
JZ4740 SAR-ADC driver registered
UDC starting monitor thread
JZ UDC hotplug driver installed
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 4 ports, IRQ sharing
 disabled
丧叡嵘樟閬蜒錗羴呇?5%=伭崃仭ド艁鮼濂仴蛠厑刨照?)RAMDISK driver
 initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
Jz CS8900A driver for Linux (V0.02)
eth%d: CS8900A rev E detected
block2mtd: version $Revision: 1.30 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB
 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 522 at 0x082bf800
Creating 6 MTD partitions on "NAND 1GiB 3,3V 8-bit":
0x00000000-0x00400000 : "NAND BOOT partition"
0x00400000-0x00800000 : "NAND KERNEL partition"
0x00800000-0x08000000 : "NAND ROOTFS partition"
0x08000000-0x10000000 : "NAND DATA1 partition"
0x10000000-0x20000000 : "NAND DATA2 partition"
0x20000000-0x40000000 : "NAND VFAT partition"
UBI: attached mtd3 to ubi0
UBI: MTD device name:            "NAND DATA1 partition"
UBI: MTD device size:            128 MiB
UBI: physical eraseblock size:   262144 bytes (256 KiB)
UBI: logical eraseblock size:    258048 bytes
UBI: number of good PEBs:        511
UBI: number of bad PEBs:         1
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             298
UBI: total number of reserved PEBs: 213
UBI: number of PEBs reserved for bad PEB handling: 5
UBI: max/mean erase counter: 2/1
UBI: background thread "ubi_bgt0d" started, PID 699
jz-ohci jz-ohci.0: JZ OHCI
jz-ohci jz-ohci.0: new USB bus registered, assigned bus number 1
jz-ohci jz-ohci.0: irq 3, io mem 0x13030000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
JZ SD/MMC card driver registered
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
JzSOC On-Chip I2S controller registered (DAC: DMA(play):2/IRQ34,
 ADC: DMA(record):3/IRQ35)
JZ I2S OSS audio driver initialized
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.1.135
IP-Config: Complete:
      device=eth0, addr=192.168.1.135, mask=255.255.255.0,
 gw=192.168.1.56,
     host=192.168.1.135, domain=st.jz.com, nis-domain=(none),
     bootserver=0.0.0.0, rootserver=192.168.1.20, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.20
Looking up port of RPC 100005/1 on 192.168.1.20
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 168k freed
Algorithmics/MIPS FPU Emulator v1.5
init started: BusyBox v1.8.2 (2008-01-09 19:22:01 CST)
starting pid 726, tty '': '/etc/init.d/rcS'
Starting udevd ...
starting pid 764, tty '': '/bin/sh'
#cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00040000 "NAND BOOT partition"
mtd1: 00400000 00040000 "NAND KERNEL partition"
mtd2: 07800000 00040000 "NAND ROOTFS partition"
mtd3: 08000000 00040000 "NAND DATA1 partition"
mtd4: 10000000 00040000 "NAND DATA2 partition"
mtd5: 20000000 00040000 "NAND VFAT partition"
mtd6: 03234000 0003f000 "ubifs"
# mount -t ubifs ubi0:ubifs /mnt
crc16: exports duplicate symbol crc16 (owned by kernel)
ubi: exports duplicate symbol ubi_is_mapped (owned by kernel)
UBIFS: mounted UBI device 0, volume 0
UBIFS: minimal I/O unit size:   2048 bytes
UBIFS: logical eraseblock size: 258048 bytes (252 KiB)
UBIFS: file system size:        50061312 bytes (48888 KiB, 47 MiB, 194
 LEBs)
UBIFS: journal size:            2580480 bytes (2520 KiB, 2 MiB, 10
 LEBs)
UBIFS: data journal heads:      1
UBIFS: default compressor:      LZO
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                    29772        48     29724   0% /dev
ubi0:ubifs               47724     39720      8004  83% /mnt
#

----
Best wishes,
Nancy


More information about the linux-mtd mailing list