Searchโ€ฆ
Create .img file
This is how you create an image you can flash to other Pi's

Make the Pi-Node base .img.gz file for reuse

Put your micro sd card in your local machine and locate what it's called in /dev. For my laptop it is /dev/mmcblk0. Yours will likely be different.
1
sudo fdisk -l
Copied!
After locating move into the directory you wish to save the image to and create the image.
1
# example
2
# sudo cat /dev/mmcblk0 > pi-node.img
3
sudo cat /dev/<your sd card> > pi-node.img
Copied!
cat is better than dd for this. cat will use all of your systems cpu cores, whereas dd uses one core. cat is faster ๐Ÿ™€
Once that completes we will use PiShrink.sh to deflate partitions and compress (among a few other tricks).
install pishrinks.sh
1
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
2
chmod +x pishrink.sh
3
sudo mv pishrink.sh /usr/local/bin
Copied!
1
sudo pishrink.sh -aZ pi-node.img Pi-Node.img.gz
Copied!
pishrink.sh: Shrunk Pi-Node.img.gz from 7.5G to 1.3G ...
And there you have it! ๐Ÿง™โ™‚
Download Pi-Node.img.gzโ€‹
Last modified 3mo ago
Export as PDF
Copy link