Zenwalk/Slackware : Build your own module
Wednesday, 14. February 2007, 03:03:46
slackware
I found this very helpful....from the Zenwalk forums........
----------
HOWTO Build Modules
Introduction:
First of all, a 'module' in live-cd context is the way to extend the live-cd to include user's applications. Obviously this is not a technichal definition but it's all you need to know to use them Wink
Actually a module is a compressed filesystem that will be merged with other modules by using UnionFS to appear like one big read/write filesystem. In case you want to know more read documentation at the bottom.
Building modules:
There are several ways to build modules.
1) Quick & dirty:
You can easily build a module by converting a Slackware/Zenwalk package into a module using the 'tgz2mo' command.
This way of building modules has the advantage that it is astonishing easy to get a program running on your live-cd as long as you have a package.
However if you are planning to include several application you'll end up with a great number of small modules, this will make the system boot slower and will consume more resources (each module consumes one loop, and loop are limited to 255).
2) Prefered way:
The prefered way to build a module is by following this steps:
1. Create a working directory
Code:
# mkdir -p /mn7/hda2/lamp
2. Install all software packages using this directory as root
Code:
# installpkg -root /mn7/hda2/lamp apache-x.x.x.tgz
# installpkg -root /mn7/hda2/lamp mysql-x.x.x.tgz
# installpkg -root /mn7/hda2/lamp php-x.x.x.tgz
3. Remove all unneeded files.
Code:
# rm -rf /mn7/hda2/lamp/usr/doc/*
4. Make any modifications you want.
Code:
# echo "Don't know what to change here ;-)" > /mn7/hda2/lamp/foo
5. Build the module
Code:
# cd /mn7/hda2/
# dir2mo lamp/ lamp.mo
This way of building modules requires a little more effort but gives you the oportunity to control the contents of your module and help to reduce the boot-time of your system by reducing the number of modules to load.
It's good to have related applications on the same module, this gives you the chance to easily find which module contains a given application in case you want to remove it or update it.
NOTE: Because of a known UnionFS bug and a loop error you can't build a module for anything inserted into a UnionFS system. That is while using the liveCD you can not build a module from any folder inside / except of those mounted partitions /mnt/hda5, /mnt/hdc2 and /mnt/memory/...
Go on and build your own modules!
Linux-live Tools:
tgz2mo: converts a Slackware package into a module.
Code:
# tgz2mo package.tgz module.mo
dir2mo: converts a directory structure into a module.
Code:
# dir2mo folder/ module.mo
Documentation:
UnionFS: http://www.unionfs.org/
SquashFS: http://www.artemio.net/projects/linuxdoc/squashfs/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment