[yocto] Resizing rootfs on first boot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[yocto] Resizing rootfs on first boot

9,192件の閲覧回数
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 返答(返信)

8,146件の閲覧回数
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 件の賞賛
返信

8,146件の閲覧回数
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 件の賞賛
返信

8,146件の閲覧回数
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 件の賞賛
返信

2,017件の閲覧回数
bgaurav1718
Contributor III
Hi @gusarambula, do you have any reference article to resize the parition with u-boot? I
0 件の賞賛
返信