title: UBIFS boot error
body: <p>I have a SAM9 based board running embedded linux.</p>
  
  <p>I had a JFFS2 file system and now thinking of moving to UBIFS.</p>
  
  <p>I enabled UBIFS as target file system in make menuconfig of buildroot package which I'm using for my board.</p>
  
  <p>I generated the rootfs.arm.ubifs file which I flashed on my board using nandwrite utility of bootloader the same way which I was using for .jffs2 file.</p>
  
  <p>I also changed the bootargs to :</p>
  
  <p><code>setenv bootargs 'console=ttyS0,115200 rw ubi.mtd=1,2048 rootfstype=ubifs root=ubi0:rootfs'</code></p>
  
  <p>But I'm getting the following error which booting the board :</p>
  
  <pre><code>Creating 2 MTD partitions on "atmel_nand":                                                                                                       
  0x000000000000-0x000000400000 : "Kernel"                                                                                                         
  0x000000400000-0x000010000000 : "Data"                                                                                                           
  UBI: attaching mtd1 to ubi0                                                                                                                      
  UBI: physical eraseblock size:   131072 bytes (128 KiB)                                                                                          
  UBI: logical eraseblock size:    126976 bytes                                                                                                    
  UBI: smallest flash I/O unit:    2048                                                                                                            
  UBI: sub-page size:              512                                                                                                             
  UBI: VID header offset:          2048 (aligned 2048)                                                                                             
  UBI: data offset:                4096                                                                                                            
  UBI warning: ubi_scan: 276 PEBs are corrupted                                                                                                    
  corrupted PEBs are: 0 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 517
  UBI error: ubi_read_volume_table: the layout volume was not found                                                                                
  UBI error: ubi_init: cannot attach mtd1                                                                                                          
  UBI error: ubi_init: UBI error: cannot initialize UBI, error -22        
  </code></pre>