openwrt启动过程(脚本)

来源:  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 execs /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.

          

 

转载于:https://www.cnblogs.com/rohens-hbg/p/5049085.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值