Reputation: 73
I am very new to Linux. I was reading this article on using the dd command to burn ISOs to USB drives. I didn't understand this section on fdatasync. https://www.howtogeek.com/414574/how-to-burn-an-iso-file-to-a-usb-drive-in-linux/
conv=fdatasync: The conv parameter dictates how dd converts the input file as it is written to the output device. dd uses kernel disk caching when it writes to the USB drive. The fdatasync modifier ensure the write buffers are flushed correctly and completely before the creation process is flagged as having finished.
I don't understand what they mean by write buffers and flushing. Not only that, but I think that they mean that instead of caching the information for writing, they immediately transfer the buffer to the USB drive. But I could be wrong.
Upvotes: 7
Views: 9422
Reputation: 1
Normally dd closes itself without any warning when it said that the copy is done. If you have a USB with light you can see it still writes data even after dd is closed (or check for I/O if you haven't).
conv=fdatasync
forces dd to verify if everything is written before closing itself: it's way more secure than leaving it without, expecially when you write a bootable ISO file in a USB key.
Upvotes: 0
Reputation: 197
Keep in mind that some operations are stored in RAM and postponed to be later written on the disk, so with this flag you tell the dd to write everything on the disk. So you have a complete ISO
Upvotes: 6