1

I have a problem with my Linux device. After the boot-up sometimes the shell show me only this < character, I can run normal shell commands like ls/cat etc, but it shows me only 1 character. When I'm doing an echo I can see all the row (so only the input has the issue of 1 character).

This is the example of my terminal after I executed the pwd command:

<d
/home/root
< 

At the boot-up the device ran many shell scripts, so at the begging I thought was some script that didn't finish, but if a script is stack, I shouldn't be able to run normal shell command (I think). It's happening around 10% of the boot-up. If I ran echo $PS1:

<1  
\u@\h:\w\$
< 
echo $PS2 : $PS3 : $PS4   =>   > : : +      

It seems correct. I could access by ssh and the system looks good, I tried to kill many service/process to check if the prompt will recover, but I can recover the system if I write 'exit' in the prompt or I kill /bin/login -f or kill -sh processes (it will show me the username@machine). I tried control+D first time and it failed with

<logout   There are stopped jobs.
The second time I pressed control+D I logout and automatic login,
login: root (automatic login)
and now it's in a good state (root@device:~#)

Has someone any suggestion that I can try? Does someone know why there is that character? there is a way to see the last commands executed to try to understand how the device finished in that status?

I don't think is a problem of the terminal, because depends of the boot sometime work and sometime no. I ran printf '%s\n' "$COLUMNS":

6 

My TERM environment variable:

TERM =   @BAUDRATE@

And stty -a:

speed 115200 baud;
rows 13; columns 6;
line = 0;
intr = ^C;
quit = ^\;
erase = ^?;
kill = ^U;
eof = ^D;
eol = <undef>;
eol2 = <undef>;
swtch = <undef>;
start = ^Q;
stop = ^S;
susp = ^Z;
rprnt = ^R;
werase = ^W;
lnext = ^V;
flush = ^O;
min = 1; time = 0;
-parenb
-parodd
cs8
hupcl
-cstopb
cread
clocal
-crtscts
-ignbrk
-brkint
-ignpar
-parmrk
-inpck
-istrip
-inlcr
-igncr
icrnl
ixon
ixoff
-iuclc
-ixany
-imaxbel
iutf8
opost
-olcuc
-ocrnl
onlcr
-onocr
-onlret
-ofill
-ofdel
nl0
cr0
tab0
bs0
vt0
ff0
isig
icanon
-iexten
echo
echoe
echok
-echonl
-noflsh
-xcase
-tostop
-echoprt
echoctl
echoke
Damian
  • 11
  • 1
    [Edit] your question with the outputs of running printf '%s\n' "$COLUMNS", tput co, and stty -a, and with the value of your TERM environment variable when this happens. You might even be able to self-answer if you press Control+A and Control+E (or the vi mode equivalents) in the command-line editor and read https://unix.stackexchange.com/a/567575/5132 . – JdeBP Sep 28 '20 at 14:35
  • HI @JdeBP, i modify the question. I have used others sw serial interface, and the problem is the same. i don't have tput command, and ctrl+A and ctrl+E is not changing anything. – Damian Sep 28 '20 at 15:12
  • 1
    You've tagged this question bash and mention "bash commands", but you also mention "device". Many embedded Linux setups do not use bash (which is rather large). – mattdm Sep 28 '20 at 15:20
  • @mattdm yes, you are right. it's not bash I corrected – Damian Sep 29 '20 at 08:27

0 Answers0