This document shows how to create a localized version of Knoppix without remastering Knoppix. Because no remastering is needed it is very easy to make a Knoppix version that uses your desired language settings as default. But it also limits your choice to the languages Knoppix already supports, you only change the default. If you want to make changes to the installed Software please see Customising FAQ.
The settings we are going to change all reside on the 1.44MB boot image which is inside the iso image. knoppix-customize allows to make changes to the boot image inside the iso and to a seperate boot image that can be used to create a boot floppy. knoppix-customize is a command line tool that can be used under GNU/Linux and Windows.
Now let's look at the required steps to localize a German Knoppix iso image for spanish speakers. I assume you've got the downloaded iso image on harddisk, named KNOPPIX_V3.2-2003-04-18-DE.iso.
Set variable to image file, to make things easier:
$ IMAGE=KNOPPIX_V3.2-2003-04-18-DE.isoTo completely localize Knoppix, we need to do the following things. Of course it's up to you if you want to take every step. Sometimes it may be enough just to set the language for the main system.
Change the "lang=xx"-option in the APPEND-option of syslinux.cfg. This is passed on to the kernel and will set environment variables and make applications use the right language:
$ echo "lang=es" | knoppix-customize --image $IMAGE --action set_append_opt
Exchange the keyboard-map for syslinux. This keymap is used when entering commands at the bootprompt. When the system is started later the proper new map will be loaded according to the settings from the previous step.
Create a lilo-keymap file (this is also used by syslinux) for your language:
$ /usr/sbin/keytab-lilo es > es.kbd
![]() |
What's keytab-lilo? |
---|---|
|
$ knoppix-customize --image $IMAGE --action import_file --image_file es.kbd --local_file es.kbd
![]() |
Error? |
---|---|
Sorry, at the moment it isn't possible to create new files in the image. so please use the method described next. |
![]() |
On filenames |
---|---|
Be careful to choose a filename on the image that is DOS (8.3) compatible. |
$ echo "KBDMAP=es.map" | knoppix-customize --image $IMAGE --action set_syslinux_opt
![]() |
On disk space |
---|---|
In case there isn't enough space you can overwrite the original file, then you don't need to change the KBDMAP-option. But the result may be irrating to someone who examines the CD. Unfortunatly renaming or removing files is not yet supported in knoppix-customize. I hope to add the possibility to rename files soon Overwrite original kbd-file: $ knoppix-customize --image $IMAGE --action import_file --image_file german.kbd --local_file es.kbd |
Exchange the boot message and help file. This is the message we see directly after inserting the CD and the help screen you get, when pressing F2.
Check which files are inside the boot image:
$ knoppix-customize --image $IMAGE --action list syslinux.cfg german.kbd logo.16 boot.msg f2 miniroot.gz vmlinuz
Export the files you want to change:
$ knoppix-customize --image $IMAGE --action export_file --image_file boot.msg --local_file . $ knoppix-customize --image $IMAGE --action export_file --image_file f2 --local_file .Now you may edit the files according to you wishes.
![]() |
What are these strange symbols? |
---|---|
The files use the bios vga font, so it may help you using this font when editing: $ xterm -fn vga -e vi boot.msg f2If you haven't got this font you may still change the files. On debian the font is in the package xfonts-dosemu. |
Now re-insert the modified files into the image:
$ knoppix-customize --image $IMAGE --action import_file --image_file . --local_file boot.msg $ knoppix-customize --image $IMAGE --action import_file --image_file . --local_file f2
![]() |
Wrong filesize? |
---|---|
At the moment knoppix-customize still has the serious limitation that the file size may not change at all. So make sure the files have exact the same size after editing as before. Some time, I hope to remove this limitation. (This is no problem for the keymap file above, as that is alwas 256 Bytes). |
Exchange boot logo. If you want to start with the logo in the CD, extract it. You may skip this step and overwrite the logo with your own logo.
$ knoppix-customize --image $IMAGE --action export_file --image_file logo.16 --local_file .To edit the logo, convert it to ppm:
$ lss16toppm < logo.16 > logo.ppmNow edit the logo from the CD (you may use any bitmap image manipulation program)
$ gimp logo.ppmConvert it back to the format requiredd by syslinux
$ ppmtolss16 < logo.ppm > logo.16
![]() |
Wrong format? |
---|---|
If the last line doesn't work, a comment mark in line maybe the reason. You can remove it and proceed (check the file for a # at the beginning of a line and make sed delete line 2, if that's where the comment is) $ sed '2d' logo.ppm | ppmtolss16 > logo.16 |
$ giftopnm < logo.gif > logo.pnm $ ppmtolss16 < logo.pnm > logo.16If you have problems, see note above. Re-insert logo into the image:
$ knoppix-customize --image $IMAGE --action import_file --image_file . --local_file logo.16
![]() |
Wrong filesize? |
---|---|
As montioned above, knoppix-customize still has the serious limitations that the file size may not change at all. For the image this is a bigger problem than for the text files. One solution is to create a smaller logo and pad it with zeros: $ dd if=/dev/zero bs=1 count=541 >> logo.16Of course you'll have to choose the right number of missing bytes as value for count. |
![]() |
Burn CD for each test? |
---|---|
Instead of on an ISO image you may perform these steps on a floppy boot image. So you can test boot without burning a CD every time: $ knoppix-customize --image $IMAGE --action export_floppy --local_file boot.imgNow you can do all steps with "--image boot.img" and then put it on floppy: $ dd if=boot.img of=/dev/fd0 bs=18kYou may even modify the floppy directly using "--image /dev/fd0". Test boot your floppy and when you're ready to burn the image insert the boot.img again: $ knoppix-customize --image $IMAGE --action import_floppy --local_file boot.img |
2003-04-27, Kester Habermann
<
kester@linuxtag.org>
.