Looking for an alternative to ubimirror
PJ
paul.j2 at rogers.com
Fri May 27 16:13:56 PDT 2016
Thanks Richard. It works for me.
An example for future reference. Copy /dev/ubi0_0 to /dev/ubi0_1:
The volume size (in bytes) is required when calling ubiupdatevol without an image file. It can be retrieved from ubinfo, something like this:
VOLSIZE=$(ubinfo /dev/ubi0_0 | grep -o '[0-9]\+ bytes' | grep -o '[0-9]\+')
In the ubiupdatevol a single dash ('-') is used in place of an image-file to trigger use of stdin.
dd if=/dev/ubi0_0 | ubiupdatevol /dev/ubi0_1 - -s ${VOLSIZE}
Paul
-----Original Message-----
From: Richard Weinberger [mailto:richard.weinberger at gmail.com]
Sent: Friday, May 27, 2016 3:20 AM
To: PJ
Cc: linux-mtd at lists.infradead.org
Subject: Re: Looking for an alternative to ubimirror
On Fri, May 27, 2016 at 2:40 AM, PJ <paul.j2 at rogers.com> wrote:
> Hi,
>
> Can anyone please recommend a procedure to copy one UBI volume to another?
>
> I'd like to execute from the bash command line, if possible.
>
> One upon a time I was able to use ubimirror, however that command
> appears to have been removed from mtd-utils.
>
> - The source volume will be mounted R/O as it is the rootfs.
> - The destination volume will be unrestricted (unmounted).
> - Both the source and destination volumes are in the same device.
Did you try dd if=/dev/ubiX_Y ... | ubiupdatevol ...?
--
Thanks,
//richard
More information about the linux-mtd
mailing list