Presentation is loading. Please wait.

Presentation is loading. Please wait.

陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009 嵌入式操作系统 陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009.

Similar presentations


Presentation on theme: "陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009 嵌入式操作系统 陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009."— Presentation transcript:

1 陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009
嵌入式操作系统 陈香兰 助教:陈博、李春华 Spring 2009

2 Ubuntu中的系统初始化

3 upstart ubuntu从6.10开始逐步用upstart代替原来的sysinit,进行服务进程的管理。 Event-based

4 Ubuntu中与init相关的几个目录和应用程序
telinit runlevel /etc/event.d/ /etc/init.d/ /etc/rcX.d/

5 /etc/event.d/ 存放了目前upstart需要识别的event 查看/etc/event.d目录 rc-default
rc-default类似于inittab文件,设置默认运行级别的 观察rc-default Ubutnu默认的启动级别是2

6 rc* tty* 发生相应运行级别事件时,需要运行程序的脚本 观察rc2
设置伪终端数目的,即Ctrl+Alt+F(1~6)调出的Console

7 /etc/init.d/ 存放服务(services)或者任务(tasks)的执行脚本 观察/etc/init.d目录
只要安装了一个程序(特别是服务程序daemon),它可以在系统启动时运行,那么它必定会在/etc/init.d/中有一个脚本文件 看rc脚本

8 /etc/rcX.d/ 是一些到/etc/init.d/中脚本的符号链接 S:在启动时运行 数字:执行的先后顺序

9 rc脚本文件中的关键for循环

10 upstart管理的ubuntu启动过程:
1,内核启动init 2,init找到/etc/event.d/rc-default文件,确定默认运行级别(X) 3,触发相应的runlevel事件,开始运行/etc/event.d/rcX 4,rcX运行/etc/init.d/rc,传入参数X 5,/etc/init.d/rc脚本进行一系列设置,最后运行相应的/etc/rcX.d/中的脚本 6,/etc/rcX.d/中的脚本按事先设定的优先级依次启动,直至最后给出登录画面(启动X服务器和GDM) 若不想启动某程序,只要把相应的符号链接从/etc/rc2.d/中删去即可

11 Thanks! The end.


Download ppt "陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009 嵌入式操作系统 陈香兰 xlanchen@ustc.edu.cn 助教:陈博、李春华 Spring 2009."

Similar presentations


Ads by Google