Thursday, December 21, 2006

Farewell to Year 2006 and Welcome to Year 2007

Dear kind readers,

We have already at the end of the Year 2006. And according to my computer time, in the next ten days we will have the new year.

There are so many great things that has happened to me during the year 2006, whether in my personal life or in my business life. And for that, I am very thankfull for The Mighty.

I will be in minimalist-blogging during the next two weeks, I will post articles when I have spare time.

Goodbye the Year 2006 and I am looking forward welcoming a wonderful Year 2007. There are so many fantastic things waiting to be happened in the Year 2007.

Finally, from the bottom of my heart I wish you a Merry Christmas and Happy New Year 2007.

See you in the Year 2007.

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

Thursday, December 07, 2006

Customizing SLAX - part 1

I am currently learning about how to produce live Linux CD system. Yes I know, this may be very old and very simple for you. But I haven't sharpen my Linux skills since a year and half. This will be a good practise.

I chose SLAX (www.slax.org) because the manual said it was developed to be hacked. So here I am customizing SLAX.

In the first part of the customization, I will remove a SLAX module and add several modules (antivirus, wiping utilities, hash utilities). That's look very easy. :D

Here are the steps I took to do my objectives :

- Download the SLAX base from http://slax.linux-live.org

- Download the required modules from the above site. The modules I downloaded are :

- ClamAV 0.88.4
- md5deep_sha1deep
- wipe

- After finish download SLAX base and its module, I copy the whole SLAX base to my working directory :

# mount -t iso9660 -o loop slax-5.18.iso /media/images
# mkdir /home/tedi/projects/slax
# cp -R /media/images /home/tedi/projects/slax
# chown -R tedi.users /home/tedi/projects/slax/*

- Then I change to the SLAX directory :

$ cd projects/slax

- Remove kde_office.mo module

$ rm base/08_kde_office.mo

- Move three modules to modules/ directory :

$ mv ~/*.mo modules/

Here is the content of the modules/ directory :

-rw-r--r-- 1 tedi users 6758400 2006-12-06 12:11 ClamAV_0_88_4.mo
-rw-r--r-- 1 tedi users 118784 2006-12-06 11:37 md5deep_sha1deep_etc_1_12.mo
-rw-r--r-- 1 tedi users 40960 2006-12-06 11:37 wipe_0_20_1-1.mo

- After that I create a new SLAX iso :

$ ./make_iso.sh ../slax-new.iso
INFO: UTF-8 character encoding detected by locale settings.
Assuming UTF-8 encoded filenames on source filesystem,
use -input-charset to override.
mkisofs 2.01 (i686-suse-linux)
Scanning .
Scanning ./base
Scanning ./boot
Scanning ./boot/DOS
Excluded by match: ./boot/isolinux.boot
Scanning ./devel
Scanning ./modules
Scanning ./optional
Scanning ./rootcopy
Scanning ./tools
Scanning ./tools/WIN
Writing: Initial Padblock Start Block 0
Done with: Initial Padblock Block(s) 16
Writing: Primary Volume Descriptor Start Block 16
Done with: Primary Volume Descriptor Block(s) 1
Writing: Eltorito Volume Descriptor Start Block 17
Size of boot image is 4 sectors -> No emulation
Done with: Eltorito Volume Descriptor Block(s) 1
Writing: Joliet Volume Descriptor Start Block 18
Done with: Joliet Volume Descriptor Block(s) 1
Writing: End Volume Descriptor Start Block 19
Done with: End Volume Descriptor Block(s) 1
Writing: Version block Start Block 20
Done with: Version block Block(s) 1
Writing: Path table Start Block 21
Done with: Path table Block(s) 4
Writing: Joliet path table Start Block 25
Done with: Joliet path table Block(s) 4
Writing: Directory tree Start Block 29
Done with: Directory tree Block(s) 11
Writing: Joliet directory tree Start Block 40
Done with: Joliet directory tree Block(s) 10
Writing: Directory tree cleanup Start Block 50
Done with: Directory tree cleanup Block(s) 0
Writing: Extension record Start Block 50
Done with: Extension record Block(s) 1
Writing: The File(s) Start Block 51
5.51% done, estimate finish Wed Dec 6 23:23:06 2006
11.03% done, estimate finish Wed Dec 6 23:23:15 2006
16.55% done, estimate finish Wed Dec 6 23:23:30 2006
22.05% done, estimate finish Wed Dec 6 23:23:28 2006
27.56% done, estimate finish Wed Dec 6 23:23:27 2006
33.08% done, estimate finish Wed Dec 6 23:23:30 2006
38.58% done, estimate finish Wed Dec 6 23:23:29 2006
44.10% done, estimate finish Wed Dec 6 23:23:30 2006
49.60% done, estimate finish Wed Dec 6 23:23:32 2006
55.13% done, estimate finish Wed Dec 6 23:23:33 2006
60.63% done, estimate finish Wed Dec 6 23:23:34 2006
66.15% done, estimate finish Wed Dec 6 23:23:36 2006
71.65% done, estimate finish Wed Dec 6 23:23:35 2006
77.17% done, estimate finish Wed Dec 6 23:23:37 2006
82.67% done, estimate finish Wed Dec 6 23:23:37 2006
88.19% done, estimate finish Wed Dec 6 23:23:37 2006
93.69% done, estimate finish Wed Dec 6 23:23:36 2006
99.20% done, estimate finish Wed Dec 6 23:23:37 2006
Total translation table size: 2048
Total rockridge attributes bytes: 7043
Total directory bytes: 18432
Path table size(bytes): 134
Done with: The File(s) Block(s) 90525
Writing: Ending Padblock Start Block 90576
Done with: Ending Padblock Block(s) 150
Max brk space used 0
90726 extents written (177 MB)

- To test the new iso, I use "qemu" :

$ cd
$ qemu -cdrom slax-new.iso -boot d

- When the new SLAX started, I login and check whether the new modules are there, and yes they are.

- Time to celebrate.... :d

In the next installment, I will try to modify existing modules and add several more application to SLAX.

Until next time

Practise My Linux Skills

I feel my Linux skills have become a little bit rusty. To resharpen my Linux skills, I am planning to develop a simple Linux Live-CD.

Here are several Linux Live-CDs that I am researching on :

I will write about my experiences in this blog. So keep on checking....