ArchiveOrangemail archive

Developers' List


dev.lists.pcbsd.org
(List home) (Recent threads) (7 other PC-BSD lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • Low traffic list: less than 3 messages per day
  • This list contains about 745 messages, beginning Jan 2007
  • 0 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

Squashfs for LiveCDs

Ad
Dave Vasilevsky 1340829265Wed, 27 Jun 2012 20:34:25 +0000 (UTC)
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
Kris Moore 1340851788Thu, 28 Jun 2012 02:49:48 +0000 (UTC)
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 MooreOn Jun 27, 2012, at 4:33 PM, Dave Vasilevsky  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
> 
> http://lists.pcbsd.org/mailman/listinfo/dev--
Kris Moore

On Jun 27, 2012, at 4:33 PM, Dave Vasilevsky  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
> 
> http://lists.pcbsd.org/mailman/listinfo/dev
Dave Vasilevsky 1340852668Thu, 28 Jun 2012 03:04:28 +0000 (UTC)
On Wed, Jun 27, 2012 at 10:49 PM, Kris Moore  wrote:
> 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.I had SetupLive.sh kldload it. The image mounted just fine as far as I
can tell, when I got a command line I could run programs from it and
all. Just Xorg would fail.

> 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 :)

I can understand that! Judging from this thread, some folks aren't too
enthusiastic about adding it to HEAD:
http://lists.freebsd.org/pipermail/freebsd-cu...
. On the other hand, there are a ton of FUSE-based ports, so clearly
some people are interested in FUSE staying kinda-mostly-supported.

Dave
Luca Ferrari 1341469486Thu, 05 Jul 2012 06:24:46 +0000 (UTC)
Sorry, this was meant to go to the list....

May I ask why PCBSD is getting trouble fitting a single DVD? I mean,
other Linux distribution, even including the KDM are on a signle dvd
and besides theare are many distributions that are shipped on few
mediums. Is this not acceptable for PCBSD?

Luca
Kris Moore 1341578724Fri, 06 Jul 2012 12:45:24 +0000 (UTC)
On 07/05/2012 02:24, Luca Ferrari wrote:
> Sorry, this was meant to go to the list....
>
> May I ask why PCBSD is getting trouble fitting a single DVD? I mean,
> other Linux distribution, even including the KDM are on a signle dvd
> and besides theare are many distributions that are shipped on few
> mediums. Is this not acceptable for PCBSD?
>
> Luca
> _______________________________________________
> Dev mailing list
> 
> http://lists.pcbsd.org/mailman/listinfo/devWe aren't really having trouble with it for the install DVD. The
packages on that disk are compressed with LZMA, and we still have ~1.0
of free space to spare. The problem has been the Live DVD, which was
using uzip compression, and after getting KDE4 on the media, there
wasn't a lot of room left over to do GNOME/XFCE4 & others. This may be
changing in the near future though, now that we have geom_uncompress
coming available, which uses LZMA as well.-- 
Kris Moore
PC-BSD Software
iXsystems
Home | About | Privacy