Using dd on MacOS to make a live USB of Fedora

Using dd on MacOS to make a live USB of Fedora

The Fedora Project has several documented methods for preparing a live USB.

As of Fedora 34, the only official and supported method for creating a Fedora USB stick is the Fedora Media Writer utility. But, for my own reasons, I'll use the command line utility dd.

Read the instructions for the direct write method in the official guide before doing anything in this post. My post is not a replacement for the complete instructions. It's meant to share a method and extend the docs for those who know what they're doing.

Using dd (the direct write method) is documented but all command line methods are explicitly not supported.

And Fedora's instructions (unlike those of Elementary OS) don't segment by the operating system on which you're creating the live USB. So, (assuming) these docs are Linux-specific and as I'm on Apple's MacOS Catalina 10.15.x, I'll probably have errors. This post is to document my errors and fixes.

To replace the generic parts of the command with parameters that will work for your system and your intent, one needs to follow the official docs. Because I don't go into details here.

Alright then, you've been warned. Let's get on with it. The unsupported generic command from the docs is:

# dd if=/path/to/image.iso of=/dev/sdX bs=8M status=progress oflag=direct

Use the official docs to customize with the part to the correct disk. Be careful! The of flag tells dd where to write, and you could overwrite any storage disk on your system if you're not careful.

Running the documented command gives me the first of several errors.

First error: dd: bs: illegal numeric value

Fix: Change the M to m.

Second error: dd: unknown operand status

Fix: The flag status is not recognized, so remove. You just won't see writing progress made by dd when you run the command. But as long as there's no error, and the command prompt hasn't reappeared, the write is happening.

Third error: dd: unknown operand oflag

Fix: Likewise, the flag oflag is also not recognized. This is also removed.

Fourth error: dd: /dev/disk3: Operation not permitted

Fix: Use sudo.

So what parts of the document command remain?

  • of tells dd to write output to file, instead of the standard output. This is what we use to point at the USB disk.
  • bs tells dd to set both input and output block size to 8m bytes. I'll bump that to 16m, to increase the number of bytes that are read and written at one time.
  • I added sync to flush the cash by forcing completion of pending disk writes.

So, this is the command that worked for me on MacOS Catalina 10.15.x:

sudo dd if=/path/to/image.iso of=/dev/sdX bs=16m && sync
Show Comments