qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Carl Karsten <carl@personnelware.com>, Eric Blake <eblake@redhat.com>
Cc: John Snow <jsnow@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] format=raw,readonly errors
Date: Mon, 8 May 2017 18:47:31 +0200	[thread overview]
Message-ID: <a535a8cf-6f04-206f-3f4e-3cf7539f16a5@redhat.com> (raw)
In-Reply-To: <CADmzSSgN6+gK2rhcpiYu7y_gG3UT7oL92Q4zG+GQVoqGbVGKXg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

On 08.05.2017 18:33, Carl Karsten wrote:
> On Mon, May 8, 2017 at 11:29 AM, Eric Blake <eblake@redhat.com> wrote:
> 
>> On 05/08/2017 10:56 AM, Carl Karsten wrote:
>>
>>>>>>> juser@gator:~/temp$ qemu-system-x86_64 -m 256 -display curses
>> -drive
>>>>>>> file=disk.cow -drive file=boot.img
>>>>>>> WARNING: Image format was not specified for 'boot.img' and probing
>>>>>> guessed
>>>>>>> raw.
>>>>>>>          Automatically detecting the format is dangerous for raw
>>>> images,
>>>>>>> write operations on block 0 will be restricted.
>>>>>>>          Specify the 'raw' format explicitly to remove the
>>>> restrictions.
>>
>>>  "write operations on block 0 will be restricted."
>>>
>>> Is there a way to explicitly enable that?
>>
>> Yes. Pass format=raw at the right place (in other words, instead of
>> getting the 'raw' format driver by default, explicitly mentioning that
>> you KNOW you want the 'raw' format driver is enough to shut up the
>> warning).
>>
> 
> according to the warning: "Specify the 'raw' format explicitly to remove
> the restrictions."
> 
> I want the restriction.
> 
> format=raw, (write operations on block 0)=restricted

Well, the restriction won't prevent all writes to the first sector,
though; it will only prevent writes which would make the image look like
it was in some non-raw format. So this is probably not what you want anyway.

Unfortunately, I don't know any current way to "soft" write-protect an
image. It sounds like an interesting idea, though, and should be simple
enough to implement e.g. in the raw driver.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

  parent reply	other threads:[~2017-05-08 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08  4:28 [Qemu-devel] format=raw,readonly errors Carl Karsten
2017-05-08  8:51 ` Markus Armbruster
2017-05-08 14:15   ` Carl Karsten
2017-05-08 15:32     ` John Snow
2017-05-08 15:56       ` Carl Karsten
2017-05-08 16:29         ` Eric Blake
2017-05-08 16:33           ` Carl Karsten
2017-05-08 16:39             ` Eric Blake
2017-05-08 16:43               ` Eric Blake
2017-05-08 16:47             ` Max Reitz [this message]
2017-05-08 16:00       ` Daniel P. Berrange

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=a535a8cf-6f04-206f-3f4e-3cf7539f16a5@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=carl@personnelware.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).