linux内核ufs设备树,Linux内核初始化流程笔记
Linux內核初始化流程筆記
分類: LINUX
作者:gfree.wind@http://www.doczj.com/doc/fc580419c1c708a1294a4409.html
博客:http://www.doczj.com/doc/fc580419c1c708a1294a4409.html http://www.doczj.com/doc/fc580419c1c708a1294a4409.html
本文的copyleft歸gfree.wind@http://www.doczj.com/doc/fc580419c1c708a1294a4409.html所有,使用GPL發布,可以自由拷貝,轉載。但轉載請保持文檔的完整性,注明原作者及原鏈接,嚴禁用于任何商業用途。
=============================================================================== =======================
如前文http://http://www.doczj.com/doc/fc580419c1c708a1294a4409.html/space.php?uid=23629988&do=blog&id=3129477的流程,bootloader將kerenel加載到內存中。
全部引導過程是四步
1:boot PROM phase
2:boot Programs phase
3:kernel initialization phase
4:init phase
system初始化,檢測內存和cpu,檢查設備和創建設備樹,設置console
kernel初始化過程
kernel self -initialization 內核自檢
loading of kernel modules 載入內核模塊
reading of the kernel configuration file in /etc/system 讀內核配置文件
staring of the /sbin/init process 運行/sbin/init進程
bootblk是用于裝載第二個引導程序ufsboot的主引導程序
bootblk是被PROM的boot設備的引導扇區裝載的
ufsboot程序是用了裝載兩部分核心genunix和unix的
installboot是用來在磁盤分區上安裝bootblk的
genunix is the platform-independent generic kernel file ,while unix is the platform-specific kernel component.
整個的引導過程:
PROM from the boot sector of the boot device-->bookblk-->ufsboot-->genunix(是一個獨立平臺的普通內核文件) and unix(是一個特殊平臺內核文件)-->其它
這里加載的kernel鏡像,并不是真正的可執行文件,而是一個壓縮的鏡像文件。主要有兩種類型zImage和bzImage(即為Big zImage)。其中zImage小于512KB,而bzImage可以為一個大的壓縮鏡像文件。zImage可以用于在沒有bootloader的情況下,直接啟動kernel。而目前一般都是使用bzImage。以我目前的Fedora13為例,執行file /boot/vmlinuz-2.6.33.3-85.fc13.i686.PAE
1./boot/vmlinuz-
2.6.3
3.3-85.fc13.i686.PAE: Linux kernel x86 boot executable bzImage,
version 2.6.33.3-85.fc13.i686.PAE (mock, RO-rootFS, root_dev 0x902, swap_dev 0x3,
Normal VGA
總結
以上是生活随笔為你收集整理的linux内核ufs设备树,Linux内核初始化流程笔记的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 深度概览卷积神经网络全景图,没有比这更全
- 下一篇: 关于Python的一切:2018年,你读