원문 : http://www.ischo.net -- 조인상 // 시스템 엔지니어

Writer : http://www.ischo.net -- ischo // System Engineer in Replubic Of Korea

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

본문 : http://www.ischo.net -- 조인상 //시스템 엔지니어

+++++++++++++++++++++++++++++++++++++++++++++++++++++++



No utmpx entry. You must exec "login" from the lowest level "shell".

On a headless system with the console directed to serial port a,
boot up messages are seen but no login prompt is displayed.

The output of the ps -ef|grep /dev/console command does not show the
/usr/lib/saf/ttymon process for the /dev/console device.

Executing that process manually per the last line in /etc/inittab does produce a
login prompt and the /dev/console process starts to run, but attempts to login to
the serial console return:
      No utmpx entry. 
The user must execute "login" from lowest level "shell" and the console login process dies.


Resolution  Top

This problem is caused by changing the console login entry in
/etc/inittab from respawn to off.

To fix the problem, change the line back to respawn and execute the init q command to
reread inittab. The console process should start normally, the user can login, and that process
will respawn if killed.

If it is still not working, type:

      # cat /dev/null > /var/adm/utmpx
      # cat /dev/null > /var/adm/wtmpx

This will clean the utmpx and wtmpx, which will fix the problem


Note: The only recommended way to run the /dev/console process is from /etc/inittab.




Problem Statement: Top

When trying to telnet to a host, after typing in the username and password,  you
receive the following error:
No utmpx entry. no utmpx entry you must exec "login" from the lowest level
"shell"
  connection closed by foreign host.

Resolution: Top

This issue will only show up while using the telnet command. Other remote logins
like SSH or rlogin work fine.

First, clear /var/adm/utmpx and wtmpx:
      # cat /dev/null > /var/adm/utmpx
      # cat /dev/null > /var/adm/wtmpx

If this does not clear the issue, check the /etc/inittab for an entry that
starts with the letter t such as Tivoli Storage Manager which by default adds an
entry that starts with id of "tsm". Inittab reserves the letters t and r for
telnet and rlogin as per the man page.

From inittab(4) manpage:
id  One to four characters used to  uniquely  identify  an
        entry.  Do  not  use  the characters "r" or "t" as the
        first or only character in this field.  These  charac-
        ters  are  reserved  for the use of rlogin(1) and tel-
        net(1).

To clear up this issue, edit the /etc/inittab file and change the offending id
tag.

It can be changed by adding a leading letter to it. For example, change "tsm" to
"xtsm". Or just change the offending letter to another letter.  For example,
change "tsm" to "xsm".  Next, run "init q" which forces the system to reexamine
/etc/inittab.

=====================================================================================
Document Audience: SPECTRUM
Document ID: 6000
Title: INIT: Cannot create /var/adm/utmp
Copyright Notice: Copyright ⓒ 2005 Sun Microsystems, Inc. All Rights Reserved
Update Date: Mon Aug 29 00:00:00 MDT 2005
Products:  Solaris,  Solaris 9 Operating System,  Solaris 8 Operating System,  Solaris 7 Operating System,  Solaris 2.6 Operating System,  Solaris 10 Operating System
Technical Areas:  Install/Boot,  Operating System

--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

Keyword(s):INIT, failed, write, utmpx, boot

Problem Statement  Top

On bootup, the following error message appears:

INIT: Cannot create /var/adm/utmp or /var/adm/utmpx
INIT failed write of utmpx entry:" "
INIT: SINGLE USER MODE

Resolution  Top

Possible causes and solutions

For troubleshooting, boot from CD-ROM (the same Solaris [TM] version that the system is running,
if possible) into single user mode, and mount the core Solaris filesystems under /a.



Example:

ok boot cdrom -sw

# /usr/sbin/fsck /dev/rdsk/c0t0d0s0
# mount /dev/dsk/c0t0d0s0 /a



If they are on separate disk slices, repeat the /usr/sbin/fsck and mount steps for the /usr, /var,
and /opt filesystems. Mount them to /a/usr, /a/var, and /a/opt, respectively. Example:



# /usr/sbin/fsck /dev/rdsk/c0t0d0s4
# mount /dev/dsk/c0t0d0s4 /a/var



