张静茹作者
7年2个月前修改于 7年0个月前IP:江苏
863546
12楼

使用sd卡的 开发板 烧写镜像后 系统剩余空间 16G的sd卡仅有几百兆 剩余空间

使用 fdisk /dev/mmcblk0 为sd卡 重新分区


root@Ubuntu-mate:~#  fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.25.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.


Command (m for help): p

Disk /dev/mmcblk0: 14.9 GiB, 15931539456 bytes, 31116288 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: 0x00098996


Device         Boot  Start      End  Sectors  Size Id Type

/dev/mmcblk0p1        2048   133119   131072   64M 83 Linux

/dev/mmcblk0p2      133120 30000000 29866881 14.2G 83 Linux


输入d 2 删除第二个分区

输入n p 新建主分区 注意 要留个几百兆不要使用 sd卡可能会损坏 做镜像烧新卡的话镜像太慢 有可能 新卡写不进去

输入分区大小

w存盘 reboot重启

启动后 resize2fs  /dev/mmcblk0p2

reboot 再重启一下


df -h 查看磁盘剩余


评论
文号 / 863546

千古风流
名片专栏发私信
学术分 1
总主题 146 帖总回复 1873 楼拥有证书:进士 学者 机友 笔友
注册于 2010/12/30 03:32:26最后登录 2026/06/20 19:33:53
主体类型:个人
所属领域:无
认证方式:手机号
IP归属地:0

个人简介

暂未填写
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的