Create new partition

Hi everyone,

I’m looking to create a new partition in my Debian KDE OS. I’m aiming to use SWUpdate for OTA updates. However, I’m encountering some difficulties figuring out how to create the new partition. My plan is to duplicate the mmcblk1p3 partition, but it’s currently occupying 28GB, which is all the free space on the eMMC.

After some investigation, I suspect that rsetup may be resizing this partition during the initial boot. I’ve tried mounting the image locally and making changes in the before.txt file to test this hypothesis, but unfortunately, mmcblk1p3 still occupies the same amount of space.

Could someone lend a hand with this issue? Any assistance would be greatly appreciated.

Thanks!

I’ve done some further investigation into the issue.

I commented out the code referring to the resize_root function in lib/rsetup/cli/system.sh . I also modified the rsetup source to point to the repo with modified version, but the partition resize still occurs.

Looking deeper into the issue, I suspect that the resizing during the first boot might be handled by cloud-initramfs-growroot . To prevent this, I added the module to etc/modprobe.d/blacklist.conf to prevent it from being loaded during boot. Additionally, I set the size of the / partition in /etc/fstab , but it’s still resizing to 28GB.

In the case of CM3, there is no problem if you use Radxa’s ‘CM3 IO Board’,
But if you are using other carrier boards, you need to be careful.

If you mess around with the settings on the ‘eMMC’ carelessly
and unfortunately make a mistake you could end up with a completely bricked state.

Not only for CM3, but I often see reports that ‘RKDevTool’ does not work well.
If this applies to you, you’re completely out.
(If you get into this state, it is impossible to repair for people without hardware skills.)

Therefore, it is important to first provide a specific example of your hardware environment and the image name you will be using.


I don’t know what kind of image you are using, but with the images I know,
if we want to disable partition resizing at first boot,
we can disable partition resizing at first boot by creating a file ‘growroot-disabled’ under the location ‘/etc’ on the image.

# touch (/Image)/etc/growroot-disabled

However, regardless of the distribution,
it is assumed that partition resizing will be performed at the first boot,
so the size allocated to ‘root-fs’ in the initial state is the minimum required.
Therefore, it is too small to be of much use in practical use.

It would be wise to use the simpler and more standard commands ‘resize2fs’ / ‘fdisk’ / ‘fsck’ etc.
to resize the target partition to the size you want.

Thank you for your detailed response. I apologize for the delayed reply as I was not notified of your message. It worked :slightly_smiling_face: