LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 09-03-2009, 01:57 AM   #1
larrysz
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Rep: Reputation: 0
loading default keymap failured


when i booting my linux server,apprence the failure as follow:

loading default keymap [failured]

however the server pass the failure and start up at last.
 
Old 09-03-2009, 10:35 PM   #2
larrysz
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
anyone can help me ???
 
Old 09-03-2009, 10:37 PM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
What distribution are you using? What is your default Keymap that you used?
 
Old 09-03-2009, 10:38 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hi there!

You need to provide much more information for someone to be able to help you

Please tell the members what Linux server OS you are running, what version, and on what hardware. And, what would be the default keymap you expect to be loaded?

Plus, an exact copy of the text of the error message(s) would be very helpful.

Thanks,
Sasha
 
Old 09-03-2009, 11:09 PM   #5
larrysz
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
thank you
and my linuxserver os is
redhat enterprise linux 5

#runame -r
2.6.18-53.1.6.el5

i want to use the
keyboardtpye="pc"
keytable="us"
as my /etc/sysconfig/keyboard configuered.

thank GrapefruiTgirl &
jstephens84
 
Old 09-03-2009, 11:39 PM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
http://man.sourcentral.org/RHEL5/1+loadkeys

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.

Cheers,
Sasha
 
Old 09-04-2009, 01:18 AM   #7
larrysz
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
thanks
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])
when booting.

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
update_boot_stage RCkernelparam
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1


if [ -x /bin/loadkeys ]; then

KEYTABLE=

KEYMAP=

if [ -f /etc/sysconfig/console/default.kmap ]; then

KEYMAP=/etc/sysconfig/console/default.kmap

else

if [ -f /etc/sysconfig/keyboard ];then

. /etc/sysconfig/keyboard

fi

if [ -n "$KEYTABLE" -a -d "/lib/kbd/keymaps" ];then

KEYMAP="$KEYTABLE.map"

fi

fi

if [ -n "$KEYMAP" ]; then

if [ -n "$KEYTABLE" ];then
echo -n $"Loading default keymap ($KEYTABLE): "

else

echo -n $"Loading default keymap: "

fi

LOADKEYS=loadkeys

if [ "${LANG}" != "${LANG%%.UTF-8}" -o "${LANG}" != "${LANG%%.utf8}" ]; then

LOADKEYS="loadkeys -u"

fi

$LOADKEYS $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \
success $"Loading default keymap" || failure $"Loading default keymap"

echo

fi

fi
-----------------------
 
Old 09-04-2009, 08:16 AM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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:
Code:
Checks if /bin/loadkeys is executable. If it IS executable, then define a couple variables..
   KEYTABLE=
   KEYMAP=
   ..and check if there's a file called /etc/sysconfig/console/default.kmap and if there is, set KEYMAP=that file..
      KEYMAP=/etc/sysconfig/console/default.kmap
   ..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.
     endif
endif
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.
 
Old 09-07-2009, 04:21 AM   #9
larrysz
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
first,I checked the file /bin/loadkeys
Code:
#ll /bin/loadkeys
#-rwxr-xr-x 1 root root 79412 oct 31 2006 /bin/loadkeys
second, I cant find
/etc/sysconfig/console/default.kmap
there is nothing under the floder /etc/sysconfig/console

is that produced the error?


sorry for absent these days
 
Old 09-07-2009, 08:47 AM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
The way I see it is this:

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:

KEYMAP=/etc/sysconfig/console/default.kmap

put something like:

echo $KEYMAP
exit 1


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.

Sasha
 
Old 09-09-2009, 12:51 AM   #11
larrysz
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
/etc/sysconfig/keyboard does exist
and the content is

keyboardtpye="pc"
keytable="us"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CENTOS, Loading default keymap after a yum update... sblantipodi Linux - Server 1 07-21-2009 02:09 PM
Centos- Loading default keymap after a yum update... sblantipodi Linux - Server 0 07-17-2009 06:18 AM
2007 freezes at boot-up on "Loading default keymap" EtherGhost Mandriva 1 11-06-2006 01:46 AM
loading keymap fail pingvina Linux - Software 1 01-05-2006 07:39 AM
Loading keymap xodeus Slackware 1 07-12-2003 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration