I am attempting to copy an Arch Linux ISO image directly to a USB drive. Previously, I have simply used either cp
or dd
to do this, such as:
sudo cp image.iso /dev/sdb
where /dev/sdb
is the USB device. This has worked fine, but I want something that shows the progress while it is copying. I learned about the pv
utility, which can show progress. However, I get permission denied whenever attempting to run the following:
sudo pv image.iso > /dev/sdb
bash: /dev/sdb: Permission denied
I thought that maybe it wasn't working because of an existing file system on the device, so I did:
sudo dd if=/dev/zero of=/dev/sdb bs=1G
to clear everything off the device, then retried. But I get the same error. What could be causing this? I'm pretty sure that I'm using pv
correctly. I have tested using pv
by copying the ISO to another location and it works:
sudo pv image.iso > test.iso
works fine. I am running these commands on a fully-updated x86-64 Arch Linux system.
NOTE: I am aware that dd
also has progress state with the status=progress
option, but this does not seem to work either.
pv
has a-o
(--output
) modifier that should avoid the need for redirection in this particular case.bs=1M
then instead. Setting it to 1G is extremely excessive and will mess with the progress indication.pv -Y
for that kind of usage.