Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
32
rated 0 times [  32] [ 0]  / answers: 1 / hits: 87314  / 2 Years ago, wed, june 8, 2022, 6:39:01

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


Source


More From » 13.10

 Answers
5

The source you link to tells you what you need to do:




The tool does not extract a squashed file system on already exsisting
directory unless the -f option is specified.




So this should work



sudo unsquashfs -f -d /media/location1 /media/location2/file.squashfs

[#26391] Friday, June 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sertold

Total Points: 445
Total Questions: 123
Total Answers: 113

Location: Burundi
Member since Wed, Sep 28, 2022
2 Years ago
sertold questions
Wed, Dec 21, 22, 16:02, 1 Year ago
Fri, Dec 31, 21, 01:50, 2 Years ago
Thu, Jun 16, 22, 23:30, 2 Years ago
Mon, Mar 7, 22, 16:21, 2 Years ago
Tue, Mar 29, 22, 02:11, 2 Years ago
;