I'm trying to modify a firmware file by unsquashing it, editing my files and squash it again. But I got problems with the device which does not accept the file because of different squashfs types (as I suppose). Here's the output on my dev box:
original file:
user@ubuntuVM:~$ unsquashfs -s main-fs.5_0
Reading a different endian SQUASHFS filesystem on main-fs.5_0
Found a valid big endian SQUASHFS 3:0 superblock on main-fs.5_0.
Creation or last append time Thu Aug 21 20:56:15 2008
Filesystem size 9653.75 Kbytes (9.43 Mbytes)
Block size 65536
Filesystem is not exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always_use_fragments option is not specified
Check data is not present in the filesystem
Duplicates are removed
Number of fragments 105
Number of inodes 1667
Number of uids 2
Number of gids 1
modified file:
(used mksquashfs squashfs-root main-fs.test -b 64K -no-exports -no-xattrs -no-sparse -force-gid 0 -force-uid 0
as root)
user@ubuntuVM:~$ unsquashfs -s main-fs.mod
Found a valid SQUASHFS 4:0 superblock on main-fs.mod.
Creation or last append time Mon Dec 3 14:46:07 2012
Filesystem size 9654.48 Kbytes (9.43 Mbytes)
Compression gzip
Block size 65536
Filesystem is not exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always_use_fragments option is not specified
Xattrs are not stored
Duplicates are removed
Number of fragments 105
Number of inodes 1667
Number of ids 1
I think the problem is the superblock and/or SQUASHFS version. I found that it was possible to us mksquashfs -2.0
for some time, but this argument got removed and would not be so helpful because I need version 3.
So my question exactly is: How can I achieve to repack my modified files exactly as they were before? Additionally my modificated file states compression: gzip
but the original states nothing about it's compression. Maybe here is a problem too, but I don't know how to get more info than the above. :-(