On Thu, Sep 5, 2024 at 10:51 PM Max Nikulin <maniku...@gmail.com> wrote:
>
> On 05/09/2024 16:25, Thomas Schmitt wrote:
> > I let xorriso-dd-target use
> >    bs=1M oflag=dsync
>
> May too small bs value cause write multiplication if internal flash
> erasure block size is much larger? I have seen claims that it can be
> e.g. 12M
> <https://superuser.com/questions/673847/if-i-align-a-partition-to-24mib-then-is-it-also-aligned-to-any-divider-of-this-s>
> I have an impression that actual value is not exposed, so it is unknown
> to kernel. My concern is wearing, I have no idea if firmware may perform
> partial overwrites without apparent impact on speed.

I've run into this situation (more than once)... `dd` fails to write a
bootable image with a block size of 1M. But using a block size of 512
results in a bootable image. It used to happen regularly on arm dev
boards, like BeagleBoards and CubieTrucks and Wandboards. I don't
recall it happening lately.

I prefer the larger block size because the image writes faster. But if
the board fails to boot, I drop back to 512 to (re)write the image.

And I always finish the `dd` command with a `&& sync`.

> Are you against "sync" command because it syncs all drives, not the
> specific one (besides smooth progress report)? If USB mass storage
> driver does not allow to turn port power off before write completion
> then it might be a workaround. From my point of view, simple cp
> suggested by the install guide is quite reasonable in comparison to dd.
>
> Another my question is concerning reading of media and -x argument of
> isosize. Is it really necessary? I can not figure out what corner cases
> are not covered by "head -c BYTES /dev/sdc".

Jeff

Reply via email to