当前位置:网站首页>UBI error: ubi_ read_ volume_ table: the layout volume was not found

UBI error: ubi_ read_ volume_ table: the layout volume was not found

2022-06-21 14:23:00 JDSH0224

1.ubi command

ubifs Common command 
flash_erase /dev/mtdx 0 0   erase 

ubiformat /dev/mtdx     Format disk 

ubiattach /dev/ubi_ctrl -m x   Add partition 

ubimkvol /dev/ubi0 -Nrootfs -m

ubimkvol /dev/ubi0 -Nrootfs -s xxxxKiB

ubimkvol /dev/ubi0 -Ndatafs -s xxxxKiB

mount -t ubifs ubi0:rootfs /xxxxx

mount -t ubifs ubi0:datafs /xxxx

 2. Problems and Solutions

[[email protected] /]#ubiattach /dev/ubi_ctrl -m 8
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_attach_mtd_dev: failed to attach mtd8, error -22
ubiattach: error!: cannot attach mtd8
           error 22 (Invalid argument)

It's wrong because /dev/mtd8 Partition is not formatted , Therefore, the following operations are required

[[email protected] /]#ubiformat /dev/mtd8
ubiformat: mtd8 (nand), size 822083584 bytes (784.0 MiB), 6272 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 6271 -- 100 % complete  
ubiformat: 4523 eraseblocks have valid erase counter, mean value is 1
ubiformat: 1731 eraseblocks are supposedly empty
ubiformat: 18 bad eraseblocks found, numbers: 274, 275, 328, 329, 810, 811, 1360, 1361, 1490, 1491, 2074, 2075, 2114, 2115, 6268, 6269, 6270, 6271
ubiformat: warning!: only 4523 of 6254 eraseblocks have valid erase counter
ubiformat: mean erase counter 1 will be used for the rest of eraseblock
ubiformat: continue? (y/N) y
ubiformat: use erase counter 1 for all eraseblocks
ubiformat: formatting eraseblock 6271 -- 100 % complete  

Or right /dev/mtd8 Erase the partition

[[email protected] /]#flash_eraseall /dev/mtd8
Erasing 128 Kibyte @ 2220000 -  4% complete.
Skipping bad block at 0x02240000

Skipping bad block at 0x02260000
Erasing 128 Kibyte @ 28e0000 -  5% complete.
Skipping bad block at 0x02900000

Skipping bad block at 0x02920000
Erasing 128 Kibyte @ 6520000 - 12% complete.
Skipping bad block at 0x06540000

Skipping bad block at 0x06560000
Erasing 128 Kibyte @ a9e0000 - 21% complete.
Skipping bad block at 0x0aa00000

Skipping bad block at 0x0aa20000
Erasing 128 Kibyte @ ba20000 - 23% complete.
Skipping bad block at 0x0ba40000

Skipping bad block at 0x0ba60000
Erasing 128 Kibyte @ 10320000 - 33% complete.
Skipping bad block at 0x10340000

Skipping bad block at 0x10360000
Erasing 128 Kibyte @ 10820000 - 33% complete.
Skipping bad block at 0x10840000

Skipping bad block at 0x10860000
Erasing 128 Kibyte @ 30f60000 - 99% complete.
Skipping bad block at 0x30f80000

Skipping bad block at 0x30fa0000

Skipping bad block at 0x30fc0000

Skipping bad block at 0x30fe0000
Erasing 128 Kibyte @ 31000000 - 100% complete.

         in the light of ubiattach and flash_eraseall The command operation /dev/mtd8 Capacity of 784M, The former takes time 59 second 、 The latter takes time 25 second , Choose from the production benefit flash_eraseall command .

Add partition again , Successful implementation

[[email protected] /]#ubiattach /dev/ubi_ctrl -m 8
UBI device number 0, total 6254 LEBs (794107904 bytes, 757.3 MiB), available 6106 LEBs (775315456 bytes, 739.4 MiB), LEB size 126976 bytes (124.0 KiB)
[

Create a volume

[[email protected] /]#ubimkvol -m /dev/ubi0 -N my-ubifs
Set volume size to 775315456
Volume ID 0, size 6106 LEBs (775315456 bytes, 739.4 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "my-ubifs", alignment 1

mount

[[email protected] /]#mkdir /mnt/ubifs
[[email protected] /]#mount -t ubifs -o sync,noatime ubi0_0 /mnt/ubifs
[[email protected] /]#mount
rootfs on / type rootfs (rw)
/dev/root on / type cramfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=29636k,nr_inodes=7409,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /mnt type ramfs (rw,relatime)
ramfs on /etc type ramfs (rw,relatime)
ramfs on /clou type ramfs (rw,relatime)
ramfs on /home type ramfs (rw,relatime)
ramfs on /var/empty type ramfs (rw,relatime)
/dev/mtdblock5 on /mnt/app type yaffs2 (rw,relatime)
/dev/mtdblock6 on /mnt/ext type yaffs2 (rw,relatime)
ubi0_0 on /mnt/ubifs type ubifs (rw,sync,noatime)

  Mount successfully :ubi0_0 on /mnt/ubifs type ubifs (rw,sync,noatime)

原网站

版权声明
本文为[JDSH0224]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221426019978.html