cancel
Showing results for 
Search instead for 
Did you mean: 

Rootfs size expansion

NPal.2
Senior

Hi ,

How can i increase the size of rootfs correctly?

I tried using gparted , but it looks like the tf-a iss't very happy with it and tries to reset it in correct way. So i would like to understand how can i increase its size more correctly since installing a lot of packages causes low disk space in rootfs and i would like to leverage space left on other drives to be used.

Any leads will be highly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
8 REPLIES 8
Jean-Marc B
ST Employee

Hello @NPal.2​ 

if possible, you can try to flash your board with the «extensible» flashlayout (*-extensible.tsv). Extensible flashlayout does not flash userfs partition to extend the rootfs partition to the size of the sdcard.

If not, you have to change the value of the variable IMAGE_ROOTFS_MAXSIZE in your image parameter (see the definition of this variable in the layer meta-st/meta-st-stm32mp in the file conf/machine/include/st-machine-common-stm32mp.inc.

Best regards,

--JM

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

Hi @Jean-Marc B​ : Thanks for response. Let me try this and see what is happening.

OlivierK
ST Employee

Hi NPal.2 (Community Member)

You could also refer to this:

https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command

Here you can update the script "create_sdcard_from_flashlayout.sh" and change the field DEFAULT_ROOTFS_PARTITION_SIZE

according to your needs.

Best Regards

Olivier

Thanks @OlivierK​ : I think this sounds more good. I will definitely give this a try.

OlivierK
ST Employee

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

NPal.2
Senior

Hi @Jean-Marc B​ and @OlivierK​ :

I tried above suggestion of modifying IMAGE_ROOTFS_MAXSIZE to value for 1.5GB. But it looks like system does not take it. Running df -h shows the root storage limited to 660MB . However doing lsblk shows it has size of 1.5GB. How to fix this ? Root partition still is limited to 660MB.

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       660M  587M   24M  97% /
devtmpfs        181M     0  181M   0% /dev
tmpfs           246M   64K  245M   1% /dev/shm
tmpfs           246M   17M  229M   7% /run
tmpfs           246M     0  246M   0% /sys/fs/cgroup
tmpfs           246M     0  246M   0% /tmp
/dev/mmcblk0p2   58M  9.9M   44M  19% /boot
/dev/mmcblk0p3   15M  6.8M  6.7M  51% /vendor
tmpfs           246M  164K  245M   1% /var/volatile
/dev/mmcblk0p5  120M  8.9M  103M   8% /usr/local
tmpfs            50M     0   50M   0% /run/user/0
root@stm32mp157a-visionsom-rgb-emmc-mx:/usr/local# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0  3.7G  0 disk 
|-mmcblk0p1  179:1    0    4M  0 part 
|-mmcblk0p2  179:2    0   64M  0 part /boot
|-mmcblk0p3  179:3    0   16M  0 part /vendor
|-mmcblk0p4  179:4    0  1.5G  0 part /
`-mmcblk0p5  179:5    0  2.1G  0 part /usr/local
mmcblk0boot0 179:16   0    2M  1 disk 
mmcblk0boot1 179:32   0    2M  1 disk 

Thanks @Jean-Marc B​  This really helps...!!