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

Andrew Bradford andrew at bradfordembedded.com
Mon Aug 20 04:33:39 PDT 2012


On Saturday 18 August 2012 12:12:42 Ron McDowell wrote:
> 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

Hmmm. I don't have a quick answer, but I'll keep my eyes open for one.  
That does seem strange, especially since the busybox config for 
CONFIG_READPROFILE is set in the patches.

There might be a fix for this, if it's actually a bug and not intended 
operation, in a newer version of busybox.  Have you checked through 
their changelogs or git logs?

> ################################################################
> #####
> 
> 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

Our configuration and version of dropbear has never been that great in 
the embedded book.  But if pty and ash are in the errors, do you have 
your kernel configured correctly for ptys?  Are you using the busybox 
configs patch?  Have you tried any other versions/configs of busybox / 
dropbear?

> 
#####################################################################
> ####
> 
> 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.
> 

Based on your fstab, it doesn't look like it's getting sourced 
correctly, proc isn't mounted either (assuming you have proc support in 
the kernel, yes?  PROC_FS kconfig).  And do you have UNIX98_PTYS 
configured in the kernel?

> 
#####################################################################
> ####
> 
> Any ideas, guys?

Sorry, not a whole lot... :(

-Andrew



More information about the Clfs-support mailing list