How can the /lib/modules Slitaz kernel modules be uncompressed?
They are definitely not gzipped and unlzma doesn't seem to work,
so how do I uncompress them?

Module compression in Slitaz
(12 posts) (3 voices)-
Posted 13 years ago #
-
# busybox unlzma -c /pathto/module.ko.gz > module.ko
Posted 13 years ago # -
Thank you Pascal.....how can you go about uncompressing the whole /lib/modules/ sudirectories
in one shot? how do you do it recursively?Posted 13 years ago # -
And the purpose behind this is...? They work perfectly fine with modprobe compressed.
Posted 13 years ago # -
@Trixar-za
I'm experimenting with linux live scripts creating a system that lives on aufs compressed by squashfs, which is why I need to uncompress these modules. I have just a few left in there anyway, as I'm customizing my slitaz specifically for my system only. There is usually a good reason for doing things, T..., try to keep an open mind.
Posted 13 years ago # -
Not that you'll get a better compression except with xz, but you could try reverse engineering this:
http://murga-linux.com/puppy/viewtopic.php?t=63971&sid=c6eb885e3cb7b2452e6df437b9b85acfSince my find-fu isn't that good I can't help you generate the right one for it (could probably be done with sed or a perl script too)
Posted 13 years ago # -
Thanks....interesting thread.
I've tried renaming them all to *.ko.lzma with the intention of later using unlzma on them recursively with:find /path/to/lib/modules/2.6.30.6-slitaz/kernel -type f -name '*.gz' -print0 | xargs -0 rename 's/.gz$/.lzma/'
(all in one line, one command)
to no avail....the command seems to work without error but nothing happens to the file extensions...
heck, not even a direct 'mv module.ko.gz module.ko.lzma' works there.....(why is that?)I guess we'll have to wait for Pascal....he knows....I'm not in a rush with this anyway...
Posted 13 years ago # -
# find /path/to/lib/modules/2.6.30.6-slitaz/kernel -type f -name '*.ko.gz' | while read m; do busybox unlzma -c $m > ${m%.gz} && rm -f $m; done; depmod -a -b /path/to
Posted 13 years ago # -
Thank you so very much, Pascal! :)
And can you also give the command for recompressing them back to their original form recursively?
This is very much appreciated.Posted 13 years ago # -
Why not just use the script in the puppy linux thread?
Posted 13 years ago # -
Posted 13 years ago #
-
Thank you! This is excellent! :) :) :)
Posted 13 years ago #
Reply
You must log in to post.