3

My raspberry pi runs raspbian. The actual SD card is 32 GB. I’d like to make an image of the system installed (with my configuration and my personal files) in order to install it easily on other SD card. As the card has only 2.5GB capacity, I’d like to obtain an image of less than 4GB, so I can use smaller cards.

I have tried using win32 Disk Imager, but the image is around 30GB, so I can’t use it. I also have another computer running Linux, with no SD card reader, but with SSH access. I think I can use dd, but I don't want to obtain a big image. Here is some information about my system on the raspberry pi:

$fdisk -l
Disk /dev/mmcblk0: 32.3 GB, 32270450688 bytes
4 heads, 16 sectors/track, 984816 cylinders, total 63028224 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c7b31

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880    63028223    31452672   83  Linux

$df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
rootfs            30G  2,1G   27G   8% /
/dev/root         30G  2,1G   27G   8% /
devtmpfs         212M     0  212M   0% /dev
tmpfs             44M  256K   44M   1% /run
tmpfs            5,0M     0  5,0M   0% /run/lock
tmpfs             88M     0   88M   0% /run/shm
/dev/mmcblk0p1    56M   22M   35M  40% /boot

marked as duplicate by Piotr Kula, lenik, goldilocks, syb0rg, Butters Aug 14 '13 at 16:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

You could try to resize your root filesystem (rootfs) so that it is smaller than 4GB, then your image should only copy your new smaller filesystem.

Here is a tutorial on how this can be done.

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