This describes how to take an image file (origBBB.img) that has been extracted from a Beaglebone Black (BBB) – (see here for how to do that) – and shrink it so that it will fit onto a smaller SD card.
First we need to be able to inspect the file system locally. We can inspect the image file with:
file origBBB.img origBBB.img: x86 boot sector; partition 1: ID=0xc, active, starthead 1, startsector 63, 144522 sectors; partition 2: ID=0x83, starthead 45, startsector 147456, 6979584 sectors, code offset 0x0