I am working with "sparse" files so the disk image will contain 0 bytes at creation and will show that with du -m upper_changes.ucimg
but with ls -l upper_changes.ucimg
will show it's 1024 MiB. In effect is dynamic in storage sizes.
Code: Select all
dd if=/dev/zero of=upper_changes.ucimg count=102400
mkfs.ext3 upper_changes.ucimg
This example is the command used for the "sparse" image.
Code: Select all
dd if=/dev/zero of=upper_changes.ucimg bs=1M count=0 seek=1024
mkfs.ext3 upper_changes.ucimg
To resize this :
Code: Select all
dd if=/dev/zero of=sparse.img bs=1M count=0 seek=2048
which now makes upper_changes.ucimg 2048 MiB. Now the partition needs to be expanded to fit the new size.
A utility that does this already exists in Puppy Linux.