GNU Parted 3.4 Using /dev/mmcblk1 Welcome to GNU Parted! Type 'help' to view a list of commands.
查一下根目录是序号是多少
> print list
Model: MMC NCard (sd/mmc) Disk /dev/mmcblk1: 7818MB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 71.3MB 138MB 67.1MB primary fat16 2 138MB 407MB 268MB primary 3 801MB 2949MB 2147MB primary ext4
(序号正常应该是3,就是文件系统ext4那个)
将剩下的容量全都分给根目录
> resizepart 3 100%
Warning: Partition /dev/mmcblk1p3 is being used. Are you sure you want to continue? Yes/No? yes
退出parted
> quit
Information: You may need to update /etc/fstab.
对文件系统进行扩容
> resize2fs -p /dev/mmcblk1p3
resize2fs 1.46.5 (30-Dec-2021) Filesystem at /dev/mmcblk1p3 is mounted on /overlay; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/mmcblk1p3 is now 1713152 (4k) blocks long.