Page 1 of 1

How to grow the sandbox savefile.img file

Posted: Mon Dec 05, 2022 5:35 pm
by je55eah

I guess that if I create a larger savefile and copy the old contents to the new one then it will work. Is that the proper way? I am aware that some files on the host system can be deleted within the sandbox, and thus masked because they persist on the host system but appear to be absent from the guest. Where is that information about pseudo-deleted files stored?


Re: How to grow the sandbox savefile.img file

Posted: Mon Dec 05, 2022 6:28 pm
by je55eah

Re: How to grow the sandbox savefile.img file

Posted: Mon Dec 12, 2022 4:23 pm
by jamesbond

Follow the second answer, the one with the title "Make the original file, mount it, check, unmount it".


Re: How to grow the sandbox savefile.img file

Posted: Mon Dec 12, 2022 6:14 pm
by rockedge

I stumbled across this topic while experimenting with ideas that are related.

In KLV-Airedale there is a feature to use a savefile on FAT32 or NTFS partitions but the mechanism to achieve this relies on the user creating a disk/partition image file called upper_changes.ucimg beforehand. So far there is no utility in KLV to create, format and resize the image file so that all needs to be done manually.

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
Screenshot_2022-12-12_13-21-01.png
Screenshot_2022-12-12_13-21-01.png (90.82 KiB) Viewed 523 times

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.