0

I have a raspberry pi backup.img file that I was trying to extract some of its inside files, I used different softwares to do that but all failed. I used Winzip but I got a message sys that this file is corrupted. The file size is 31G, it is an .img file of my Raspberry Pi and was on an SD card. I tried also Isoburn, File Repair,...but none of these software helped unfortunately! Is there any way to to do that whether on PC or Linux?

The SD card was working just fine on the Raspberry pi, but when I did a backup I used the dd command on Linux and cloned it and seemed to be successful! But when I tried to use the same SD card it just didn't boot up. After tons of attempts I just gave up and decided to format the SD card and load the cloned backup image. I used the dd command again and after finishing loading the image to the SD card nothing was working! Actually, there was no Boot file or even root files! So I suspected the SD card itself. I bought a new SD card yet it didn't work too. Then I said ok let me load an old .img that I have, and it worked on both SD cards, But I wanted to have this recent updated .img so badly because it has a lot of projects and stuff.

  • Hi and welcome to Stack Exchange @electech. How did you generate this backup image in the first place? If you followed a tutorial, or know the exact steps, please add them to your post. – David Mar 24 at 22:08
  • If you've still got the original image (not modified by any software) why not just flash to an sd card and boot in Pi? – CoderMike Mar 24 at 22:14
  • How have you created the backup if you used something like win32disk imager then you'll have backed up the file system as well, windows cant read the linux filesystem so says its corrupt. Try opening the image file on a working install of raspian or other linux distro and you should have more luck. As suggested above if it is a full image backup you could try flashing it to a new card and use it that way. – rohtua Mar 24 at 22:34
  • please, see updated post – electech Mar 24 at 22:43
  • I used the dd command line on linux and cloned it please show the command you used - if there's no boot partition, you probably only cloned the root partition - please check the boot partition which should be visible in windows – Jaromanda X Mar 24 at 22:44
0

To restore a Raspbian image use the dd command in reverse. Use a Linux machine and follow the instructions in the official documentation.

The command you're looking for is

sudo dd bs=4M if=backup.img of=/dev/sdb
  • I will try that and let you know! – electech Mar 24 at 23:22
  • it didn't work! – electech Mar 25 at 2:14
  • @electech The didn't work is not helping. What did not work? Did the command failed? Did the sd card had no partitions after the restore? You need to be more specific. – GramThanos Mar 25 at 12:44
  • @GramThomas Thanks fir your support ans willingness to help.... Yes, Ingo, the cmdline was: sudo dd if=/dev/sdb of=backup.img ... and what I meant bby it didnt work was the suggested cmdlune of David... – electech Mar 26 at 13:11
  • @Ingo Thanks fir your support ans willingness to help.... Yes, Ingo, the cmdline was: sudo dd if=/dev/sdb of=backup.img ... and what I meant bby it didnt work was the suggested cmdlune of David... – electech Mar 26 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.