I am using this command $ dd if=/dev/sdX bs=1M count=$(stat -c %s /path/to/iso) iflag=count_bytes | sha256sum
as specified by the qubes guide to reverify the usb drive but it returns a hash that does not match the sha of the iso. I have tried it 3 times so it cant be a compromised usb.
Make sure that you’ve set the correct device /dev/sdX
to e.g. /dev/sdb
and ISO path /path/to/iso
to e.g. /home/user/Downloads/Qubes-R4.2.0-x86_64.iso
For anyone wondering, OP is referring to this documentation:
For the record it was actually not a problem with dev and misconfigured paths, it was that i used rufus to write qubes and then dd to check it. Did not know that it would not return a correct hash. Make sure you use dd to write and check.
[I realize this thread is 15 months old, but maybe someone will know…]
Having used Rufus to write the image, and then been unable to verify the hash, did you eventually manage to find a dd for Windows that was able to write? If so, which one? Or did you give up and use a Linux to write it? (In which case: Which Linux live images have folks been using for this? I have SystemRescue but when booting on my system it throws so many error messages that I’m not confident enough in it to build plans on it.)
I tried at least two Windows dd’s (incl. “dd for Windows” from Chrysocome and Git bash’s dd) to check the hash of the image written by Rufus (in dd mode as shown in the docs) to my USB stick. Both returned the same wrong hash.
I’ve read about Windows adding a folder – but the image read back by dd is about 6MB smaller than the iso file.
Then I tried both of those dd’s to write the image to the USB stick. Each was unable to write anything. (This was from a dev console run as admin.) At this point, I’d spent too long on this and my brain was fried & I broke for the day. I wanted to ask what worked before I waste more time. Thanks!