From debian stretch man page:

Filesystem filter options
       Add pseudo file definition.

       Add list of pseudo file definitions.

   -sort SORT_FILE
       sort files according to priorities in SORT_FILE. One file or dir with priority per line. Priority -32768 to 32767, default priority 0.



There is more information in the README that might be part of the distributed package, or can be seen here 3.8 Pseudo file support.

For example,

-p 'mychardev c 666 root root 100 1'

creates a character device with major/minor 100/1. Similarly, if you have a file mylist holding the lines

mydir         d 777 0 0
mydir/thedate f 776 0 0 date +'year is %Y'

then -pf mylist will create a directory and a file within it holding the result of doing the command date +'year is %Y' at the time mksquashfs was run.

The -sort option is not described further, but accepts filenames within the resulting filesystem, followed by a number, for example

b/c 500
b/d 700

where b/c and b/d are found in your squashfs. My version does not recognise names provided through the -p options, and indeed stops the above date example from working. If necessary you can split up the building of the filesystem into separate mksquashfs commands with different options, and each set of new files will be appended at the end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.