嵌入式爱好者

8mp 进行UUU烧写后拓展分区到14G的方法

2022-7-29 14:38| 发布者: wjy| 查看: 529| 评论: 0

类目: 知识库  >  i.MX8MP系列产品     文档编号: 703

8mp目前TF卡烧写后开发板分区是可以扩容到14G的,uuu烧写则是烧写时使用的rootfs.sdcard镜像多大烧写后的emmc就多大,具体查询结果如下图

  OTG

TF

如果UUU烧写后想扩容,可以尝试命令行中进行如下操作:

root@OK8MP:~# fdisk /dev/mmcblk2

Welcome to fdisk (util-linux 2.34).

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/mmcblk2: 14.69 GiB, 15758000128 bytes, 30777344 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: 0x036f1e8a

Device         Boot  Start      End  Sectors  Size Id Type

/dev/mmcblk2p1       16384   186751   170368 83.2M  c W95 FAT32 (LBA)

/dev/mmcblk2p2      186752 15915391 15728640  7.5G 83 Linux    //需扩容的分区

Command (m for help): d                                              //删除分区

Partition number (1,2, default 2): 2                               //删除分区2

Partition 2 has been deleted.

Command (m for help): n                                             //添加一个新分区

Partition type

   p   primary (1 primary, 0 extended, 3 free)

   e   extended (container for logical partitions)

Select (default p): p                                                     //打印分区表

Partition number (2-4, default 2): 2                             //创建分区2

First sector (2048-30777343, default 2048): 186752 //开始地址(以上一分区的结束地 址为参考)

Last sector, +/-sectors or +/-size{K,M,G,T,P} (186752-30777343, default 30777343): 回车

Created a new partition 2 of type 'Linux' and of size 14.6 GiB.

Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: n  //不删除签名

Command (m for help): w                                           //将表写入磁盘并退出

The partition table has been altered.

Syncing disks.

root@OK8MP:~# resize2fs /dev/mmcblk2p2

resize2fs 1.45.3 (14-Jul-2019)[  461.996877] EXT4-fs (mmcblk2p2): resizing filesystem from 1966080 to 3823824 blocks

Filesystem at /dev/mmcblk2p2 is mounted on /; on-line resizing required

old_desc_blocks = 1, new_desc_blocks = 2

[  462.220981] EXT4-fs (mmcblk2p2): resized filesystem to 3823824

The filesystem on /dev/mmcblk2p2 is now 3823824 (4k) blocks long.

说明:如果想开机自动扩容,可把上述操作写成脚本的形式,开机自启。


已解决

未解决

只是看看

最新评论

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-22 21:37

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部