Skip to main content
47 votes

How can I convert a .img.xz file to .img to transfer it to my SDCard?

You can use xzcat and dd together. xzcat kali-1.1.0-rpi.img.xz | dd of=/dev/SDCARDNAMEGOESHERE It retains original file.
Stenyg's user avatar
  • 571
35 votes
Accepted

How can I mount a Raspberry Pi Linux distro image?

losetup provides partition probing through -P. Using this makes mounting partitions of a full disk image such as the Raspbian SD card image very easy: losetup -P /dev/loop0 raspbian.img mkdir /mnt/...
Johan Ehnberg's user avatar
25 votes

How to clone Raspberry Pi SD Card on Windows, Linux, and macOS?

On Linux or OSX I use dd to make a backup from SD card. Reverse if and of (i.e. to where they point - source and destination) afterwards to restore, but be careful not to restore to a wrong disk. It ...
zarvox's user avatar
  • 361
19 votes
Accepted

Copy existing Raspbian installation to smaller SD card

In this answer, I demonstrate what to do step-by-step for people to understand the logic behind the solution and to be able to apply steps in their other problems. But firstly, it should be stated ...
vaha's user avatar
  • 1,240
13 votes
Accepted

How to clone Raspberry Pi SD Card on Windows, Linux, and macOS?

I recently had to make a backup image for my Raspberry Pi 3 Model B and found an incredibly helpful guide from Beebom. The guide outlines the process for cloning and restoring a Pi SD image for all ...
ob1's user avatar
  • 459
12 votes
Accepted

Which images can be used universally across all Raspberry Pi versions?

All images available at https://www.raspberrypi.org/downloads/raspbian/ are compatible with all Pi models. Of course, this may change in the future
Dirk's user avatar
  • 3,541
11 votes

How to shrink an image file after allocating full space

The exists a nice tool called pishrink which reduces the size of a dd image as much as possible by shrinking the root partition. If you start up the restored image the first time the partition is ...
framp's user avatar
  • 900
11 votes

DD claiming to write to SD card, not doing anything

Late to the party, but I had the same issue today: $ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=2M status=progress 66+1 records in 66+1 records out 138412544 bytes (138 MB, 132 MiB) ...
JMercer's user avatar
  • 219
10 votes
Accepted

Reduce Ubuntu mate 16.04 img file size

Ok so I finally found an answer and I wish to share it with you guys. My guess is that the creators created the compressed file from an expanded image by mistake. The fact that the compressed file is ...
Ashwin Kumar k's user avatar
9 votes

Can a Raspberry Pi be used to create a backup of itself?

It's now 2022; the original question here, and some of the answers, are about 9 years old now. I'm adding this answer to provide an update, and to connect this question, and its answers, with a more ...
Seamus's user avatar
  • 22.3k
9 votes
Accepted

Restore PI from Pi itself

Not quite. You would overwrite the partition tables when you re-image it and replace said tables with the ones from the image. After your imaging program is done, it would release the file handle to ...
Aloha's user avatar
  • 7,156
9 votes
Accepted

How to Backup/Shrink the image of my working Raspbian SD Card

Many users ask how they can produce a small customised image that can be used to create new SD Cards and/or how they can shrink an image to make a compact backup of a running system. I have found a ...
Milliways's user avatar
  • 60.5k
8 votes

How to printscreen on Raspberry Pi?

Just use the Print Screen key on your keyboard that will save a PNG image in your home directory (/home/pi) of the whole desktop.
Dirk's user avatar
  • 81
7 votes
Accepted

How to make an image file from scratch

It is possible to create an empty image for a Raspberry Pi. Then you can copy an operating system with a boot and root partition to it and boot. To fill the empty image you can use any usable file ...
Ingo's user avatar
  • 42.2k
7 votes
Accepted

OS image made using Pi-Gen lacks JPEG support in GTK

A desktop devoid of all images and icons sounds very much like a known issue with running on 64-bit hosts. qemu needs to be 32-bits for correct emulation and a proper build. The fixes that worked for ...
myka's user avatar
  • 136
6 votes

YOLO or SSD on raspberry pi

OK after a long search I 've found a reliable version of yolo called YAD2K. I have use tiny-yolo which takes about 1.5s per frame on a raspberry pi 3.
simonepi's user avatar
  • 131