1. If the core Solaris OE filesystems are mounted from physical disk slices, not
Veritas Volume Manager or Solstice DiskSuite volumes, then make sure the devices in
/a/etc/vfstab point to valid entries in /a/dev and that the entries in /a/dev are
symbolic links to valid devices in the /a/device directory, especially /var if it
is a separate slice.



Example: (cut from /a/etc/vfstab) /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no logging

# /usr/bin/ls -al /dev/dsk/c0t0d0s0

lrwxrwxrwx 1 root root 46 Aug 15 16:20 ../../devices/pci@1f,0/pci@1,1/ide@3/dad@0,0:a



# /usr/bin/ls -al /a/dev/dsk/c0t0d0s0

lrwxrwxrwx 1 root root 46 Aug 15 16:20 ../../devices/pci@1f,0/pci@1,1/ide@3/dad@0,0:a



If /usr/bin/ls -al output does not match, /usr/sbin/fsck and mounted the wrong device,
or your vfstab file may have bad entries in it. Verify the mounted filesystem is really
the root filesystem and fix the /etc/vfstab file if necessary.



2. Make sure the / and /var filesystems are not full. Example:

#/usr/sbin/df -k

Filesystem        kilobytes  used    avail  capacity  Mounted on
/dev/dsk/c0t0d0s0    3277234  2837450  407012    88%        /a



If /a or /a/var has 100% in the capacity column, clean out files on the full filesystem.

3. Make sure the startup scripts under /a/etc/rc[S,2,3].d and the files /a/sbin/rc[S,2,3]
are not corrupted. Run the scripts in shell debug mode by adding "set -x" in these scripts.
This will enable verbose output from the script as it runs, which may help pinpoint
the problem or its source.



Example:

#!/sbin/sh

set -x





4. Verify that there are not files in /a/etc with filenames in the format:

    hostname.<network interface name><some number not relating to the interface instance>.


  The startup script /etc/init.d/network will fail to parse these file names correctly.
  See bugs 4943782 and 4865207.



  Example of problem filename:  /etc/hostname.hme0.9mar2005



5. Check the ownership and permissions of /a/var/adm/utmpx and /a/var/adm/wtmpx.
Since the files may be corrupted, clear their contents and again check permissions
and ownership. Do the following:



# /usr/bin/cp /dev/null /a/var/adm/utmpx
# /usr/bin/cp /dev/null /a/var/adm/wtmpx
# /usr/bin/chown root:bin /a/var/adm/utmpx
# /usr/bin/chmod 644 /a/var/adm/utmpx
# /usr/bin/chown adm:adm /a/var/adm/wtmpx
# /usr/bin/chmod 644 /a/var/adm/wtmpx


There should also be a /a/etc/utmpx and /a/etc/wtmpx that are symbolic links to
the files in ../var/adm/



Example:

# /usr/bin/ls -al /a/etc/?tmpx

lrwxrwxrwx 1 root root 16 Aug 15 2001 /etc/utmpx -> ../var/adm/utmpx
lrwxrwxrwx 1 root root 16 Aug 15 2001 /etc/wtmpx -> ../var/adm/wtmpx



# /usr/bin/ls -al /a/var/adm/?tmpx

-rw-r--r-- 1 root bin 11160 Apr 27 00:00 /var/adm/utmpx
-rw-r--r-- 1 adm adm 334056 Apr 25 17:53 /var/adm/wtmpx



6. Make sure the major number for the sysmsg device matches the major number used by
the device file in /devices. The minor numbers for the entry in the /devices entry
should follow the convention in the example, 0 for the sysmsg
device, and 1 for the msglog device. Example:

#grep sysmsg /a/etc/name_to_major

sysmsg 97

#/usr/bin/ls -al /a/devices/pseudo/sysmsg*

crw------- 1 root sys 97, 1 Jan 12 16:25 /devices/pseudo/sysmsg@0:msglog
crw------- 1 root sys 97, 0 Jan 30 16:38 /devices/pseudo/sysmsg@0:sysmsg



7. Check the /a/etc/inittab file for corruption by comparing to another system running
the same Solaris OE. The /etc/inittab file should not be used for comparison while booted
from CD-ROM, as its configuration is geared toward the installation process not system
recovery. If /etcd/inittab is corrupt, copy one the one from /cdrom/<insert Solaris OE
version here>/Product/SUNWcsr/reloc/etc to /a/etc.



8. Make sure /dev/console exists. It should be a symbolic link to
../devices/pseudo/cn@0:console The major and minor number of the device file
in /devices should be zero. The /etc/name_to_major file should also have a cn
device listed with major number zero.



