Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create SquashFS partition under Ubuntu 11.04 (1TB harddisk, 8Gb RAM). Source folder contains 91Gb html files (several mirrored websites).

Trying to do this:

mksquashfs content_folder content.xz.sfs -comp xz
mksquashfs content_folder content.gz.sfs

After several hours of processing i'm getting: 7.4Gb content.xz.sfs OR 9.1Gb content.gz.sfs But I can't mount them:

root@server:/backup# file content.xz.sfs
content.xz.sfs: data

root@server:/backup# mount -t squashfs -o loop content.xz.sfs /mnt/sfs
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Last output line of mksquashfs (no stats at end):

[=======================================================-] 5296672/5296672 100%


dmesg | tail
[3118916.840011] mksquashfs[14787]: segfault at 7fff08e20300 ip 0000000000406c46 sp 00007fff08e20300 error 6 in mksquashfs[400000+1e000]

Tried to repeat this process several times but i'm always getting segfault at 100% of compressing.

UPDATE: I just have got the same segfault at the stage of 100% under FreeBSD 8.1 (squashfs-tools 4.0)

Seems like this is mksquashfs bug

share|improve this question
I have exactly the same issue Anton has reported. root@c1p8# mksquashfs /dir/ dir.sqfs -noI -noD -noF -noX -no-duplicates [===============================================================================‌​=====================/] 8556384/8556384 100%Segmentation fault As you can see I already tried with -no-duplicates option. Moreover, the final squashfs file is unusable: root@c1p8# ll -rw-r--r-- 1 root root 957203714044 Feb 14 16:12 dir.sqfs drwxr-xr-x 2 root root 6 Feb 14 22:14 test root@c1p8# mount -t squashfs dir.sqfs test/ -o loop mount: wrong fs type, bad option, bad superblock on /dev/loop0 – Marcolino Feb 14 at 21:19

Have you tried the newest version of squashfs-tools, 4.2? At least one version had an occasional bug with duplicate file detection. You could also try passing the '-no-duplicates' argument to mksquashfs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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