Loading... > 科普:BananaPi内mmcblk0是SD卡,mmcblk1是板载EMMC(板载有EMMC的板子) <!--more--> - ## 操作方式: 板子的命令终端或者远程SSH等方式 ```Shell cat /sys/block/mmcblk0/mmcblk0p2/start #查看SD卡的第二分区起始位置,记录下这个指令的返回值 ``` ```Shell sudo fdisk /dev/mmcblk0 #使用fdisk工具开始对分区进行修改 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). ``` 如有如上结果则代表修改配置文件成功,但是提示我们还在使用老分区表,此时需要reboot一下系统 ``` sudo reboot ``` 重启后,使用resize2fs使用新分区表 ```Shell sudo resize2fs /dev/mmcblk0p2 ``` #### 返回结果: ``` resize2fs 1.42.13 (17-May-2015) Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 2 The filesystem on /dev/mmcblk0p2 is now 7700608 (4k) blocks long. ``` 有如上返回结果,则代表修改成功,然后使用`df -h`查看分区大小即可。 至此,大功告成~~ Last modification:July 28, 2018 © Allow specification reprint Like 0 If you think my article is useful to you, please feel free to appreciate