Page 1 of 1

Cannot open nano in boot shell

Posted: Sun Mar 10, 2019 12:20 pm
by TerryC65
Earlier this week I downloaded and installed the latest Raspbian image from the Downloads page (2018-11-13-raspbian-stretch-full.img) and installed it onto an SD Card for use in a new project. The target device is a Pi Zero but I used my Pi 3 to perform all the updates before plugging the card into the Zero.

As far as my project is concerned, everything is working fine, but when I try to open nano in the initial boot shell, I get:

Code: Select all

error opening terminal: unknown
If I open a shell and type nano within the desktop, everything works.

What is going on here? I've always used nano on earlier projects and had no issues as far as I can recall.

Re: Cannot open nano in boot shell

Posted: Sun Mar 10, 2019 1:26 pm
by scruss
You get that if there's no pseudo-terminal set. nano needs to know the terminal type and size to make up its screen layout, and without that it'll give up.

I don't recall how you're logging in, but if it's through ssh, you'll need ssh -t.

Re: Cannot open nano in boot shell

Posted: Sun Mar 10, 2019 1:27 pm
by TerryC65
This is just a standard login with a monitor and keyboard. (I have set the Pi to boot into a shell.)

Re: Cannot open nano in boot shell

Posted: Sun Mar 10, 2019 5:42 pm
by TerryC65
My local Linux user group answered this.

I set the TERM variable to 'vt220' in env.

I don't know why it's suddenly stopped working though.

Re: Cannot open nano in boot shell

Posted: Sun Mar 10, 2019 8:30 pm
by scruss
Yeah, I'm trying to find where TERM is set. Over serial, it's the getty service. On the console - no idea. It's supposed to have the value linux for the framebuffer console.

Re: Cannot open nano in boot shell

Posted: Sun Mar 10, 2019 9:02 pm
by TerryC65
I initially did it as a shell command, eg:

Code: Select all

TERM='vt220'
but that isn't persistent.

Eventually, I added that command to .bashrc, but that clearly isn't the only way.

Re: Cannot open nano in boot shell

Posted: Tue May 14, 2019 4:57 pm
by imaginaryeast
This is completely happening to me as well. What do I type into .bashrc in order to make this change persistent? I tried just adding the language to the bottom of the file and it made my system flicker and was unresponsive.

Thanks,

Re: Cannot open nano in boot shell

Posted: Thu May 16, 2019 6:48 am
by TerryC65
imaginaryeast wrote:
Tue May 14, 2019 4:57 pm
This is completely happening to me as well. What do I type into .bashrc in order to make this change persistent? I tried just adding the language to the bottom of the file and it made my system flicker and was unresponsive.
How long ago did you download your copy of Raspbian? I've downloaded it several times since I posted this and not had the problem again. (In fact, I'd forgotten all about it.)

AFAICR, I simply added the command to the bottom of .bashrc, which I assume is what you have done.

Re: Cannot open nano in boot shell

Posted: Fri May 17, 2019 2:39 pm
by imaginaryeast
A few days ago. I did 3 seperate images. About to do a third of "lite" version of stretch and hopefully it works without your fix.

Re: Cannot open nano in boot shell

Posted: Fri May 17, 2019 5:01 pm
by imaginaryeast
The new install I did of stretch lite worked fine. But the 3 installs of the full package with extra stuff had that same issue.

Re: Cannot open nano in boot shell

Posted: Sat Jun 08, 2019 4:00 am
by xtal256
I've got the same issue with a fresh install of Raspbian.

Adding the TERM env var worked, but as others have pointed out it's not persistent.

I doubt adding it to .bashrc is the best way, as .bashrc itself checks for '$TERM', implying that it should be set elsewhere.