Teminal issues in -dev

Ken Moffat ken at linuxfromscratch.org
Wed Oct 15 15:52:03 PDT 2008

On Wed, Oct 15, 2008 at 05:10:33PM -0500, Bruce Dubbs wrote:
> After jhalfs completed, I followed the instructions to chroot and set the root 
> passwd.  I used:
> /usr/sbin/chroot "$LFS" /usr/bin/env -i \
>      HOME=/root TERM=linux PS1='\u:\w\$ '     \
>      PATH=/bin:/usr/bin:/sbin:/usr/sbin       \
>      /bin/bash --login
> It's been a while and I don't remember -- The login is in / and not /root.  IS 
> that normal?
 I think so.
> I can't use less or passwd.  less displays the file and immediately terminates. 
 I don't understand: you mean it displays the first page and
terminates, or it outputs the whole file like 'cat' ?

>   passwd gives:
> # passwd
> Changing password for root
> Enter the new password (minimum of 5 characters)
> Please use a combination of upper and lower case letters and numbers.
> Bad password: too short.
> Warning: weak password (enter it again to use it anyway).
> Password changed.
> With no chance of typing the password.
 I wonder if that's a different problem - is shadow correctly
installed ?  I've a vague memory of something a bit like this on one
of my builds.

> man gives:
> man: command exited with status 256: less -s
> This looks like a terminal problem to me.  I have tried a TERM of linux and 
> xterm.  I have LANG=C.  vim works fine, including color.
> I can work around these issues of course, but I'd like to use the tools via 
> chroot.  Any ideas?  Does this impact the book or is it just my forgetfulness?
>    -- Bruce
 If you can't use the tools via chroot, that's a bit of a
showstopper in my opinion.  The TERM problem, if that's what it is,
is new to me.  Any chance you could build strace in chroot and see
what 'less' is doing ?

 I usually build my "after-LFS, before-booting" packages in an
rxvt-unicode term, which means I need to pass a "compatible" TERM to
vim otherwise it goes mono with underlines for highlighting because
the system knows nothing about rxvt-unicode terminals.  The fact vim
is fine for you suggests the terminfo is correctly installed.

das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-dev mailing list