Building a x86-based image and need more disk space in the image

So I am a bit lost in finding how I can build my image to have extra disk space. Whenever I use the imagebuilder and build my images, I am left with no free disk space. I am building for a ESX based x86-64 based image, so it would be nice to have 100MB of free disk space, instead I've got nothing.
There is no make menuconfig to specify parameters, simply the make image which doesn't have any options for filesystem specs.
I've made some changes in the .config file pertaining to blocksizing but that doesn't seem to affect the final image disk size and extra space.

Any help would be appreciated.

Cheerios,
msubby

CONFIG_TARGET_KERNEL_PARTSIZE=16
CONFIG_TARGET_ROOTFS_PARTSIZE=256

options above should be what you are looking for. Can't tell out of hand, but options in question were somewhere under developer options in "make menuconfig".

1 Like

So that still doesn't change the size of the /dev/root. I've even changed the KERNEL=32 AND ROOTFS=512 and that has no impact. I've even tried adding a 50MB file into the /etc directory and then trying to remove it, but I get an error saying there isn't enough room to remove the file (funny how that works).

There must be a specific setting somewhere else which sets the 4M /dev/root which overrides the custom value of the partition size

Forgot to mention, I'm trying to create a larger squashfs. That is what is limited to 4M. I am building this as a virtual appliance onto an ESX hypervisor.

The squashfs (mounted as /dev/root) is a compressed read-only filesystem, it is only ever as large as its (compressed) contents.

What you need to do is creating a disk image which is larger than the actual rootfs to allow LEDE to allocate the remaining free space as overlay partition.

On Linux one would create such an image with a command like dd if=lede-17.01.1-x86-64-combined-squashfs.img of=disk-image-padded.img bs=1M count=512 conv=sync

The alternative is using ext4 images as those are usually pre-created to have a larger than needed size.

If you build your own images, you can enable Target Images ---> Pad images to filesystem size (for JFFS2) in menuconfig to automatically perform the padding in the generated images. Enabling this option will cause the build system to pad the generated images to the size specified in Root filesystem partition size (in MB) within the same menu.

2 Likes