[질문]부팅 중 Freeing unused Kernel Memory 멈춤현상??
글쓴이: leeysa / 작성시간: 금, 2005/04/01 - 5:04오후
VFS : Mounted root readonly Freeing unused Kernel Memory : 64k freed
안녕하세요??
x86에 20메가 짜리 root파일 시스템을 구축 할려고
호스트(컴파일용 데스크탑)에 레드헷 7.3을 깔고,
타겟(임베디드 보드)에 파티션, 파일시스템 생성 을 했습니다.
참고로 SysV init 2.84, busybox-0.60.3,tinylogin-1.02를 컴파일 해서 올렸구요
그리고 커널 ( kernel-2.4.18 ) 설정 대략 맞추고 나서 커널 올리고 lilo실행 하고 난뒤
부팅 할때 위와 같은 메시지를 뿌리더니
멈추더군요.
물론 요 다음은 init를 실행하죠
흠 .. 가만히 생각 해보니 init가 없을때 나오는 메시지가 아니더라구요. 그렇다고 inittab이 없는 것도 아니구요.
커널 소스에 디버그 메시지 넣어서 추적(?)하니깐
다음 명령을 실행 한뒤 멈추더군요.
kernel-dir/init/main.c -> execve("/sbin/init",argv_init,envp_init);
여러분의 조언을 기다립니다.
다음은 inittab의 내용입니다.
# # inittab This file describes how the INIT process should set up # the system in a certain run-level. # # Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org> # Modified for RHS Linux by Marc Ewing and Donnie Barnes # # Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:5:initdefault: # System initialization. si::sysinit:/etc/rc.d/rc.sysinit # What to do in single-user mode. ~~:S:wait:/sbin/sulogin #l0:0:wait:/etc/rc.d/rc 0 #l1:1:wait:/etc/rc.d/rc 1 #l2:2:wait:/etc/rc.d/rc 2 #l3:3:wait:/etc/rc.d/rc 3 #l4:4:wait:/etc/rc.d/rc 4 #l5:5:wait:/etc/rc.d/rc 5 #l6:6:wait:/etc/rc.d/rc 6 # Things to run in every runlevel. #ud::once:/sbin/update # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now # When our UPS tells us power has failed, assume we have a few minutes # of power left. Schedule a shutdown for 2 minutes from now. # This does, of course, assume you have powerd installed and your # UPS connected and working correctly. pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" # If power was restored before the shutdown kicked in, cancel it. pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" # Run gettys in standard runlevels #1:2345:respawn:/bin/bash 1:2345:respawn:/sbin/getty 9600 tty1 2:2345:respawn:/sbin/getty 9600 tty2 3:2345:respawn:/sbin/getty 9600 tty3 4:2345:respawn:/sbin/getty 9600 tty4 5:2345:respawn:/sbin/getty 9600 tty5 6:2345:respawn:/sbin/getty 9600 tty6 # Run xdm in runlevel 5 # xdm is now a separate service #x:5:respawn:/etc/X11/prefdm -nodaemon
그리고 /etc/rc.d/rc.sysinit의 내용입니다.
#!/bin/sh # # /etc/rc.d/rc.sysinit - run once at boot time # # Taken in part from Miquel van Smoorenburg's bcheckrc. # # Set the path PATH=/bin:/sbin:/usr/bin:/usr/sbin export PATH # Read in config data. if [ -f /etc/sysconfig/network ]; then . /etc/sysconfig/network else NETWORKING=no HOSTNAME=localhost fi # Print a banner. ;) echo -en "\t\t\tWelcome to " [ "$BOOTUP" != "serial" ] && echo -en "\\033[1;31m" echo -en "Embedded" [ "$BOOTUP" != "serial" ] && echo -en "\\033[0;39m" echo " Linux" # Set the hostname. echo "Setting hostname ${HOSTNAME}" hostname ${HOSTNAME} # Mount /proc (done here so volume labels can work with fsck) echo "Mounting proc filesystem" mount -n -t proc /proc /proc # Remount the root filesystem read-write. echo "Remounting root filesystem in read-write mode" mount -n -o remount,rw / # Enter root and /proc into mtab. mount -f / mount -f /proc # network setup /sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0 #/sbin/ifconfig eth0 203.224.33.129 netmask 255.255.255.0 /sbin/ifconfig eth0 192.168.114.209 netmask 255.255.255.0
참고 책 : 임베디드 리눅스 (3부 16장 참조) IT EXPERT 한빛
Forums:
댓글 달기