devttys0 / sasquatch

501 stars 155 forks source link

failed to read uid/gid table #32

Closed DMirror closed 4 years ago

DMirror commented 4 years ago

I am curently trying to extract a SquashFS filesystem of a firmware that I am working with for quite a while now. I had a lot of issues until this point but I managed to get a SquashFS file that looked promising to me.

When I first tried to extract it with the unsquashfs utility I got an error message. I guess this is a vendor hacked version. So I tried to use sasquatch instead but I still get the following error message: SquashFS version [4.0] / inode count [1957] suggests a SquashFS image of the same endianess Parallel unsquashfs: Using 1 processor read_uids_guids: failed to read id table block FATAL ERROR:failed to uid/gid table Apparently there is something wrong with the id tables. Is there anything that I can do to work around this problem or is it not possible at all to extract the files like this?

Something that I also noticed is that the string ELF keeps popping up over the file system image.

Edit: When I use the -s option of the unsquashfs utility I receive the following information:

Found a valid SQUASHFS 4:0 superblock on 0.squashfs. Creation or last append time Wed Nov 28 09:29:14 2018 Filesystem size 14015771 bytes (13687.28 Kbytes / 13.37 Mbytes) Compression lzo Block size 131072 Filesystem is exportable via NFS Inodes are compressed Data is compressed Uids/Gids (Id table) are compressed Fragments are compressed Always-use-fragments option is not specified Xattrs are compressed Duplicates are removed Number of fragments 69 Number of inodes 1957 Number of ids 5

DMirror commented 4 years ago

Edit: I found the problem. Apparently the CPU was powered up by the BusPirate so I had to hold the CPU in reset with a solder bridge. After that it worked perfectly.