突然发现内存不是很够,于是对tf卡重新进行了一番分区。
1.在终端运行 cat /sys/block/mmcblk0/mmcblk0p2/start
2.记下返回的数字
3.sudo fdisk /dev/mmcblk0
d 回车
2 回车
n 回车
p 回车
2 回车
将刚才数字打上 回车
再按一次回车
w 回车
此时应该显示
The partition table has been altered.
Calling ioctl() to re-read partition table.Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
4.sudo reboot 重新启动
5.重启之后运行 sudo resize2fs /dev/mmcblk0p2
至此扩容完毕 可以运行df -h 查看一下。
这是扩容后的,扩容之前是7g。 本身是16g内存卡