来源:  http://wiki.openwrt.org/doc/techref/preinit_mount#first.boot

基本的openwrt启动顺序为:

  1、boot loader loads kernel

boot loader 加载内核

2、kernel loads whilst scaning the mtd partition rootfs for a valid superblock for mounting the SquashFS partition (which contains /etc). More info at technical.details

内核加载同时扫描mtd分区rootfs,查找一个有效的超级块区用来存放squashfs分区(这个分区中包含了/etc目录)

  3、kernel calls /etc/preinit (the kernel considers this to be the init (or root) process

内核调用/etc/preinit

    4、/etc/preinit prepares system for multiuser mode

/etc/preinit为系统准备好多用户模式

    5、/etc/preinit exec/sbin/init which becomes the init (or root) process and launches multiuser

/etc/preinit 执行/sbin/init(/sbin/init变为起始进程)

    6、/sbin/init launches processes according to /etc/inittab.

/sbin/init顺序执行/etc/inittab中的进程

7、Typically the first process launched is /etc/init.d/rcS which causes the scripts in /etc/rc.d which begin with 'S' to be launched (in glob sort order). The /etc/rc.d directory is populated with symlinks to the scripts in /etc/init.d. Each script in /etc/init.d accepts enable and disable arguments for creating and removing the symlinks.

执行顺序是按照/etc/iit.d/rcS中以“S”开头的后面跟的数字顺序。 /etc/rc.d是/etc/init.d的链接文件。

8、These script initialize the system and also initialize daemons that wait for input, so that when all the scripts have executed the normal system is active. On first boot this initializing includes the process of preparing the root filesystem for use.

openwrt启动过程(脚本)的更多相关文章

  1. OpenWrt启动过程分析+添加自启动脚本【转】

    一.OpenWrt启动过程分析 转自: http://www.eehello.com/?post=107 总结一下OpenWrt的启动流程:1.CFE->2.linux->3./etc/p ...

  2. OpenWrt启动过程分析

    openwrt是通过一系列shell脚本进行启动流程的组织,下面是启动流程的提纲.如 果想详细了解启动的过程,则需要仔细走读脚本文件. 1. 在make menuconfig 选择target平台 B ...

  3. 探索 Linux 系统的启动过程

    引言 之所以想到写这些东西,那是因为我确实想让大家也和我一样,把 Linux 桌面系统打造成真真正正日常使用的工具,而不是安装之后试用几把再删掉.我是真的在日常生活和工作中都使用 Linux,比如在 ...

  4. Linux内核启动过程概述

    版权声明:本文原创,转载需声明作者ID和原文链接地址. Hi!大家好,我是CrazyCatJack.今天给大家带来的是Linux内核启动过程概述.希望能够帮助大家更好的理解Linux内核的启动,并且创 ...

  5. spark1.4.1 启动过程

    今天稍微没那么忙了,趁着这个时间,准备把spark的启动过程总结一下(),分享给大家.现在使用的spark1.4.1版本 当然前提是你已经把spark环境搭建好了. 1.我们启动spark的时候一般会 ...

  6. Linux启动过程详解(inittab、rc.sysinit、rcX.d、rc.local)

    启动第一步--加载BIOS 当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的重要,以至于计算机必须在最开始就找到它.这是因为BIOS中包含了CPU的相关信息.设备启动顺序信息.硬 ...

  7. Linux启动过程详解

    Linux启动过程详解 附上两张图,加深记忆 图1: 图2: 第一张图比较简洁明了,下面对第一张图的步骤进行详解: 加载BIOS 当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的 ...

  8. Linux启动过程详述

    http://www.ibm.com/developerworks/cn/linux/kernel/startup/index.html Linux启动第1步:引导内核 Linux启动第2步:内核部分 ...

  9. OGRE启动过程详解(OGRE HelloWorld程序原理解析)

    本文介绍 OGRE 3D 1.9 程序的启动过程,即从程序启动到3D图形呈现,背后有哪些OGRE相关的代码被执行.会涉及的OGRE类包括: Root RenderSystem RenderWindow ...

随机推荐

  1. Leetcode-37-Sudoku Solver(Hard)

    此处先留空 使用搜索和回溯,递归来实现 参考:http://blog.csdn.net/zxzxy1988/article/details/8586289 描述简介,代码量最少

  2. 试制品 (nyoj 542)

    模拟 a 反应物集合 ; b 生成物集合; c 存在的化合物或单质集合; ans 新生成化合物集合 1.如果反应无均在已生成的化合物集合中,则完成反应,将合成物加入c集合 2.对每个方程式的反应物进行 ...

  3. 关于Container With Most Water的求解

    Container With Most Water 哎,最近心情烦躁,想在leetcode找找感觉,就看到了这题. 然而,看了题目半天,硬是没看懂,于是乎就百度了下,怕看到解题方法,就略看了下摘要,以 ...

  4. java zip 批量打包(java.util包和apache.tools包)

    /** * 文件批量打包 * @param zipPath 打包路径 * @param files 批量文件 */ public void zipOut(String zipPath,File[] f ...

  5. HTML学习总结(四)【canvas绘图、WebGL、SVG】

    一.Canvas canvas是HTML5中新增一个HTML5标签与操作canvas的javascript API,它可以实现在网页中完成动态的2D与3D图像技术.<canvas> 标记和 ...

  6. ios系统视频播放器MPMoviePlayerController应用遇到的坑

    最近在做视频播放时应用系统MPMoviePlayerController播放器播放视频,发现点击快进快退会出现黑屏现象,并且点击完成按钮也不会返回,代码以及界面如下所示: NSURL *url=[se ...

  7. Beyond Compare V3.2.3 Beta 中文版

    软件名称: Beyond Compare V3.2.3 Beta 中文版 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win7 / Vista / Win2003 / WinXP 软件大小 ...

  8. Ubuntu14.04 bind9配置

    apt-get install bind9 配置域名: cn.archive.ubuntu.com 对应IP: 10.60.233.244 vim /etc/bind/name.conf.defaul ...

  9. IntelliJ Idea 14 安装 Golang 插件 google-go-lang-idea-plugin 的方法

    IDEA 的编辑器都很强悍,所以现在学Go 也想用他啊,无奈这个插件搞了好久,整理了下流程记录下 1. 当然是下载 IDEA 编辑器了 http://www.jetbrains.com/idea/do ...

  10. 远程连接mysql数据库,1130问题

    远程或使用非127.0.0.1和localhost地址连接时,出现代号为1130问题, ERROR 1130: Host 192.168.2.159 is not allowed to connect ...