I want to recover files deleted by accident. I know how to recover the files using testdisk/photorec. This post is not about how to recover files. It is about how an Ubuntu live USB handles downloaded data.
I have a bootable flash drive with Ubuntu on it already and considered using it to avoid changing anything on the computer's hard drive. However, I was advised that there are some circumstances where Ubuntu will use the host computer's hard drive even when booting from a secondary drive, with little explanation as to how or why. I have seen in my research that Ubuntu will use either the computer's RAM or a file to preserve its state, which is also not saved on the host's hard drive. I am working with conflicting information.
I plan to recover the files using PhotoRec from a live usb, copying the recovered files to an external hard drive. I want to do everything I can to avoid touching the computer's hard drive until after PhotoRec is run.
My question is, how does an Ubuntu bootable drive handle downloaded data (such as packages and apt updates)? What happens if the amount of data downloaded exceeds the size of the RAM cards installed?
Also, as a side note, does anyone know off the top of their heads where I can find the code that would answer these questions? It may be obvious, but I can't seem to find it.