I have an Ubuntu installation backed up as a .squashfs file. I would like to extract it to the root of a partition, but when I try gives me an error saying the directory exists. I can extract just fine to non-existent directories. I've searched for information about using squashfs-tools, but can't find what commands would be used to extract to an existing location such as an empty partition.
This is the command I'm using that works for extracting to non-existent locations:
sudo unsquashfs -d /media/location1/locationthatdoesntexist /media/location2/file.squashfs
I tried using this to extract to an empty partition,but it doesn't work:
sudo unsquashfs -d /media/location1 /media/location2/file.squashfs