public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: "iw3gtf@tiscali.it" <iw3gtf@tiscali.it>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Cannot write to ubi volume
Date: Thu, 05 Jun 2008 08:08:04 +0300	[thread overview]
Message-ID: <1212642484.14566.52.camel@sauron> (raw)
In-Reply-To: <25645542.1212594582569.JavaMail.root@ps23>

Hi,

On Wed, 2008-06-04 at 17:49 +0200, iw3gtf@tiscali.it wrote:
> according to the ubi documentation it should be possible to 'write' in 
> a, say, /dev/ubi1_0 (dynamic) volume device.

Could you please point where exactly you have read this - these docs.
should be fixed.

Direct writes like you tried are prohibited and you have to use volume
update operation, or ubiupdatevol utility instead of dd:

ubiupdatevol /dev/ubi1_0 /usr/local/tftp_root/k

> Am I completely wrong trying to write with a 'dd' ?
Yes.

> How should I proceed to write something into the volume ?

ubiupdatevol

> Is it possible to write something 'directly' in an ubi volume without 
> explicitly formatting an image file (with 'ubinize' for example) ?

ubinize is needed if you want to pre-create a _raw_ flash image and
write it to _raw_ flash (e.g., /dev/mtd0). If you already have UBI
running and want to put arbitrary contents from file 'x' to the volume,
then you use 'ubiupdatevol <UBI volume device> x'. Or you may use thr
corresponding ioctl from your programs.

Direct writes with dd and the like are prohibited by design, mostly to
protect UBI from dumb users (and dumb users from themselves). Indeed,
direct writes are tricky and the user has to be very careful. However,
if you show the reasons why you have to have direct writes and cannot
live with volume update, we may allow them.

> Excuse me if my questions are a bit silly or naive and thank you for 
> your explanations.

No problem.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

      reply	other threads:[~2008-06-05  5:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04 15:49 Cannot write to ubi volume iw3gtf
2008-06-05  5:08 ` Artem Bityutskiy [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=1212642484.14566.52.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=iw3gtf@tiscali.it \
    --cc=linux-mtd@lists.infradead.org \
    /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