Skip to main content
NPal.2
Associate III
July 10, 2021
Solved

Rootfs size expansion

  • July 10, 2021
  • 4 replies
  • 2131 views

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.

This topic has been closed for replies.
Best answer by Jean-Marc B

Hello @NPal.2​ 

This topic may help you: https://community.st.com/s/question/0D53W00000jm0GnSAI/increasing-the-rootfs-size-on-a-stm32mp157fdk2

Best regards,

--JM

4 replies

Jean-Marc B
ST Employee
July 12, 2021

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'

NPal.2
NPal.2Author
Associate III
July 12, 2021

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

OlivierK
Technical Moderator
July 12, 2021

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
NPal.2
NPal.2Author
Associate III
July 12, 2021

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

OlivierK
Technical Moderator
July 20, 2021

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'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
NPal.2
NPal.2Author
Associate III
August 25, 2021

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 

Jean-Marc B
Jean-Marc BBest answer
ST Employee
August 27, 2021
NPal.2
NPal.2Author
Associate III
September 8, 2021

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