View Single Post
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#12
Correct way how to erase/flash rootfs partition (on which is ubi) is to use ubiformat utility.

Before using ubiformat utility, first any mounted ubifs volume must be umounted and ubi device deattached from mtd partition.

Code:
$ umount ubi:rootfs
$ ubidetach /dev/ubi_ctrl -d 0
Erasing mtd partition on with is ubi:

Code:
$ ubiformat /dev/<mtd_rootfs>
Erasing & Flashing new ubi image (with volumes) on mtd partition:

Code:
$ ubiformat /dev/<mtd_rootfs> -s 512 -O 512 -f <image.ubi>
After flashing new ubi image to mtd, ubi can be attached to mtd device again:

Code:
$ ubiattach /dev/ubi_ctrl -p /dev/<mtd_rootfs>
And then available ubifs volume in ubi can be mounted
Code:
$ mount ubi:rootfs </mountpoint> -t ubifs
 

The Following 4 Users Say Thank You to pali For This Useful Post: