After squashing a gentoo system (without /usr/portage) I found that my squashfs images could not be read via mount or mksquashfs for appending new data. I found this in my kernel logs. Apr 16 15:28:09 [kernel] SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd Keep in mind in squashing the data into a loopback device to a very large file (more space then mksquashfs needs to write compressed data and inode tables). This bug has only recently appeared, all past squashings of this gentoo system have worked out perfectly. Reproducible: Sometimes Steps to Reproduce: 1. mksquashfs /path/to/gentoo/ /dev/loop0 -info -noappend -no-duplicates -check_data -e tmp/ proc/ sys/ usr/portage/ var/tmp/portage/ 2. mount -t squashfs /dev/loop0 /mnt/cdrom Actual Results: mount: wrong fs type, bad option, bad superblock on /dev/mapper/livecd-image, or too many mounted file systems Expected Results: A working squashfs image. Gentoo Base System version 1.4.16 Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3400+ Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 03:24:22)] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-pipe -O3 -march=k8" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -O3 -march=k8" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aac acpi alsa berkdb bitmap-fonts cdr crypt curl dvd encode esd fam flac font-server fortran gif gpm gstreamer gtk gtk2 imlib ipv6 java jp2 jpeg lzw lzw-tiff mad motif mozilla mp3 multilib ncurses network nls ogg oggvorbis opengl pam perl png python readline samba sdl softmmu speex spell sqlite ssl tcpd theora tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xml xml2 xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
What if you use a lower revision kernel? Have you updated your kernel recently? Basically, are you sure it isn't the kernel, but is the mksquashfs application?
I've been using -r6 for a while now and this bug just recently appeared.
I narrowed the issue down to when I go over some amount of files or total bytes inputed into mksquashfs it generates an invalid squashfs image.
What's the largest file you've done? I've been doing 700MB images and it's been working fine, so I'd like to try to narrow this down and report it upstream.
I was making working squashfs images with 1.2-1.4Gb system directories. The problem popped up around 1.8Gb.
I just added squashfs-tools 2.2 into portage. Can you see if this resolves your problem, please?
There's a 2.2 and a 2.2_p2 ebuild in portage. Please respond if these don't resolve the issue.
I tested them, they work perfectly.