# SCRIPT TO EXECUTE MANUALLY, STEP BY STEP
# create raspbian image from SD card
# (dd with limited number of mega bs=1 count=4500 (to adapt, using parted to get infos))

# 1. on the Pi (DIDN'T WORK => Kernel panic)
#parted print # to get partition number and nb of MB to create the partition
#resizepart 2 4500MB
# (using gparted to decrease the main partition size)

# 2. connect the SD card to the Mac
# sudo dd if=/dev/disk3 of=./raspoid_v1_.img bs=1m count=4500 # TO ADAPT WRT STEP 1
sudo dd if=/dev/disk2 of=./raspoid_v2_.img bs=1m

# 3. compress using TAR.BZ2
tar -jcvf raspoid.tar.bz2 raspoid.img
# to extract: tar -jxvf raspoid.tar.bz2

quit