기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.

root 로그인이 안될때.

조회 수 3301 추천 수 0 2009.05.20 06:08:48

               Welcome to DENX Embedded Linux Environment

                Press 'I' to enter interactive startup.

Setting clock : Tue Jun 17 08:29:12 CEST 2008 [  OK  ]

Building the cache [  OK  ]

Setting hostname cpu87:  [  OK  ]

Mounting local filesystems:  [  OK  ]

Enabling /etc/fstab swaps:  [  OK  ]

INIT: Entering runlevel: 3

Entering non-interactive startup

FATAL: Could not load /lib/modules/2.6.25.5/modules.dep: No such file or directory

Bringing up loopback interface:  [  OK  ]

FATAL: Could not load /lib/modules/2.6.25.5/modules.dep: No such file or directory

Starting system logger: [  OK  ]

Starting kernel logger: [  OK  ]

Starting rpcbind: [  OK  ]

Mounting NFS filesystems:  [  OK  ]

Mounting other filesystems:  [  OK  ]

Starting xinetd: [  OK  ]

 

DENX ELDK version 4.2 build 2008-04-01

Linux 2.6.25.5 on a ppc

 

cpu87 login: root

루트로 로그인이 안됩니다..
root 로그인이 가능하게 하는 방법 좀 가르쳐 주시면 감사 드립니다.


유형목

2009.05.20 08:45:08
*.131.98.102

커널 부트옵션에 single 을 추가하여 패스워드없이 부팅한 다음 passwd root 명령으로 새로 지정하거나

부팅하기 전에 NFS Root 파일시스템에 접근이 가능하다면 /etc/passwd 에 해당하는 파일에서
콜론으로 구분되어 있는 두번째 필드를 지워버리고 부팅하면 됩니다.
예) root::0:0:root:/root:/bin/bash

박상진

2009.05.20 18:44:45
*.11.127.22

답글 감사합니다. 2번 패스워드 파일은 예와 같이 되어 있습니다.

1번은 잘 모르겠군요.. 자세한 설명좀 부탁드려요.

유형목

2009.05.20 22:27:29
*.32.117.22

부팅하기 전에 u-boot 프롬프트 상에서 printenv 명령을 내려보면 bootargs 항목이 보입니다.
bootargs 항목의 내용을 setenv bootargs 명령으로 똑같이 써준 다음 맨 끝에 single 이라는 단어를 추가하여 엔터를 칩니다.

setenv bootargs root=/dev/nfs  .. (중간생략) ..  single

boot 명령을 내려 부팅시켜 봅니다.

ELDK를 써본지 오래되서 제대로 single 옵션이 ELDK에서도 적용되는지는 지금 당장은
확인시켜드릴 방법이 없군요. 위에 적은 내용은 x86 시스템을 기준으로 적어본것입니다.

직접 해보시고 결과를 알려주시길 부탁드립니다.

유형목

2009.05.20 22:30:39
*.32.117.22

깜박 잊어버린게 있군요. 혹시나 /etc/shadow 파일이 있는지도 모르겠습니다.
만약 /etc/shadow 파일이 있다면 그 파일도 열어서 두번째 필드를 지워주세요.

login 에 root라고 치거나 passwd에서 엔터만 치면 그냥 프롬프트 떨어질겁니다.

박상진

2009.05.20 23:59:16
*.11.127.22

답글 감사드립니다. shadow 파일은 존재 하지 않았습니다. 하지만 싱글 모드로 들어가기는 성공했습니다.

root 패스워드를 바꿨지만 로긴에선 들어가지 못하더군요. 그래서 유저 아이디 하나 만들어서 들어왔습니다. 들어와서도 root로 사용자 전환을 하려 했지만 안되더군요.

왜 root 사용이 안되는 걸까?. root 권한을 사용할려면 어떻게 해야하는지 알려주시면 감사하겠습니다.

유형목

2009.05.21 00:33:10
*.32.117.22

싱글모드로 부팅이 된다니 일단은 성공이군요. ^^;

root 권한을 사용할수 없다는건 다른 이유가 있을듯 한데..
당장은 기억나는게 없군요.

일단 u-boot 부터 시작되는 커널부팅 로그 전체를 한번 올려주시기 바랍니다.
살펴보고 문제점이 있는지 말씀드리겠습니다.

박상진

2009.05.21 01:20:44
*.11.127.22

U-Boot 1.3.3 (Jun 12 2008 - 07:35:56)