Example:

# /usr/bin/ls -al /a/dev/console

lrwxrwxrwx 1 root other 30 Aug 15 2001 /dev/console -> ../devices/pseudo/cn@0:console



9. Check the /a/etc/rc[S,2,3].d directories. The files here should be hard linked
to files in /a/etc/init.d



Example:

#/usr/bin/ls -i /a/etc/rcS.d/S30rootusr.sh

327078 /etc/rcS.d/S30rootusr.sh



#/usr/bin/ls -i /a/etc/init.d/rootusr

327078 /etc/init.d/rootusr.sh



10. Make sure /a/sbin/sh is the statically linked form of the command.

Example:

# /usr/bin/file /a/sbin/sh

/a/sbin/sh: ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped


#/usr/bin/file /bin/sh

/bin/sh: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped



If /a/sbin/sh is not the statically linked version, copy the the one in /sbin to /a/sbin.



11. Corruption and/or incorrect entries in /a/etc/mnttab. Make a backup of /a/etc/mnttab
and cat /dev/null to the original.



12. Kernel corruption causing init to fail. This is a common one if the error started
after a patch installation (possibly in multi-user mode). Often, a restore from backup
is required, but the kernel patch can possibly be backed out:



Example:

# /usr/sbin/patchrm -R /a kernel_patch-revision



13. The /var partition did not mount on booting. If the /var directory is a symbolic link
to a filesystem that is not either / or /usr, then the above errors will appear on boot up.
Note: Making /var a separate partition (in /etc/vfstab) is okay. After making a backup
copy, edit /etc/init.d/standardmounts,  modify the file so that the file system which
contains /var is mounted. The following is an example where /var resides in
/export/home/var:



exec < ${vfstab}; readvfstab "/export/home"
if [ "${mountp}" -a -d /export/home ]
  then /sbin/mount -m /export/home > /dev/null 2>&1
  mntlist="${mntlist}/export/home /export/home"
fi



14. Kernel corruption. You may be able to upgrade Solaris to the same version and hardware revision
to replace damaged binaries.
Note: Patch the system afterwards since all patches will be removed by this procedure.


15. Restore Solaris from a known good backup.

16. Reload a new copy of the Solaris Operating Environment.
번호 제목 글쓴이 날짜 조회 수
공지 [공지] 게시자료 열람자유. 불펌금지입니다. 조인상 2010.12.07 20160
93 Solaris Common Error Messages ischo 2010.11.11 48059
92 SUN ILOM 2.0 기능 및 설명 file 조인상 2010.05.24 31248
91 솔라리스 보안취약점 보완을 위한 정책강화 방법 조인상 2010.05.27 29220
90 Solaris 10 Network - IP구성 및 network restart 조인상 2013.04.09 28004
89 CDE (Common Desktop Environment)에 대해서 조인상 2010.08.17 23677
88 NIC 속도 확인방법 조인상 2010.05.12 19786
87 솔라리스10에서 tcp_wrapper 사용하기/설정 조인상 2010.05.12 19578
86 FTP 관련 포트 정리 file 조인상 2010.05.12 19216
85 Sun/Qlogic HBA WWN 알아보는법 조인상 2010.05.12 18274
84 솔라리스8 ssh 설치 조인상 2010.05.12 17354
83 솔라리스 10 접속서비스 설정 (telnet ftp ssh) 조인상 2010.05.12 16474
82 How to D-trace file 조인상 2010.12.22 16424
81 SUN 용 시리얼케이블 제작법 file 조인상 2010.05.12 16189
80 tape 인식이 안될때 재인식시키는 방법 조인상 2010.05.12 16069
79 Oracle Solaris 11 OE 설치 가이드 file 조인상 2011.12.15 15737
78 UTP 케이블. 다이렉트/크로스 제작방법 조인상 2010.05.12 15615
77 SUN T5240용 시리얼케이블 만들기 file 조인상 2014.06.10 15583
76 [ksh] 여러개의 프로세스 kill 시키는 스크립트 조인상 2010.05.12 15567
» telnet 접속시 No utmpx entry. You must exec "login" from the lowes 조인상 2010.05.12 14874
74 Maximum number of Process 값 확인 방법 조인상 2010.06.25 14623
서버에 요청 중입니다. 잠시만 기다려 주십시오...