Why copy vs dd for writing the ISO to the USB?

On the installation page for ISO from terminal I just noticed it says:

sudo cp Kicksecure-LXQt-18.2.1.9.Intel_AMD64.iso /dev/disk/by-id/usb-My_own_drive

Why cp instead of dd?

Just curious is it faster more secure or just easier and does the same thing?

I have always used dd specifically with bs=16M oflag=direct status=progress

(example):

dd if=/Home/desi_fubu/Downloads/Kicksecure-LXQt-18.2.1.9.Intel_AMD64.iso bs=16M of=/dev/sda oflag=direct status=progress


Does copying ensure that the exact bytes (stat -c %s Kicksecure-LXQt-18.2.1.9.Intel_AMD64.iso) are written so when re-verifying installation media USB you get the same byte size?

It’s easier to type, easier to remember the syntax of, harder to use in a way that results in the same sectors being written multiple times on the target device, and mirrors the instructions Debian provides for flashing their ISOs:

If you’re more comfortable with dd, it’s perfectly fine to use it.

2 Likes

TFW you never used this method despite it being mentioned on debians website.

This is first time I saw this haha ok wow so no issues with re-verifing after i’d assume then?

1 Like

If by “re-verifying” you mean reading back the data from the drive and comparing it with the ISO to make sure the flash went correctly, then yes, there should be no issues with re-verifying. If there are issues, that means you have a bad ISO download, or a broken flash drive, or both.

2 Likes