MPC8260 Reset Status: External Soft, External Hard

MPC8260 Clock Configuration
 - Bus-to-Core Mult 4.5x, VCO Div 2, 60x Bus Freq  22-65 , Core Freq 100-300
 - dfbrg 1, corecnf 0x07, busdf 5, cpmdf 1, plldf 0, pllmf 5, pcidf 7
 - vco_out  600000000, scc_clk  150000000, brg_clk   37500000
 - cpu_clk  450000000, cpm_clk  300000000, bus_clk  100000000
 - pci_clk   37500000

CPU:   MPC8260 (HiP7 Rev 13, Mask 0.1 1K49M) at 450 MHz
Board: CPU87 (Rev 04)
I2C:   ready
DRAM:  (60x:9COL) 128 MB
FLASH: (Bank#1 -  8 MB, Bank#2 - 512 kB)  8.5 MB
In:    serial
Out:   serial
Err:   serial
DOC:   No DiskOnChip found
Net:   FCC1 ETHERNET
Hit any key to stop autoboot:  0

=> printenv
bootcmd=run flash_self
bootdelay=5
baudrate=9600
loads_echo=1
ethaddr=00:40:42:01:00:01
eth1addr=00:40:42:01:00:02
eth2addr=00:40:42:01:00:03
netmask=255.255.255.0
hostname=cpu87
loadaddr=1000000
netdev=eth0
consoledev=ttyCPM2
ramargs=setenv bootargs root=/dev/ram rw
mtdargs=setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
addtty=setenv bootargs ${bootargs} console=${consoledev},${baudrate}
flash_nfs=run nfsargs addip addtty;bootm ${kernel_addr}
flash_mtd=run mtdargs addip addtty;bootm ${kernel_addr}
flash_self=run ramargs addip addtty;bootm ${kernel_addr} ${ramdisk_addr}
net_nfs=tftp ${loadaddr} ${bootfile};run nfsargs addip addtty;bootm ${loadaddr}
update=protect off ff000000 ff03ffff;era ff000000 ff03ffff; cp.b 100000 ff000000 40000
upd=run load;run update
loadaddr=200000
ethact=FCC1 ETHERNET
ipaddr=192.168.1.100
serverip=192.168.1.117
gatewayip=192.168.1.1
bootfile=uImage.dat
load=tftp 100000 u-boot.bin
rootpath=/opt/eldk/ppc_82xx
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=$[serverip}:/opt/eldk/ppc_82xx
stdin=serial
stdout=serial
stderr=serial

Environment size: 1194/2044 bytes
=> setenv nfsargs setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
=> saveenv
Saving Environment to EEPROM...

U-Boot 1.3.3 (Jun 12 2008 - 07:35:56)

MPC8260 Reset Status: External Soft, External Hard

MPC8260 Clock Configuration
 - Bus-to-Core Mult 4.5x, VCO Div 2, 60x Bus Freq  22-65 , Core Freq 100-300
 - dfbrg 1, corecnf 0x07, busdf 5, cpmdf 1, plldf 0, pllmf 5, pcidf 7
 - vco_out  600000000, scc_clk  150000000, brg_clk   37500000
 - cpu_clk  450000000, cpm_clk  300000000, bus_clk  100000000
 - pci_clk   37500000

CPU:   MPC8260 (HiP7 Rev 13, Mask 0.1 1K49M) at 450 MHz
Board: CPU87 (Rev 04)
I2C:   ready
DRAM:  (60x:9COL) 128 MB
FLASH: (Bank#1 -  8 MB, Bank#2 - 512 kB)  8.5 MB
In:    serial
Out:   serial
Err:   serial
DOC:   No DiskOnChip found
Net:   FCC1 ETHERNET
Hit any key to stop autoboot:  0
=>

=> printenv
bootcmd=run flash_self
bootdelay=5
baudrate=9600
loads_echo=1
ethaddr=00:40:42:01:00:01
eth1addr=00:40:42:01:00:02
eth2addr=00:40:42:01:00:03
netmask=255.255.255.0
hostname=cpu87
loadaddr=1000000
netdev=eth0
consoledev=ttyCPM2
ramargs=setenv bootargs root=/dev/ram rw
mtdargs=setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
addtty=setenv bootargs ${bootargs} console=${consoledev},${baudrate}
flash_nfs=run nfsargs addip addtty;bootm ${kernel_addr}
flash_mtd=run mtdargs addip addtty;bootm ${kernel_addr}
flash_self=run ramargs addip addtty;bootm ${kernel_addr} ${ramdisk_addr}
net_nfs=tftp ${loadaddr} ${bootfile};run nfsargs addip addtty;bootm ${loadaddr}
update=protect off ff000000 ff03ffff;era ff000000 ff03ffff; cp.b 100000 ff000000 40000
upd=run load;run update
loadaddr=200000
ethact=FCC1 ETHERNET
ipaddr=192.168.1.100
serverip=192.168.1.117
gatewayip=192.168.1.1
bootfile=uImage.dat
load=tftp 100000 u-boot.bin
rootpath=/opt/eldk/ppc_82xx
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.117:/opt/eldk/ppc_82xx
stdin=serial
stdout=serial
stderr=serial

Environment size: 1196/2044 bytes
=> run net_nfs
Using FCC1 ETHERNET device
TFTP from server 192.168.1.117; our IP address is 192.168.1.100
Filename 'uImage.dat'.
Load address: 0x1000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
     done
Bytes transferred = 1333473 (1458e1 hex)
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-2.6.25.5
   Created:      2008-06-17   7:14:43 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1333409 Bytes =  1.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Linux version 2.6.25.5 (root@linux-sn0c) (gcc version 4.2.2) #2 Tue Jun 17 09:14:41 CEST 2008
Microsys CPU87 PowerPC port
arch/ppc/syslib/m82xx_pci.c: The PCI bus is 37500000 Mhz.
Waiting 0.5 seconds after deasserting RST...
Zone PFN ranges:
  DMA             0 ->    32768
  Normal      32768 ->    32768
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->    32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.117:/opt/eldk/ppc_82xx ip=192.168.1.100:192.168.1.117:192.168.1.1:255.255.255.0:cpu87:eth0:off panic0
PID hash table entries: 512 (order: 9, 2048 bytes)
cpm_uart: console: compat mode
console [ttyCPM2] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 127104k available (2124k kernel code, 544k data, 148k init, 0k highmem)
Mount-cache hash table entries: 512
net_namespace: 152 bytes
NET: Registered protocol family 16
cpu87: Init
PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 0000:00:00.0
PCI: Cannot allocate resource region 1 of device 0000:00:00.0
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
JFFS2 version 2.2. (NAND) ⓒ 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: CPM driver $Revision: 0.02 $
ttyCPM0 at MMIO 0xf0011a80 (irq = 4) is a CPM UART
ttyCPM1 at MMIO 0xf0011a90 (irq = 5) is a CPM UART
ttyCPM2 at MMIO 0xf0011a00 (irq = 40) is a CPM UART
ttyCPM3 at MMIO 0xf0011a20 (irq = 41) is a CPM UART   
brd: module loaded
Driver 'sd' needs updating - please use bus_type methods
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
CPU87-0: Found 4 x16 devices at 0x0 in 64-bit bank
 Intel/Sharp Extended Query Table at 0x0035
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
CPU87 flash bank 0: Using static image bank1 partition definition
Creating 4 MTD partitions on "CPU87-0":
0x00000000-0x00040000 : "u-boot"
0x00040000-0x00240000 : "kernel"
0x00240000-0x00540000 : "initrd"
0x00540000-0x00800000 : "user"
No valid DiskOnChip devices found
i2c /dev entries driver
pcf8563 0-0051: chip found, driver version 0.4.2
pcf8563 0-0051: rtc core: registered pcf8563 as rtc0
eth0: FCC ENET Version 0.3, 00:40:42:01:00:01
eth1: FCC ENET Version 0.3, 00:40:42:01:00:02
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
pcf8563 0-0051: setting system clock to 2008-04-11 21:42:11 UTC (1207950131)
IP-Config: Complete:
     device=eth0, addr=192.168.1.100, mask=255.255.255.0, gw=192.168.1.1,
     host=cpu87, domain=, nis-domain=(none),
     bootserver=192.168.1.117, rootserver=192.168.1.117, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.117
Looking up port of RPC 100005/1 on 192.168.1.117
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 148k init
modprobe: FATAL: Could not load /lib/modules/2.6.25.5/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.25.5/modules.dep: No such file or directory

INIT: version 2.86 booting
                Welcome to DENX Embedded Linux Environment
                Press 'I' to enter interactive startup.
Setting clock : Fri Apr 11 21:42:15 CEST 2008 [  OK  ]
Building the cache [  OK  ]
Setting hostname cpu87:  [  OK  ]
Mounting local filesystems:  [  OK  ]
Enabling /etc/fstab swaps:  [  OK  ]
INIT: Entering runlevel: 3
Entering non-interactive startup
FATAL: Could not load /lib/modules/2.6.25.5/modules.dep: No such file or directory
Bringing up loopback interface:  [  OK  ]
FATAL: Could not load /lib/modules/2.6.25.5/modules.dep: No such file or directory
Starting system logger: [  OK  ]
Starting kernel logger: [  OK  ]
Starting rpcbind: [  OK  ]
Mounting NFS filesystems:  [  OK  ]
Mounting other filesystems:  [  OK  ]
Starting xinetd: [  OK  ]

DENX ELDK version 4.2 build 2008-04-01
Linux 2.6.25.5 on a ppc

cpu87 login: test
Password:
No directory /home/ugori!
Logging in with home = "/".
-bash-3.2$
-bash-3.2$ ls
bin  etc     lib  opt   root  sys       tmp  var
dev  images  mnt  proc  sbin  tftpboot  usr

답글 감사드립니다.
로그 화면 입니다. 문제점 지적 부탁드립니다.
리눅스 debian
보드 cpu87

유형목

2009.05.21 09:45:14
*.131.98.102

부팅로그를 살펴 보았습니다만 크게 이상한 점은 보이질 않네요.

리눅스나 유닉스에서 잘 되어야 할게 안되는 경우 대부분 퍼미션(실행권한)의 문제일 경우가 많습니다.

혹시나 ELDK를 설치한 다음에 아래의 두개의 작업을 빠뜨린게 아닌지 확인해 보시기 바랍니다.
잘 기억이 안난다면 그냥 한번 더 실행해주는 셈치고 따라 하면 됩니다.

# /mnt/cdrom/ELDK_MAKEDEV -d /opt/eldk

# cd /opt/eldk
# /mnt/cdrom/ELDK_FIXOWNER

아래의 링크를 참조하세요.
http://www.denx.de/wiki/view/DULG/ELDKMountingTargetComponentsViaNFS
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
6248 우분투 9.04에서 tslib-1.0설치시 에러.. [2] Kevin 2009-10-24 3500
6247 ramdisk를 위한 lib의 작게 하는 방법 [3] 김경호 2006-04-13 3488
6246 컴파일 시 libc 와 관련된 골아픈 질문.. [11] 칼마 2018-02-27 3472
6245 I2S를 구현하다 문제가 있어 질문 드립니다. [5] 션한물 2013-04-12 3448
6244 [질문] 장시간 사용시에 LCD 문제 [3] 한영민 2007-05-23 3414
6243 [참고] PCI 수정 제안...^^ [1] 이승진 2007-05-11 3414
6242 WinCE 5.0 LCD관련 질문입니다. [4] 김해성 2007-10-06 3388
6241 [v210] SMSC LAN9220 이더넷 문제 [7] 유구무언 2013-06-11 3371
6240 udev 적용문제 확인부탁드립니다. [1] ice179 2014-02-28 3363
6239 [완료] 리눅스 관련 자료는 언제 올라오나요? [4] 임은향 2007-05-14 3361
6238 Android binder 사용 방법 문의 [2] 이윤택 2009-06-11 3335
6237 [re] [요청] LX800에 부팅시 사용되었던 Image file [1] 이제현 2007-08-29 3318
6236 NOR MTD 질문입니다.. [완료] [5] 이홍석 2006-05-06 3312
» root 로그인이 안될때. [8] 박상진 2009-05-20 3301
6234 [질문] CPU 성능 테스트는 어떤 프로그램이 적합할까요? [1] 성진호 2007-06-28 3297
6233 Origen보드에 Linaro-Linux 올리기 -- SD카드에 Kernel 이미지 쓰... [1] 다콩 2012-07-19 3283
6232 리눅스 개발환경에 대해(이더넷, OTG) 활용 방안 [1] pedor11 2013-11-06 3274
6231 이솦보드 키패드 처리 방법?[완료] [3] 김대영 2006-04-12 3252
6230 프레임버퍼 디스플레이가 잘 안되는데요 [1] timul1 2014-02-24 3251
6229 [질문]wince 올리는 방법 [6] 김형기 2007-06-26 3249

사용자 로그인