Wednesday, December 13, 2006

Customizing SLAX - part 2

Continuing my adventure on customizing SLAX, in this installment I want to modify existing SLAX module. The target module is 01_kernel.mo.

Here are the steps I took to unpack the module :

- Install squashfs kernel module. I got a pre-compiled kernel module
(squashfs-kmp-default-3.0_2.6.16.12_3-0.rs.200605040428.i586) for OpenSUSE at Robert Schiele's site.

- I install that kernel module :

# rpm -Uvh squashfs-kmp-default-3.0_2.6.16.12_3-0.rs.200605040428.i586.rpm

Because I am using a different kernel version than the binary version, I copy that module to my current kernel version directory :

# cp /lib/modules/2.6.16.12-3-default/updates/squashfs.ko /lib/modules/2.6.16.13-4-default/misc/

- Make sure file /lib/modules/2.6.16.13-4-default/modules.dep has the following entry :

/lib/modules/2.6.16.13-4-default/misc/squashfs.ko:

- Next, I load squashfs module :

# /sbin/modprobe squashfs

- After that I remove squashfs kernel module :

# rpm -e squashfs-kmp-default

- I create a temporary working directory for SLAX module :

# mkdir /tmp/mod

- Unpack SLAX module :

Change to SLAX tools directory :

# cd slax/tools

Unpack to /tmp/mod directory :
# ./mo2dir ../base/01_kernel.mo /tmp/mod/

And here is the content of that SLAX module :

# ll
total 24
drwxr-xr-x 2 root root 4096 2006-05-06 18:04 boot
drwxr-xr-x 3 root root 4096 2006-05-06 18:04 etc
drwxr-xr-x 3 root root 4096 2006-08-22 00:46 lib
drwxr-xr-x 2 root root 4096 2006-05-22 22:44 sbin
drwxr-xr-x 9 root root 4096 2006-05-22 04:55 usr
drwxr-xr-x 3 root root 4096 2006-08-22 00:46 var

Then you can remove the packages you want. :D

TODO :
I need to find out how to remove packages installed on the SLAX module easily. Creating a script to do that is not an option. :D

1 comment:

Unknown said...

Hi dear good going keep going
Good writing i have need this stuff. I shell very thanks full to you.If you have any other good stuff regarding this then please contact me (hack_you333@yahoo.com)