[yocto] Resizing rootfs on first boot

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

[yocto] Resizing rootfs on first boot

7,625 次查看
li_hong
Contributor III

Hi Team,

 

I'm using Yocto project and I use i.MX6 sabre-SD Quad as my platform.

 

I'd like to be able to bulid an SD card image ,deloy to a system on a 8G emmc.

While boot up  device and entry terminal ,I find out the root mounted only 2.6G,

How to resize automatically on fist boot.

Thank you in advance.

0 项奖励
回复
4 回复数

6,579 次查看
glennelliott
Contributor I

Anyone suggesting that you must manually resize the partition, or inflate the partition in Yocto, has never had the joy of using a Raspberry Pi sdcard image.  It automatically increases the filesystem/partition on first boot if there is available space.

0 项奖励
回复

6,579 次查看
davidvescovi
Contributor V

If you are using an SD card it might be easier to just plug it into a USB card reader, attach it to a ubuntu machine and use the disk tools to expand the partition. 

0 项奖励
回复

6,579 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Hello Hong Li,

The SD card image generated depends on the size of the rootfs. The easiest way to add more space would be to edit the EXTRA_SPACE variable in Yocto. You can see a bit more on how to do this on the following Community Document.

https://community.nxp.com/docs/DOC-105521

Otherwise you would need to use u-boot to resize the partition through a script before loading the kernel and rootfs, but I haven’t tested this option.

I hope this helps!

Regards,

0 项奖励
回复

450 次查看
bgaurav1718
Contributor III
Hi @gusarambula, do you have any reference article to resize the parition with u-boot? I
0 项奖励
回复