Custom resizing of filesystem at first boot

hardware: RADXA ROCK PI S with 4GB NAND
loader: rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin
image: rockpis_ubuntu_focal_server_arm64_20210924_0418-gpt.img

Is there a way how to disable or control resizing of filesystem at first boot ?
I would like to give it only a half of the NAND.
Prefered way would be to somehow alter the install image.
At runtime, when mounted, it seems impossible to shrink it back.

Hi,vitula

You can try to fix this with the steps in the README file

README.zip (542 Bytes)

I’m sorry I forgot to tell you how to expand the file system partition to the size you want after removing the auto-expand partition service. After removing the auto-expand partition service, after burning the image, he will assign the partition according to the size of the image.


You need to expand the file system partition to the size you want with the fdisk command

First you need to enter root privileges

sudo su

Then use the fdisk /dev/mmcblk0 command

fdisk /dev/mmcblk0 

Enter p to view the original partition

Type d to delete the partition to be extended.

Type n to create a new partition

Enter wp to save and exit

Then use the lsblk command to see the size of the extended partition.

1 Like