Error when mounting ubi image

Patrick kpa_info at yahoo.fr
Mon Feb 27 06:18:11 EST 2012


Dear mailing-list,

I am still facing some trouble with UBI and UBIFS. I am working on an 
OMAP4 processor with a 3.0.21 kernel and a Micron MT29F4G08ABBDAH4 1GB 
NAND Flash.

I generate the ubi image of my rootfs using the following command:

   mkfs.ubifs -r my_rootfs -o my_image.ubifs -m 2048 -e 129024 -c 4060
   ubinize -o my_rootfs.ubi -m 2048 -p 128KiB -s 512 ubinize.cfg

And the following ubinize.cfg file:

   [ubifs]
   mode=ubi
   image=my_image.ubifs
   vol_id=0
   vol_type=static
   vol_name=my_rootfs

Then I flash this image and mount it with the following commands:

   ubiformat /dev/mtd4 -f my_rootfs.ubi
   ubiattach -p /dev/mtd4
   mount -t ubifs ubi0_0 /media/test/

I then have the following error:

   mount: block device ubi0_0 is write-protected, mounting read-only

And from the kernel (dmesg):

UBI warning: ubi_eba_read_leb: CRC error: calculated 0x34afeca5, must be 
0x74215933
UBI warning: ubi_open_volume: volume 0 on UBI device 0 is corrupted
UBIFS warning (pid 226): init_constants_early: UBI volume is corrupted - 
read-only mode
UBIFS: static UBI volume - read-only mode
UBIFS error (pid 226): mount_ubifs: cannot mount read-write - read-only 
media
UBIFS warning (pid 226): init_constants_early: UBI volume is corrupted - 
read-only mode
UBIFS: static UBI volume - read-only mode
UBIFS: mounted UBI device 0, volume 0, name "my_rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   42190848 bytes (41202 KiB, 40 MiB, 327 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)

I couldn't find what I am doing wrong. Any help will be really appreciated !

Thanks in advance

Patrick



More information about the linux-mtd mailing list