linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "PJ" <paul.j2@rogers.com>
To: "'Richard Weinberger'" <richard.weinberger@gmail.com>
Cc: <linux-mtd@lists.infradead.org>
Subject: RE: Looking for an alternative to ubimirror
Date: Fri, 27 May 2016 19:13:56 -0400	[thread overview]
Message-ID: <04a901d1b86d$725898d0$5709ca70$@rogers.com> (raw)
In-Reply-To: <CAFLxGvwpDYOk_hyo4vo3YH=OP8TKes_PO94FG9UaJkpTx0o_CQ@mail.gmail.com>

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@gmail.com] 
Sent: Friday, May 27, 2016 3:20 AM
To: PJ
Cc: linux-mtd@lists.infradead.org
Subject: Re: Looking for an alternative to ubimirror

On Fri, May 27, 2016 at 2:40 AM, PJ <paul.j2@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

      reply	other threads:[~2016-05-27 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27  0:40 Looking for an alternative to ubimirror PJ
2016-05-27  7:12 ` Richard Weinberger
2016-05-27  7:19 ` Richard Weinberger
2016-05-27 23:13   ` PJ [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='04a901d1b86d$725898d0$5709ca70$@rogers.com' \
    --to=paul.j2@rogers.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).