Running Ubuntu from a portable medium (USB stick), I want to also be able to use the HDD of a computer, e.g. for swap and to temporarily save data.
However, I want not to touch the HDD in a not reversible way, so I can't repartition it nor do I want to directly mount any of the file systems to dump my data file by file without encryption or guarantee that it will safely be deleted afterwards.
What I imagined is to mount an existing partition from my portable system just to create one large file containing a virtual disk image. That way I can use the free space but without being in danger of accidentally changing anything. The virtual disk should be encrypted and contain a swap and ext4 data partition. It has to be persistent between reboots until I manually delete it though.
After I'm done with that computer and having saved everything of importance from the virtual data partition to a persistent location, I want to safely disable swap, unmount the data partition and safely delete (shred) the whole virtual disk image. So in the end, the used HDD does not look modified, except for that one big file being created and deleted, but not giving out any information due to encryption and shredding.
Is the procedure I have in mind possible or will there be problems? Can you please give me advice how to create such a disk image and use it from my portable system etc.?