Rpi-imager: “Verifying write failed. Contents of SD card is different then what was written to it.”

Created on 17 Mar 2020  ·  21Comments  ·  Source: raspberrypi/rpi-imager

I'm still able to boot if I cancel the verify process

Most helpful comment

I want to reopen this issue.
Because getting this same error and then didn't find flashed SD card. But Etcher's attempt was a success.
My environment:

  • OS: macOS Big Sur
  • SD: SanDisk/Ultra/64GB
  • Imager: v1.6.1
  • Etcher: v1.5.101

All 21 comments

If it's a custom image. Make sure you are running v1.2 from the "releases" page.

I am running v1.2 and it's not a custom image

Tried a different card?

(That it is boots is not proof that the card is 100% good. It will read back the entire card and if any byte is different, it will give a different hash and will give this error. Can also mean something else is odd on your system, e.g. broken memory).

Repeated the issue with another SD. My system is Ubuntu 19.1

Regarding internet, I do have internet if connecting to 4G mobile phone hotspot. However, I can't connect to public wifi. I have another RPi 4 that was not flashed with rpi-imager (which has the same wpa_supplicant.conf file) connected to the public 5G network, I don't know if this is related with install or not.

If you want to you could use https://fight-flash-fraud.readthedocs.io/en/latest/ to check that your SD card(s) is/are fully-working at a low-level?
I guess it wouldn't hurt to test with a different SD-reader too, if you have one? :man_shrugging:

I'm getting this same issue using v1.2. :(

Which image are you trying to write? Have you tried using dd? Does that give a different result with the same card?

Verifying the written data with dd is bit tricky (since it has no built-in verification), but there's some steps here explaining how to do so.

Verifying the written data with dd is bit tricky (since it has no built-in verification), but there's some
steps here explaining how to do so.

Do be aware that you need to skip the first MB when verifying an image written by Imager with dd. (Imager does not write the first MB of image, if it errors out).

E.g. to verify a 1500 MB image:

sudo dd if=/dev/sdX bs=1M skip=1 count=1499 | sha256sum

Should give same hash as:

dd if=uncompressedimage bs=1M skip=1 count=1499 | sha256sum

My SD card was buggered. I ordered a new one and the new one works fine.

I'm getting this same issue.
then I tried 'Balena Etcher' attempt that was success. ('Balena Etcher', the old one.)
So There is no problem with SD card.

@seongjunChoi0714 Would you mind providing more details?
Are you definitely using RPi Imager v1.2? What OS are you running on? What image are you trying to flash? What make/model/size of SD card are you trying to write to? Just for the sake of comparison, what version of Balena Etcher are you using?

@lurch
OS : Window10
SD : SanDisk/Ultra/16GB
Imager v1.2
Etcher v1.5.?

Thanks :+1: And what image are you trying to flash?

@lurch [Ubuntu Preinstalled Server 18.04 image] for ROS2

I'm afraid I've got no idea what "[Ubuntu Preinstalled Server 18.04 image] for ROS2" means. Do you have a link to a download page?

I want to reopen this issue.
Because getting this same error and then didn't find flashed SD card. But Etcher's attempt was a success.
My environment:

  • OS: macOS Big Sur
  • SD: SanDisk/Ultra/64GB
  • Imager: v1.6.1
  • Etcher: v1.5.101

this happends to me every time

Same thing here. Trying to install OpenWRT on a Pi 4B and after 3x memory cards on 3x different card readers on 2x different computers they all come up saying “Verifying write failed. Contents of SD card is different then what was written to it.”
Would love to know a fix

@123sc0ut Did you buy all 3 SD cards from the same place? Perhaps they're faulty or fake? You can use H2testw to check your cards for errors.

Ok so I got a work around - rather that using the Raspberry Pi Imager I used Rufus to install the image and it worked perfectly. @lurch There was nothing wrong with my cards, looks like the fault was Pi Imager on Windows v1.6.2, not sure why. . .

Was this page helpful?
0 / 5 - 0 ratings