qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] How do you -sd squashfs.img without truncating?


From: Rob Landley
Subject: Re: [Qemu-devel] How do you -sd squashfs.img without truncating?
Date: Tue, 30 May 2017 14:25:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 05/30/2017 07:17 AM, Peter Maydell wrote:
> On 8 May 2017 at 06:08, Rob Landley <address@hidden> wrote:
>> As far as I can tell "qemu-system-arm -M vexpress-a9" only implements sd
>> card, not any conventional hard drive, and it uses an sdcard block size
>> of 262144 bytes rounded down. This means when I create a squashfs image
>> and feed it in through the sd card, it truncates it.
>>
>> Wouldn't -sd rounding _up_ be more useful?
> 
> This vaguely rings a bell but I forget exactly. I think the
> intention is that you're supposed to pass it a file of
> exactly the right length, not one that's too short. If we
> rounded up, then it would create the awkward question of
> "what happens when the guest writes into the bit of the
> sd card image that doesn't actually exist in the image file".
> 
> I'm not strongly attached to the current behaviour (especially
> if the behaviour for sd card images doesn't match that for
> hd images and other kinds of disk), but I think that may have
> been the "this is more complicated than it appears on the surface"
> reason that nobody's got round to trying to change the behaviour.
> It's been years though, so I might just be completely misremembering.

I worked around it by switching to the -M virt machine. (The project is
https://github.com/landley/mkroot if you're curious.)

Thanks,

Rob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]