来源:  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. CSS3 background-size:cover/contain

    background-size的cover和contain指定背景图片的自适应方式,只能对整张图片进行缩放. cover是拉伸图片使之充满元素,元素肯定是被铺满的,但是图片有可能显示不全. conta ...

  2. Kafka集群搭建

    1.zookeeper搭建 Kafka集群依赖zookeeper,需要提前搭建好zookeeper zookeeper快速搭建推荐地址:http://nileader.blog.51cto.com/1 ...

  3. ios微信支付成功后点击左上角返回不走回调的问题

    最近做微信支付发现ios9以后出现的跳转其他app后左上角有返回xxx功能会影响微信支付回调,情况如图 返回后不走下面的方法 - (BOOL)application:(UIApplication *) ...

  4. WeakSelf宏的进化(转载)

    我们都知道在防止如block的循环引用时,会使用__weak关键字做如下定义: __weak typeof(self) weakSelf = self; 后来,为了方便,不用每次都要写这样一句固定代码 ...

  5. SQL语句 不足位数补0

    select RIGHT('0000'+CAST( '123'  AS nvarchar(50)),4) DWBH 公式 RIGHT('位数'+CAST(要判断的字段 AS nvarchar(50)) ...

  6. 来看看CBIS 2017中国(上海)大数据产业创新峰会有哪些大师出席

    CBIS 2017中国(上海)大数据产业创新峰会,围绕"数据+产业.企业+数据.技术+人才.品牌+市场.应用+发展"相继展开话题讨论. CBIS 2017中国(上海)大数据产业创新 ...

  7. 关于sbutils中的sblaunch插件的疑惑

    一.sbutils介绍 sbutils是一个开源的越狱手机基础功能的插件包,其中包含sblaunch这个启动插件,该插件可以实现命令行下面打开app并传递一个url. sbutils下载地址:http ...

  8. python hmac-sha1

    def getSignature(Token,paramss1): s = getParam(paramss1) print(s) # for k, v in paramss1.items(): # ...

  9. chrome console 命令简记

    1.快速迭代元素 $$('tr.dispute-num td strong a').map(function (el) { return el.innerHTML; }) 2.复选框选中/取消选中 c ...

  10. C#打印

    public partial class Form1 : Form { PrintDocument printDocument; StringReader lineReader = null; pub ...