parted --script /dev/mmcblk0 resizepart 1 y 7818MB resize2fs /dev/mmcblk0p1 Partition number (2-4, default 2): First sector (2048-15269887, default 2048): 1671168 Last sector, +sectors or +size{K,M,G,T,P} (1671168-15269887, default 15269887): Created a new partition 2 of type 'Linux' and of size 6.5 GiB. Command (m for help): p Disk /dev/mmcblk0: 7.3 GiB, 7818182656 bytes, 15269888 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 Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 32768 1671167 1638400 800M 83 Linux /dev/mmcblk0p2 1671168 15269887 13598720 6.5G 83 Linux