How do you create a rEFInd boot manager USB disk?

The following command does not run, it returns a "file not found" message. The instructions do not say where the downloaded file should be placed, nor whether it should be unzipped or not!

Run dd if=refind-flashdrive-0.11.4.img of=/dev/disk2 and in 1 minute you will have the rEFInd Boot Manager on your USB stick


Note: These instructions are for version 0.12.0 of rEFInd. If you download a different version, then make the appropriate substitutions for the version you are using.

The rEFInd Boot Manager: Getting rEFInd webpage has a link for A USB flash drive image file. The default is for the downloaded files to be placed in the folder ~/Downloads/refind-flashdrive-0.12.0. The contents of this folder is given below.

-rw-rw-r--@ 1 davidanderson  staff    35147 Mar 13  2020 COPYING.txt
-rw-rw-r--@ 1 davidanderson  staff     4891 Mar 13  2020 CREDITS.txt
-rw-rw-r--@ 1 davidanderson  staff     2204 Mar 13  2020 LICENSE.txt
-rw-rw-r--@ 1 davidanderson  staff   105344 Mar 13  2020 NEWS.txt
-rw-r--r--@ 1 davidanderson  staff     1719 Mar 13  2020 README-flashdrive.txt
-rw-r--r--@ 1 davidanderson  staff     2183 Mar 13  2020 SHELLS.txt
-rw-rw-r--@ 1 davidanderson  staff  7372800 Mar 13  2020 refind-flashdrive-0.12.0.img

Note: The downloaded file refind-flashdrive-0.12.0.zip is automatically unzipped`.

The instructions are in the file named README-flashdrive.txt. The contents is given below.

The .img file in this archive should be bootable on any EFI-based computer.
It launches the rEFInd boot manager, which in turn should be able to locate
boot loaders on the computer's EFI System Partition (ESP) or on other
partitions.

To use this disk image, you must copy it to a USB flash drive or similar
medium. Under Linux or Mac OS X, you can do this with dd as root, as in:

dd if=refind-flashdrive-{version}.img of=/dev/sdx

You must change {version} to the version number and set the target disk
(specified by "of=") correctly. BE VERY CAREFUL! If you set the output disk
incorrectly, you can seriously damage the data on your hard disk! (If this
happens, and if it's a GPT disk, you may be able to recover most of your
data by using GPT fdisk. See http://www.rodsbooks.com/gdisk/repairing.html
for details.)

Be aware that the disk image file uses GPT, and the GPT data structures are
sized for the disk image, which is very small by today's standards. Thus,
the backup GPT data structures will be placed early on the disk. Most OSes
cope well with this, but you may want to correct the problem if you want to
use the disk for other purposes in the future. You can do this with the "e"
option on the experts' menu of gdisk (http://www.rodsbooks.com/gdisk/). GNU
parted can also correct this problem; it will prompt you when you try to
view the partitions on the disk.

You can also install rEFInd from this disk image; however, it doesn't
contain an EFI/refind directory like the other installation files available
from the rEFInd Sourceforge page. Instead, you must copy the contents of
EFI/BOOT, and the rEFInd binary is called EFI/boot/bootx64.efi or
EFI/boot/bootia32.efi, depending on your architecture.

Steps to Create the Bootable Flash Drive

  1. Insert a flash drive and use the Disk Utility to erase the flash drive. For name, enter MYREFIND. For format, enter MS-DOS (FAT). For scheme, enter Master Boot Record.

  2. Open a Terminal application window and change the current working directory to where the image file resides. Below is the command to use when downloaded to the default location.

    cd ~/Downloads/refind-flashdrive-0.12.0
    
  3. Enter the command given below to get the identifier for the flash drive.

    diskutil info MYREFIND | grep "Part of Whole"
    

    In my case, the identifier was disk2. If you get a different identifier, then make the appropriate substitutions in the following steps.

  4. Enter the command given below to unmount the flash drive.

     diskutil unmountdisk disk2
    
  5. Enter the command given below to copy the image to the flash drive.

    sudo dd if=refind-flashdrive-0.12.0.img of=/dev/disk2
    
  6. (Optional) As explained in the README-flashdrive.txt file, the secondary (backup) GUID partition header and table are not stored at the end of the flash drive. If you have the gdisk command installed, then you can enter the command below to repair this problem. The GPT fdisk project home page can be found here.

    sudo gdisk /dev/disk2
    

    The gdisk command is interactive. Below are the correct commands to enter when prompted.

    x
    e
    w
    y