[PC-BSD Dev] Squashfs for LiveCDs

Kris Moore kris at pcbsd.org
Wed Jun 27 19:49:46 PDT 2012

This looks pretty cool. I'm always eager to find ways to save space on the install disks. When you had this bug, did you check to make sure the FUSE module was loaded first? We don't load this on the install media by default.

Do you know if this is going to go into the port here in the near future? I would love to include it, but usually try to not use too many unsupported patches :)

Kris Moore

On Jun 27, 2012, at 4:33 PM, Dave Vasilevsky <dave at vasilevsky.ca> wrote:

> Hi there,
> I recently wrote squashfuse[1], a port of Linux's squashfs[2]
> compressed filesystem to FUSE.
> It could be useful for PC-BSD liveCDs, since it compresses better and
> faster than ulzma. When I take the .uzip file inside
> PCBSD9.0-x64-DVD-live.iso and recompress with ulzma and squashfs,
> squashfs saves about 300 MB over ulzma, a 21% savings. I can go into
> other advantages/disadvantages in more detail if anyone is interested.
> Based on the above ISO, I tried building a squashfuse version, a short
> outline of how I did it is below[3]. When I tested in VMware, it
> booted, mounted the squashfs image, and command-line programs ran just
> fine. However, X failed to start, with the error:
>   vm_fault: "pager read error, pid 1814 (Xorg)"
> Adding RAM to the VM, as suggested in IRC, didn't seem to help at all.
> Any ideas what could be going wrong?
> Bonus! While testing this out, I created a couple of utilities you might like:
> * fuse-uzip: Makes what's inside a uzip or ulzma image accessible to
> any OS that has FUSE, not just FreeBSD. You'll still need a driver for
> the filesystem, of course.[4]
> * uzip2ulzma: Converts a uzip image directory to ulzma, without
> needing to attach it with mdconfig first. Multi-threaded, for fast
> parallel compression.[5]
> Cheers,
> Dave Vasilevsky
> [1] https://github.com/vasi/squashfuse
> [2] http://squashfs.sourceforge.net/
> [3] Building a squashfs ISO:
> * Build the FUSE kernel module using the patch here:
> http://people.freebsd.org/~gnn/ . (The version in ports is no good,
> it's missing mmap support.) Place fuse.ko in the CD's /boot/kernel/.
> * Build squashfuse, making sure to statically link to most libraries.
> Place the executable in the mfsroot.
> * Create a squashfs image: Install the squashfs-tools port, mount
> PCBSD.ufs.uzip, run 'mksquashfs /mnt/point PCBSD.squashfs -comp xz -b
> 1m'. Replace the .uzip file with the .squashfs one on the CD.
> * Modify SetupLive.sh in the mfsroot so it uses squashfs instead of uzip.
> [4] https://github.com/vasi/fuse-uzip
> [5] https://github.com/vasi/uzip2ulzma
> _______________________________________________
> Dev mailing list
> Dev at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/dev

More information about the Dev mailing list