[yocto] Resizing rootfs on first boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[yocto] Resizing rootfs on first boot

6,663 Views
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 Kudos
3 Replies

5,617 Views
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 Kudos

5,617 Views
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 Kudos

5,617 Views
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 Kudos