LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-06-2009, 05:38 PM   #16
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 17

Quote:
EDIT
actually none of the ascii codes that i pass works...
you must be using a different shell than I am. check your
shell docs to see how to properly pass character escape codes.
 
Old 08-08-2009, 12:50 AM   #17
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by epilitimus View Post
you must be using a different shell than I am. check your
shell docs to see how to properly pass character escape codes.
My host is slackware, I am using bash 3.1 there.
The chroot environment is using bash 3.2.

once I chrooted I change to bash and I still get blank when passing your command, here a log of all what im doing:
Quote:
[/home/raptorx]$ echo $0
bash

[/home/raptorx]$ bash --version
GNU bash, version 3.1.17(2)-release (i486-slackware-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

[/home/raptorx]$ echo -e "\151"
i

[/home/raptorx]$ chroot "$LFS" /usr/bin/env HOME=/root TERM="$TERM" PS1="[\w]\$ " PATH=/bin:/usr/bin:/sbin:/usr/sbin:. /bin/bash --login

[/]$ echo $0
/bin/bash

[/]$ echo -e "\151"
\151
I could not check the version on the chrooted system because I cant type the "i" in version. but I downloaded from http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz so I know the version.
 
Old 08-09-2009, 12:29 AM   #18
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 17
Quote:
[/home/raptorx]$ chroot "$LFS" /usr/bin/env HOME=/root TERM="$TERM" PS1="[\w]\$ " PATH=/bin:/usr/bin:/sbin:/usr/sbin:. /bin/bash --login

[/]$ echo $0
/bin/bash
Since your output includes an 'i' (in /bin/bash) the problem is clearly not on the output side which means it has to be on the input side.

I would try writing a program to read keys and display the ascii code. That way you can see if the problem is in the console driver or the shell (at this point I'm betting on the shell but best to check).
 
Old 08-09-2009, 12:37 AM   #19
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 17
better idea...use showkey -s, then showkey -k, then showkey -a
 
Old 08-10-2009, 01:31 PM   #20
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
It is weird, actually showkey -[s,k,a], all seem to give me correct response inside the chrooted environment.

All of them give me the correct codes for i. So the keyboard driver is working fine and the "i" is correctly assigned... this are my outputs:

Quote:
[/home/raptorx]$ showkey -s
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x9c
0x17 0x97
[/home/raptorx]$ showkey -a

Press any keys - Ctrl-D will terminate this program

i 105 0151 0x69
^D 4 0004 0x04
[/home/raptorx]$ showkey -k
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode 28 release
keycode 23 press
keycode 23 release
[/home/raptorx]$
that is in the slackware environment.
and this is when chrooted in to $LFS:

Quote:
[/mnt/lfs]$ chroot "$LFS" /usr/bin/env HOME=/root TERM="$TERM" PS1="[\w]\$ " PATH=/bin:/usr/bin:/sbin:/usr/sbin:. /bin/bash --login
[/]$ showkey -a

Press any keys - Ctrl-D will terminate this program

i 105 0151 0x69
^D 4 0004 0x04
[/]$ showkey -s
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x9c
0x17 0x97
[/]$ showkey -k
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode 28 release
keycode 23 press
keycode 23 release
[/]$
so I really dont understand it. I will reinstall bash, and I will also reinstall man since man is also not working. I will write back if anything new happens.
 
Old 08-10-2009, 02:09 PM   #21
legine
LQ Newbie
 
Registered: Apr 2008
Posts: 10

Rep: Reputation: 0
Realy odd thing. If it doesnt help maybe copying the same version over as you use in the nonrooted system?

Compare /etc, maybe there is some difference...

But that are just shots in the blue. Some info is missing to get you on track

Good Luck
Legine

[edit] maybe the console is just not showing the missing symbols when typing?

Last edited by legine; 08-11-2009 at 12:51 AM.
 
Old 08-11-2009, 03:45 PM   #22
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 17
pretty much everything is pointing to the shell. you might try a "ps aux" to make sure nothing unexpected is running, and go through all the bash setup files (global and local) with a fine tooth comb to make sure you understand everything that's in them.

but I would probably start with a rebuild too. Watch the build for any errors or warnings that might be relevant, assuming you don't go cross eyed first:}
 
Old 08-12-2009, 12:43 AM   #23
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by epilitimus View Post
but I would probably start with a rebuild too. Watch the build for any errors or warnings that might be relevant, assuming you don't go cross eyed first:}
The odd thing is that after i built the system and installed bash it was working fine, everything started AFTER i tried to startup my system. I got a kernel panic about some sata drivers and since then i got that. I am not able to reinstall bash because i cannot type or copy/paste "make install...

funny isnt it?
the letter that is missing becomes "essential" after you cannot use it anymore... how many times dont i write commands without "i"... now i needed every time i type.

Last edited by RaptorX; 08-12-2009 at 12:44 AM.
 
Old 08-13-2009, 03:24 PM   #24
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 17
Quote:
Originally Posted by RaptorX View Post
The odd thing is that after i built the system and installed bash it was working fine, everything started AFTER i tried to startup my system. I got a kernel panic about some sata drivers and since then i got that. I am not able to reinstall bash because i cannot type or copy/paste "make install...
SATA is usually used for hard drives so a driver crash could corrupt data on the hard drive, and if that crash happened when bash was being loaded...just because I'm paranoid doesn't mean they not out to get me

Quote:
Originally Posted by RaptorX View Post
funny isnt it?
the letter that is missing becomes "essential" after you cannot use it anymore... how many times dont i write commands without "i"... now i needed every time i type.
Like that piece of food that gets stuck in you teeth that you can't get out.

can you write a shell script with the appropriate commands in the non-chroot environment stick it in the directory structure for the chroot environment, then chroot and execute the shell script? Assuming of course you don't use and 'i' in the name of the shell script, which means 'build' is out.
 
Old 08-13-2009, 05:01 PM   #25
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by epilitimus View Post
SATA is usually used for hard drives so a driver crash could corrupt data on the hard drive, and if that crash happened when bash was being loaded...just because I'm paranoid doesn't mean they not out to get me


Like that piece of food that gets stuck in you teeth that you can't get out.

can you write a shell script with the appropriate commands in the non-chroot environment stick it in the directory structure for the chroot environment, then chroot and execute the shell script? Assuming of course you don't use and 'i' in the name of the shell script, which means 'build' is out.
actually a great idea... why I didnt come up with that one...!
well is ok you can be more experienced than me from time to time, next time I give you a cool idea and you have to admire my wisdom... no really im tired, im just talking rubish here, I will try tomorrow.

Thanks for the help!
I've learned a lot with this one.
 
Old 08-17-2009, 12:06 PM   #26
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
thanks epilitimus for your help, this is solved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
chroot problem aditya_gpch Linux From Scratch 2 05-08-2008 10:58 AM
chroot to run hd-installed distro's programs from chroot in live distro? silencestone Linux - Software 0 10-12-2007 06:29 AM
chroot problem bujecas Linux - General 1 01-02-2006 05:09 AM
chroot problem rjkfsm Linux - Software 1 07-19-2005 10:46 AM
problem with chroot ef_ Linux - Security 6 10-14-2004 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:34 AM.

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