版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、1,第六章 Linux內(nèi)核引導(dǎo),內(nèi)核引導(dǎo)過程 (bootchain) 注:以從硬盤上引導(dǎo)Linux為例,start_kernel() Process 0,init() Process 1,MBR grub,2,BIOS,Power-on Upon power-on the processor first accesses an address that usually resides in read-only memory (ROM, Flash). BIOS (Basic Input Output System) BIOS stores hardware-specific system re
2、source initialization code self-test and hardware identification The interface to BIOS is a uniform set of functions known as interrupts. At load time, Linux uses these interrupts to query available system resources. E.g., hard disk At the end of self-test and hardware identification, the system ini
3、tialization code (BIOS) accesses the hard drive controller to read the MBR. After BIOS completes its initialization, it copies the first 512 bytes from the boot device to address 0 x7c00 and jumps to it.,3,MBR (hard drive),Master Boot Record (MBR) Disk Formatting (head 0, cylinder 0, sector 0),4-ent
4、ry,4,MBR (hard drive),5,Boot Loader,MBR copies the code from the active boot partition to address 0 x7c00 and begins executing it. the active boot partition can have a bootloader that, in turn, loads the operating system. (自舉) Bootloader GRUB (Grand Unified Bootloader) LILO (LInux LOader),6,Boot Loa
5、der - grub,GRUB is an x86-based bootloader thats used to load Linux. (/software/grub) GRUB recognizes filesystems on the boot drives, and the kernel can be loaded by specifying the filename, drive, and partition where the kernel resides. /boot/grub/menu.lst,7,Boot Loader - grub,GRUB is a
6、two-stage bootloader Stage 1 is installed in the MBR and is called by BIOS. Stage 2 is partially loaded by Stage 1 and then finishes loading itself from the filesystem.,8,initrd - initial RAM disk,initrd acts as a root filesystem before the final root filesystem is loaded and initialized. This initi
7、al step allows Linux to initially come up with certain modules precompiled and then dynamically load other modules and drivers from initrd. The major difference to the bootloader is that it loads a minimal kernel and the RAM disk during Stage 2. The kernel initializes using initrd, mounts the final
8、root filesystem, and then removes the initrd. initrd allows for Configuring a kernel at boot time Keeping a small general-purpose kernel Having one kernel for several hardware configurations,9,Kernel initiation - start_kernel(),start_kernel() (init/main.c) start_kernel(), Process 0.,10,Kernel initia
9、tion - start_kernel(),11,Kernel initiation - start_kernel(),12,Kernel initiation - start_kernel(),Starting and locking the kernel Initializing the page cache and page addresses for memory management in Linux Preparing multiple CPUs Displaying the Linux banner Initializing the Linux scheduler Parsing the arguments passed to the Linux kernel Initializing the interrupts, timers, and signal handlers Mounting the initial filesystems (initrd) Finishing system initialization and passing control out of init and ba
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 湖北省十堰市普通高中教聯(lián)體2025-2026學(xué)年高一上學(xué)期12月月考?xì)v史試題
- 跨境電商海外倉2025年服務(wù)標(biāo)準(zhǔn)協(xié)議
- 跨境電商2025年設(shè)備租賃補(bǔ)充協(xié)議
- 2025年辦公樓消防系統(tǒng)檢測合同協(xié)議
- 2025 小學(xué)六年級語文上冊小說三要素梳理課件
- 2025年VR內(nèi)容制作服務(wù)協(xié)議
- 劇院空間設(shè)計(jì)合同協(xié)議(2025年)
- 酒店管理服務(wù)合同協(xié)議(2025年旅游地產(chǎn))
- 2024-2025學(xué)年廣州市黃埔區(qū)九年級(上)期末數(shù)學(xué)試題含答案
- 安全防護(hù)面試題及答案
- 配電紅外測溫課件
- 江蘇省2025年普通高中學(xué)業(yè)水平合格性考試歷史試卷(含答案詳解)
- 小學(xué)階段人工智能在激發(fā)學(xué)生學(xué)習(xí)動機(jī)中的應(yīng)用研究教學(xué)研究課題報告
- 2025年山西大地環(huán)境投資控股有限公司社會招聘116人備考題庫及完整答案詳解一套
- 民爆三大員培訓(xùn)題庫及答案
- 2025年植物標(biāo)本采集合同協(xié)議
- 2025湖北武漢市蔡甸區(qū)總工會招聘工會協(xié)理員4人筆試試題附答案解析
- 2026年企業(yè)出口管制合規(guī)審查培訓(xùn)課件與物項(xiàng)識別指南
- 膽管重復(fù)畸形健康宣教
- 小學(xué)蘇教版科學(xué)三年級上冊(2024新教材)知識點(diǎn)梳理及2025秋期末測試卷及答案
- 2025秋人教精通版英語小學(xué)五年級上冊知識點(diǎn)及期末測試卷及答案
評論
0/150
提交評論