Localized Keymaps for Slinky/VUMBOX

Installing REDHAT - LINUX using the Slinky-Installer v0.3.97 from the RULE-Project uses the internal US-keymap bindings of the kernel. Take the following steps to be able to use localized keymaps while installing.

Hint: all used paths are relative to the slinky-development-directory. Set a shell-variable like: SLINKY=slinky-devel-directory.

  1. We need a busybox that knows about the commands dumpkmap and loadkmap. It's a bit tricky to build because first we need uclibc, a lightweight C-library in order to keep busybox small. I followed the explanation in Making Linux Installation Disks for Fun and Profit. Copy this new busybox to $SLINKY/filesystem/bin/busybox (<SHIFT>-<RIGHT-BUTTON>save target as).
  2. Next create a symbolic link from busybox to loadkmap:
    cd $SLINKY/filesystem/sbin
    ln -s ../bin/busybox loadkmap
    
  3. Now create the keymaps. This is done on your development-system. You have to load the desired keyboard mapping in your running kernel and use the new busybox to dump it to a keymap.
    loadkeys map-file (look for e.g. de-latin1-nodeadkeys.map[.gz],
                       there are many predefined keyboard definition files)
    busybox dumpkmap >new_binary_kmap
    
  4. Copy these keymaps to a new directory $SLINKY/filesystem/etc/i18n. I used the name that is mentioned in the busybox-manpage. I created de.map (german) and fr.map (french).
  5. To load these keymaps add the following code just after sourcing of /scripts/slinky.config at the beginnig of $SLINKY/filesystem/scripts/setup.sh.
    echo "Loading keymaps"
    cd /etc/i18n
    ls | grep -n '.'
    echo "Enter number for language to select"
    echo -n "or RETURN for default us keymap "
    read num
    keymap=`ls | grep -n '.' | grep "^${num}:" | cut -d: -f2`
    if [ -r /etc/i18n/${keymap} ]
    then
        /sbin/loadkmap < /etc/i18n/${keymap}
        echo "keymap <${keymap}> loaded" | tee -a ${install_log}
        echo "You can try your keys now, continue  with RETURN"
        read x
    else
        echo "Unknown keymap <${keymap}>, using default" | tee -a ${install_log}
    fi 
    cd /
    

    It works this way: ls | grep -n '.' creates an alphabetical orderd list of all files in /etc/i18n with a counter in front of each line. Enter this number to select the keymap. The code should be independent of the number of keymaps. (This code only makes sense if there is at least one mapfile.)

Now you can generate a new bootdisk and copy the image to a floppy:

cd $SLINKY
./makedisk.sh
dd if=$SLINKY/slinky-images/_version_/_image_ of=/dev/fd0 bs=512

The changes are at the beginning of the installation. You can test it without actually installing.


Franz Zahaurek