강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

부팅 4단계 : init프로세스의 실행

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

부팅 4단계 : init프로세스의 실행

 

 

 

 

 

스와퍼 프로세스에 의해 init이라는 프로세스가 실행된다.

 

 

 

 모든 프로세스는 그 실행과 함께 설정파일을 읽어들인다.

 

 

 

 init프로세스 또한 /etc/inittab이라는 설정파일을 읽어들여 무엇을, 어떻게, 언제 실행할 것인가를 결정한다.

 

 

 

 init프로세스가 실행될 내용들이 모두 /etc/inittab파일에 정의되어 있다.

 

 

 

 그리고 부팅과정에서 화면으로 출력되는 거의 모든 부팅메시지들은 init프로세스에 의해서 실행되는 /etc/inittab파일의 실행내용이다.

 

 

 

 즉 이후부터의 모든 부팅과정은 /etc/inittab파일의 내용들이 순차적으로 실행되는 것이다.

 

 

 

 그렇다면 이제 우리는 /etc/inittab파일의 내용을 살펴볼 필요가 있다.

 

 

 

 

 

[root@sulinux ~]#cat /etc/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:3:initdefault:

 

# System initialization.

si::sysinit:/etc/rc.d/rc.sysinit

 

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

 

# 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:/sbin/mingetty tty1

2:2345:respawn:/sbin/mingetty tty2

3:2345:respawn:/sbin/mingetty tty3

4:2345:respawn:/sbin/mingetty tty4

5:2345:respawn:/sbin/mingetty tty5

6:2345:respawn:/sbin/mingetty tty6

 

# Run xdm in runlevel 5

x:5:respawn:/etc/X11/prefdm -nodaemon

[root@sulinux ~]#

 

 

 

 

 

init프로세스에 의해 위 파일의 내용들이 한행씩 순차적으로 진행된다.

 

 

 

 물론 주석(#)행은 실행에서 제외된다.

 

 

 

 따라서 이후부터의 설명내용들은 위 파일들의 내용들을 순차적으로 설명한 것이다.

 

 

 

 위 각 행들의 설정형식과 포맷, 그리고 각 옵션들의 의미에 대해서는 뒤에서 아주 자세히 설명한다.

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,070 명
  • 현재 강좌수 :  35,986 개
  • 현재 접속자 :  486 명