SquashFS update

Ok, I'm having fun with this:

I have a squashfs.o that works in DSL 0.9.1, and will continue to work until DSL runs under a new kernel. It DOES NOT REQUIRE A NEW KERNEL. That's right. It's just a module, and you can plug it in just like any other module.

mksquashfs seems to work just fine with no extra libs.

I'm working on an experimental proof-of-concept design for a SquashFS DSL module. It will have all the benefits of both .dsl and .uci extensions, along with a feature stolen from .deb packages, but will not occupy much RAM at all.

Essentially, it gets mounted like a uci. Since the package for this is (and has to be) a dsl, mkwriteable is already run. Once the module is mounted, it is linked into the root filesystem, its user.tar extracted into your home dir, and /sdmrc run (the feature stolen from .deb packages - controlscripts). It also has /etc/init.d/sdm-config and /etc/rc5.d/S02sdm-config linking to that - ensuring that you can have .sdm - type modules on a liveCD.

Next on my agenda is to include scripts for dynamic loading of sdm's while on a living system, support for including the files on the myDSL menu, integration with the existing mydsl-load functionality of emelFM, and the ability to (drumroll, please) UNINSTALL!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

nice work

Can you tell us how you did it? Did you need to use the kernel source? Were other programs required to compile it beside gcc?

No prob.

Build environment:
switch /etc/apt/sources.list to testing sources
apt-get update
apt-get install make gcc g++

Linux kernel 2.4.26
Squashfs 2.1 patch
.config file from the Knoppix 3.4 ISO

extract kernel and patch
patch kernel
make clean
make config, enable squashfs as module, save
make dep
make bzImage
make modules
copy squashfs.o from {kernel source}/fs/squashfs/
build squashfs-tools
copy mksquashfs from {squashfs source}/squashfs-tools/

And that, my friends, is that. About one hour of useless buildprocess for one 18k file (After the first attempt with 2.4.27 - I grabbed the wrong kernel - I modified the makefile so that squashfs would be the first module built and ed after it was finished)

beginner's question

How exactly did you apply the patch? I don't seem to have a patch command on my 0.9.1 version of dsl, and it wasn't in the gcc1.dsl or the gnu-utils.dsl packages. I also didn't see it as a debian package. Everything else was very clear, though, thanks for sharing.

heh, forgot about that. ap

heh, forgot about that.

apt-get install patch

I think if you do that, though, it'll tell you which package patch is in.


I just figured out that SquashFS has exactly the same limitation as cloop: the number of loop devices. I haven't checked to see if I can expand the number of dev nodes occupied by loop.o, but it's not looking hopeful.

In other words, my work here might be for nought.

On the other hand, the work I've done does allow for uci-type extensions with the benefits of using a dsl (ie: the ability to have extra libraries in the root filesystem). I think gtk2.dsl would be a good candidate for conversion.

Why not use p7zip's LZMA to pack more in?

I presume you'll get more of everything on DSL (eg: Firefox 1.0 / Java).
Also, USR/Broadcom use it to pack more into embedded Linux.


kernel config -- loop device limits

this is a snip from the kernel source for 2.6, don't have 2.4 laying around ...

---- SNIP --- linux/drivers/block/loop.c --- line 27 -----
* Maximum number of loop devices now dynamic via max_loop module parameter.
* Russell Kroll 19990701
* Maximum number of loop devices when compiled-in now selectable by passing
* max_loop= to the kernel on boot.
* Erik I. Bolsų, , Oct 31, 1999
---- SNIP --- linux/drivers/block/loop.c --- line 32 -----

if i'm reading this correctly, and if it applies to 2.4 as well, .. you can pass a parameter to the module on load (or kernel at boot) that modifies the maximum number of loop devices up to 255 ... virtually eleminating the worry of running out, ... given you have the ram to support the inodes for each dev entry ;-)

(i simply grepped the source tree for loopback then looked for block device drivers .. i haven't messed with kerel source much in the past ... but maybe some day ...)

Joshua M. Murphy


yes you can pass the max_loop parameter at boot time..I use a piece of forensic software that needs a lot of loop devices to mount images..so I pass this parameter at boot time(edited lilo.conf)

w00t! I love you people.


I love you people.

Still, it doesn't pose a strong enough argument to use squashfs as a new "standard" for compressing DSL modules (IE: cloop is well-tested, squashfs is not. Additionally, there's the whole "running out of symlinks" problem with linking into the filesystem.)

On the gripping hand, one could split things up. Use squashfs for certain DSLs as UCI is used for tar.gzs; IE: only the really big ones need be handled.

Can this be downloaded somewhere?

I had about 300 MB of data I wanted to get onto a 256 MB USB key with DSL, and it'll all fit with the 300 MB in a SquashFS FS, but I can't mount the Squash image. Can your squashfs.o be downloaded somewhere? Either as just the .o file, or as a DSL package? Or should I just got through the process described above to build squashfs.o for myself?