[Clfs-support] Three oddities, may or may not be related...

Ron McDowell rcm at fuzzwad.org
Sat Aug 18 09:12:42 PDT 2012


On a CLFS-Embedded system, but built with all current packages...

Problem #1, logging in from the console, /etc/profile is not being 
sourced...

     mini2440 login: root
     Password:
     ~ # env
     USER=root
     HOME=/root
     LOGNAME=root
     TERM=vt100
     PATH=/sbin:/usr/sbin:/bin:/usr/bin   # <<------- note the path
     SHELL=/bin/ash
     PWD=/root
     ~ # ls -l /etc/profile
     -rw-r--r--    1 root     root           401 Aug 18 02:35 /etc/profile
     ~ # cat /etc/profile
     # /etc/profile

     # Set the initial path
     export PATH=/bin:/usr/bin

     if [ `id -u` -eq 0 ] ; then
             PATH=/tools/bin:/bin:/sbin:/usr/bin:/usr/sbin # <<--updated 
path
             unset HISTFILE
     fi

     # Setup some environment variables.
     export USER=`id -un`
     export LOGNAME=$USER
     export HOSTNAME=`/bin/hostname`
     export HISTSIZE=1000
     export HISTFILESIZE=1000
     export PAGER="/bin/more "
     export EDITOR="/bin/vi"

     # End /etc/profile
     ~ # . /etc/profile       # <<-- only after I manually source it...
     ~ # env
     HISTFILESIZE=1000
     USER=root
     HOSTNAME=mini2440
     HOME=/root
     PAGER=/bin/more
     LOGNAME=root
     TERM=vt100
     PATH=/tools/bin:/bin:/sbin:/usr/bin:/usr/sbin # <<-- is the PATH reset.
     HISTSIZE=1000
     SHELL=/bin/ash
     PWD=/root
     EDITOR=/bin/vi

##########################################################################

Problem 2, ssh-ing in with dropbear...

     [rcm at samsung550(Linux-CLFS-ARM)]> ssh root at 10.0.0.20
     root at 10.0.0.20's password:
     PTY allocation request failed on channel 0
     shell request failed on channel 0
-----
     [rcm at samsung550(Linux-CLFS-ARM)]> ssh root at 10.0.0.20 "/bin/ash -i"
     root at 10.0.0.20's password:
     /root # /bin/ash: can't access tty; job control turned off

     /root # env
     USER=root
     HOME=/root
     LOGNAME=root
     PATH=/usr/bin:/bin
     SHELL=/bin/ash
     PWD=/root
     SSH_CONNECTION=10.0.0.1 41143 10.0.0.20 22
     /root # [ctl-D]
-----
     [rcm at samsung550(Linux-CLFS-ARM)]> ssh root at 10.0.0.20 "/bin/ash -il"
     root at 10.0.0.20's password:
     /root # /bin/ash: can't access tty; job control turned off

     /root # env
     HISTFILESIZE=1000
     USER=root
     HOSTNAME=mini2440
     HOME=/root
     PAGER=/bin/more
     LOGNAME=root
     PATH=/tools/bin:/bin:/sbin:/usr/bin:/usr/sbin
     HISTSIZE=1000
     SHELL=/bin/ash
     PWD=/root
     SSH_CONNECTION=10.0.0.1 41144 10.0.0.20 22
     EDITOR=/bin/vi

#########################################################################

Problem 3, /dev/pts weirdness...

     ~ # df
     Filesystem           1K-blocks      Used Available Use% Mounted on
     10.0.0.1:/NFSRoot/   723824340  30004540 657591604   4% /
     /tmp                     29936         0     29936   0% /tmp
     none                     29936         0     29936   0% /dev
     /var                     29936        56     29880   0% /var
     ~ # cat /etc/fstab
     # Begin /etc/fstab

     # file system  mount-point  type   options          dump  fsck
     #                                                         order

     rootfs         /            auto   defaults         1     1
     proc           /proc        proc   defaults         0     0
     sysfs          /sys         sysfs  defaults         0     0
     devpts         /dev/pts     devpts gid=4,mode=620   0     0
Hmmm, /dev/pts isn't mounted, let's try that again...
     ~ # mount -a
     ~ # df
     Filesystem           1K-blocks      Used Available Use% Mounted on
     10.0.0.1:/NFSRoot/   723824340  30004540 657591604   4% /
     /tmp                     29936         0     29936   0% /tmp
     none                     29936         0     29936   0% /dev
     /var                     29936        48     29888   0% /var
Still not.  Does it exist?
     ~ # ls -ld /dev/pts
     drwxr-xr-x    2 root     root             0 Jan  1  1970 /dev/pts
Yup.  Anything in it?
     ~ # ls -la /dev/pts
     drwxr-xr-x    2 root     root             0 Jan  1  1970 .
     drwxr-xr-x    8 root     root          2380 Aug 18 15:22 ..
Nope.

#########################################################################

Any ideas, guys?


-- 
Ron McDowell
San Antonio TX




More information about the Clfs-support mailing list