Expanding rootfs from uboot.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Expanding rootfs from uboot.

644 次查看
bgaurav1718
Contributor III

Greetings everyone.

I have been trying to expand root filesystem in iMX8MP-LPDDR4-EVK. I built a image with Yocto and it has root partition of around 7 GB. Flashing this image into eMMC leaves nearly 23GB of unused space. So, I tried expanding online with parted and resize2fs tools. The partition expands successfully but I encountered problems when trying to expand the rootfs.

So, I went through some similar topics and found this post. In one of the comments, u-boot was mentioned to be a way to resize partition. But I could not find any articles. I am looking for some guidance on how to expand rootfs through u-boot. 

So far, I tried implementing the file system expansion mechanism used in Raspberry Pi.  I was skeptic about the result and as expected, it did not work. 

Please let me know if any further information are required. 

标记 (3)
0 项奖励
回复
2 回复数

613 次查看
bgaurav1718
Contributor III

@Bio_TICFSL Thank you for the reference.

I tried the method and got following errors.

After expanding the partition (I expanded just a little as test) , I could not run the command 

e2fsck -f /dev/mmcblk2p2

The tool complains about the partition being mounted.

Despite this, I tried expanding the rootfs using 

resize2fs /dev/mmcblkp2

 I got a message stating "There are errors in the filesystem, so online resizing is not allowed."

I have attached the error screenshot. 

I have encountered this error previously as well. So I though it would be a good idea to resize the partition and rootfs through U-Boot.

Thank you!!

0 项奖励
回复

624 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport
0 项奖励
回复