Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The above link outlines the `loadkeys` command, which apparently loads the keymap you choose.
Now, I don't use RHEL, so I can't point you to exactly where this action takes place during boot, but I suspect it would be done in one of the init scripts located somewhere like /etc/rc.d or /etc/init.d or similar location.
Verify that the keymap you wish to load is actually present where it should be, and/or use the -d option to specify the default keymap, assuming en_us is the default and that is what you wish to use.
I'm sorry if this isn't enough info to point you in the right direction, but another member with RHEL experience will hopefully be able to fill in the blanks for you in time.
I know the command "loadkeys -d" can load default keymap.
but i dont know why the error as metioned before occoured (loading default keymap [failured])
i checked the inital file which located in /etc/rc.d/rc.sysinit but I cant find the error.
part of rc.sysinit are as below:
# Configure kernel parameters
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
if [ -x /bin/loadkeys ]; then
if [ -f /etc/sysconfig/console/default.kmap ]; then
if [ -f /etc/sysconfig/keyboard ];then
if [ -n "$KEYTABLE" -a -d "/lib/kbd/keymaps" ];then
Ok, first, let me suggest you put such chunks of code into [code] tags, so it makes it a little easier to read.
Now, It looks like you're looking into the right place, to start figuring out WHY you're getting the error. Let's break down what's happening in that file, and I would like YOU to verify that each step is true for your system. For example, if the script is checking to see if a file exists somewhere, then YOU should go on your system and make sure the file does exist. Follow this pseudocode:
Checks if /bin/loadkeys is executable. If it IS executable, then define a couple variables..
..and check if there's a file called /etc/sysconfig/console/default.kmap and if there is, set KEYMAP=that file..
..if there's no such file, see if there's a file called /etc/sysconfig/keyboard and if there is,
then include that file into here.
Now, if $KEYTABLE is not an empty variable at this point, AND
there's a directory called /lib/kbd/keymaps THEN set KEYMAP="$KEYTABLE.map"
Now, if $KEYMAP is not an empty variable, THEN
if $KEYTABLE is not an empty variable, THEN
tell the user $"Loading default keymap ($KEYTABLE): "
otherwise, $KEYTABLE IS empty variable, so tell the user echo -n $"Loading default keymap: " instead.
define LOADKEYS=loadkeys #this is poor coding -- it should be LOADKEYS=/bin/loadkeys
check if LANG equals some incarnation of "utf8", and if so..
then LOADKEYS="loadkeys -u" # again, this should be "/bin/loadkeys -u" in my opinion.
Now, we're executing the loadkeys command, because theoretically at this point, our variables are set to something useful:
$LOADKEYS $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \
success $"Loading default keymap" || failure $"Loading default keymap" # it looks like this line is what puts the error
message on your screen, which means that
evidently, something was NOT set
to something useful as it should be.
So, you must follow each step of the code, and check that what the code is doing, is producing the result that it should be. The error message is telling you that something's gone wrong finding the default keymap.
You have the 'loadkeys' executable, so that's fine. However:
If you do not have the file "default.kmap" and you do not have the file "/etc/sysconfig/keyboard", OR either of those files is empty or misconfigured, then things go downhill from there, likely leading to the error.
Try adding some `echo` statements to this script, to check each stage of the process.
For example, after the line:
put something like:
to see what $KEYMAP equals.
Do that until you determine where the trouble is being created.
You appear to have already determined at least *part* of the problem: you say that default.kmap does not exist, and /etc/sysconfig/keyboard does not exist either. My suggestion is to make it so that one of these exists, and try again.
As to how to get the stuff you need, into these locations, I suggest check the documentation for the OS, use Google, or search the RedHat or Enterprise forums here on LQ, to see what's supposed to be there.