Partition scaling problems while flashing the customized rootfs

Hey,
I am using the latest linaro debian image (https://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/) and customized it by adding some files such as packages and modules.
I have used simg2img and img2simg commands to convert the image to raw and back to sparse image.
After flashing this image to the board, I am able to access only 6G of the partition, in which 65% is already occupied by the rootfs. (the partition actually has a size around 40G.).

Why am I not able to access the remaining partition?

Thanks
Ashik

Did your customization inhibit the first boot logic from running? I think that is normally what enlarges the filesystem to match its partition. Either way, you should be able to resize it manually, resize2fs can be run on a mounted filesystem.

There were no changes which affects the boot.

And am not able to resize it manually using the command resize2fs,

resize2fs 1.44.4 (18-Aug-2018)
Filesystem at /dev/sda1 is mounted on /; on-line resizing requir[ 48.870779] EXT4-fs (sda1): resizing filesystem from 1605632 to 12582912 blocks
ed
old_desc_blocks = 1, new_desc_blocks = 3
[ 48.890273] EXT4-fs warning (device sda1): verify_reserved_gdb:730: reserved GDT 2 missing grp 1 (32770)
[ 48.890305] EXT4-fs (sda1): resized filesystem to 12582912
Performing an on-line resize of /dev/sda1 to 12582912 (4k) blocks.
[ 48.920844] EXT4-fs warning (device sda1): ext4_group_add:1608: No reserved GDT blocks, can’t resize
resize2fs: Operation not permitted While trying to add group #49

I guess you found your problem… assuming the original images were resizable. I’m afraid I’ve not come across this error before so can’t offer any clue on how to fix…