How to grow the sandbox savefile.img file

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
je55eah
Posts: 183
Joined: Mon Jul 26, 2021 5:27 pm
Has thanked: 30 times
Been thanked: 5 times

How to grow the sandbox savefile.img file

Post 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?

je55eah
Posts: 183
Joined: Mon Jul 26, 2021 5:27 pm
Has thanked: 30 times
Been thanked: 5 times

Re: How to grow the sandbox savefile.img file

Post by je55eah »

jamesbond
Posts: 542
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 75 times
Been thanked: 294 times

Re: How to grow the sandbox savefile.img file

Post by jamesbond »

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

User avatar
rockedge
Site Admin
Posts: 5727
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1999 times
Been thanked: 2102 times
Contact:

Re: How to grow the sandbox savefile.img file

Post 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 509 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.

Post Reply

Return to “FatDog”