Question about ubiformat

Brian Norris computersforpeace at gmail.com
Thu Aug 7 23:19:36 PDT 2014


Hi Daniel,

On Thu, Aug 07, 2014 at 06:06:27PM -0600, Daniel Bowen wrote:
> Let's say that I've prepared an image using mkfs.ubifs and ubinize.  Is
> there any advantage, disadvantage or difference to doing ubiformat twice -
> once without specifying an image file, then running it a second time with an
> image file?  In other words, is there a difference between these two
> sequences:
> 
> ubiformat /dev/mtd4
> ubiformat /dev/mtd4 -f /mnt/source/ubi.img
> 
> and
> 
> ubiformat /dev/mtd4 -f /mnt/source/ubi.img

ubiformat always saves erase counters, so running it twice should not be
extra-destructive. The primary effect is that you will put the whole
device through an extra erase cycle unnecessarily (slightly reducing the
flash's lifetime), because ubiformat.c's format() function loops through
all eraseblocks and erases them.

But I think either sequence should have the same functional result.

Brian



More information about the linux-mtd mailing list