6 votes

Is there a way to compress a backup of the RPi because the backup has empty space?

Already answered here dd-on-entire-disk-but-do-not-want-empty-portion Assuming you want to save /dev/sdXN to /tgtfs/image.raw and you are root: mkdir /srcfs && mount /dev/sdXN /srcfs Use ...
MatsK's user avatar
  • 2,811
6 votes
Accepted

How to edit Raspberry Pi files from SD card on Windows machine?

If you want to modify only one configuration file from MS Windows there is a very simple way. Default Raspbian has two partitions: one boot partition formated as fat and the root partition with all ...
Ingo's user avatar
  • 42.2k
6 votes
Accepted

How do I Flash (install) Raspbian on Raspberry Pi Compute Module 3 / 3+?

Method 1: Hard (Official) Way Follow the official instructions from Raspberry Pi in below link if you like a Rube Goldberg / Heath Robinson way of doing things: https://www.raspberrypi.org/...
F1Linux's user avatar
  • 1,667
5 votes

How to increase the camera exposure time?

Although raspberry camera has lot of limitations it is possible to take pictures in very dark environment. My best night mode for raspberry pi camera is with this settings: raspistill -w 2592 -h ...
vlk's user avatar
  • 291
5 votes

Image of a 16Gb card containing unpartitioned space at the end: Truncating possible?

I know this is an old question, but I would like to show how to do this process on Mac, because it is not as easy: fdisk doesn't have the -l option, and truncate is not installed by default: 1. Step ...
ant0nisk's user avatar
  • 183
5 votes

Copy current SD image to larger SD card

The following worked for me, with an SD card that was originally prepared with NOOBS. I was going from a 32GB SD-Card to a 128 GB Card. Insert the new card into an external card reader and attach it ...
PMF's user avatar
  • 906
5 votes

Backing up SD card generates a huge .img file

Surprise! creating an image of a 16GiB SD Card creates a 16GiB image. There are 2 options; only backup files can-a-raspberry-pi-be-used-to-create-a-backup-of-itself or compress the image https://...
Milliways's user avatar
  • 60.5k
5 votes
Accepted

DD claiming to write to SD card, not doing anything

I had this problem and it turned out to be a faulty sd card. I tried to delete partitions and reformat the sd card but it plain refused. Use another sd card and it was fine.
Steve Amor's user avatar
5 votes

DD claiming to write to SD card, not doing anything

Had the same problem with this: dd bs=4M if=2018-04-18-raspbian-stretch.img of=/dev/sdX conv=fsync But it worked by dropping the fsync dd bs=4M if=2018-04-18-raspbian-stretch.img of=/dev/sdX
Greg Herlein's user avatar
5 votes

Is there a way to compress a backup of the RPi because the backup has empty space?

https://www.raspberrypi.org/documentation/linux/filesystem/backup.md explains backup and restoration. You don't indicate what OS you are using but it is simple on any 'NIX system. I use the following ...
Milliways's user avatar
  • 60.5k
5 votes
Accepted

Burn ISO file to Flash Drive with Raspbian

connect flash drive unmount it sudo dd if=/path/to/your/WIN10.ISO of=/dev/sdX bs=4M status=progress; sync replace /dev/sdX by the correct device letter of your flash drive (to find it out: mount ...
Fabian's user avatar
  • 1,278
5 votes
Accepted

What is the best way to automate the generation of bootable SDcard images for Raspberry Pi projects?

Bart van Leeuwen pointed me to CustomPiOS as a nice solution: https://github.com/guysoft/CustomPiOS It may not work for my project, because it is bound to Raspbian (and I will need PiCore), and it ...
Martin Hepp's user avatar
5 votes

Raspberry Pi Imager says "Input file is not a valid disk image."

At one time the Foundation distributed images with an incomplete last block. This caused some poorly written image programs to fail. The Foundation has since learned the error of its ways but ...
Milliways's user avatar
  • 60.5k
5 votes

OS image made using Pi-Gen lacks JPEG support in GTK

To give more insight into the issue, it appears to be a bug in 64-bit qemu emulating a 32-bit machine, which won't use the host's 32-bit libraries in a readdir() call, so the host kernel feed it with ...
Dmitry Grigoryev's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible