# expand partition 1 of sd card to max size: echo ,+ | sudo sfdisk --no-reread --no-tell-kernel /dev/mmcblk0 -N 1 # tell kernel to recheck partitions sudo partprobe /dev/mmcblk0 # expand filesystem to fit partition: sudo resize2fs /dev/mmcblk0p1