Required Items
- pv. Don't use dd. While it will often work, dd is a 50+ year old command, uses archaic syntax and provides little to no feedback on what it is doing.
- An ISO image (usually .iso, but the process will also work for .raw.xz, and some other archived images).
Steps
- Insert a removable USB drive, and ensure that there is at least one partition large enough for the ISO image.
- Use lsblk to check the drive name & partitions (very often a removable drive will be something like /dev/sda or /dev/sdb).
lsblk -f
NAME FSTYPE FSVER LABEL UUID
sda
└─sda1
- If the drive has no partition, cfdisk is a user-friendly TUI tool that can create drive partitions.
sudo cfdisk /dev/sda
- Write the ISO image to a partition on the drive:
sudo pv arch.iso -o /dev/sda1
Optional Improvements
- --sync or -Y will use fdatasync to synchronize the buffer cache after every write operation. This will sometimes improve the accuracy of pv's progress bar when writing data to a slow disk (like a USB stick).
sudo pv arch.iso --sync -o /dev/sda1
sudo pv arch.iso -Y -o /dev/sda1
- --stats or -v will show the transfer rate in bytes per second.
sudo pv arch.ios --sync --stats -o /dev/sda1