Can't dd the Fedora 34 ISO to USB stick

I am trying to dd the Fedora 34 Workstation ISO to an USB stick using Ubuntu 20.10

$ sudo dd if=Fedora-Workstation-Live-x86_64-34-1.2.iso of=/dev/sdb bs=1MB status=progress
2007000000 bytes (2.0 GB, 1.9 GiB) copied, 21 s, 94.6 MB/s

After apparently all the data is copied over, the dd command gets stuck and never finishes, while the USB stick continues to flashes.

I now there is Fedora Media Writer, but I am curious about why this dd method doesn’t work

2 Likes

Hi @thebudget72 , welcome to the forum.

Did you wait a bit after dd finished? dd finishing does not mean that the data had completed being physically copied over. You can use the fsync or fdatasync etc. flags to make sure dd only “finishes” when the data was completely physically copied over.

More information here:

4 Likes

I agree, but I also note that I have discovered that the sync is always required when dd’ing a USB stick on Fedora Linux, but on my Arch Linux system, dd does not return control to the CLI until writing has completed and synced. I wonder why dd acts differently on two distros?

1 Like

Hrm, not a clue I’m afraid. Perhaps one can configure this while building coreutils, and the builds for Fedora and arch are different? (Could be a number of other things too though).

The problem is that dd never finishes. It tells me in the progress bar that all data is being copied, but it does not exit but continues to run.

I was able to write the USB disk with Fedora Media Writer, and it took much more time than what it takes dd progress bar to go full.

I guess that the dd progress bar is “lying” and that, despite it being full, it is still copying data over.

1 Like

Yes, as noted above, unless you use the fsync etc. options, it is not reporting the progress of the physical write on to the USB stick. Fedora Media Writer perhaps reports progress of the physical write but we’ll have to check its sources to confirm.

So, either you use the additional flags, or just wait for the stick lights to stop showing progress. I suspect if you try to unmount it, you will get a warning that it is still being written to.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.