The handbook's "Writing an Image File to USB" provides this command:
I thought
NomadBSD nudged me in that direction by giving
But after more investigation I found that :
"conv=sync" means the same on both FreeBSD and Linux;
the example at the end of the man page says "padding the end with zeros to a 1MiB boundary".
Now I'm wondering if it would be helpul to add "status=progress oflag=fsync" to the documentation as follows:
and explain that :
but it seems more convenient to have "status=progress oflag=fsync" in the dd command instead.
But I wonder why they didn't use simply "conv=fsync,osync",
as it seems that would do the same job, according to the dd man page
(which isn't really clear enough, I'm still puzzled by it).
This is a condensed extract:
Without fsync,
and you won't know when writing to the UFD has finished if it doesn't have a LED (some don't).
Didn't see an easy way to suggest documentation changes,
so posting here, where grahamperrin@ might see it.
# dd if=FreeBSD-13.1-RELEASE-amd64-memstick.img of=/dev/da0 bs=1M conv=sync
I thought
conv=sync
was a typo, or BSD-specific, so on Linux I used conv=fsync
instead.NomadBSD nudged me in that direction by giving
conv=fsync
in its command for use on Linux.But after more investigation I found that :
"conv=sync" means the same on both FreeBSD and Linux;
the example at the end of the man page says "padding the end with zeros to a 1MiB boundary".
Now I'm wondering if it would be helpul to add "status=progress oflag=fsync" to the documentation as follows:
# dd if=FreeBSD-13.1-RELEASE-amd64-memstick.img of=/dev/da0 bs=1M status=progress oflag=fsync conv=sync
and explain that :
- "conv=sync" simply pads the final block with NUL bytes;
- "oflag=fsync" ensures that
dd
does not return you to the prompt until it has finished writing to the physical UFD.
but it seems more convenient to have "status=progress oflag=fsync" in the dd command instead.
But I wonder why they didn't use simply "conv=fsync,osync",
as it seems that would do the same job, according to the dd man page
(which isn't really clear enough, I'm still puzzled by it).
This is a condensed extract:
Code:
conv=...
fsync Perform an fsync(2) on the output file before closing it.
sync Pad every input block with NUL to the input buffer size.
osync Pad the final output block to the full output block size.
Without fsync,
dd
will return when it has finished writing only to the buffer in RAM,and you won't know when writing to the UFD has finished if it doesn't have a LED (some don't).
Didn't see an easy way to suggest documentation changes,
so posting here, where grahamperrin@ might see it.