06_Linux內(nèi)核引導(dǎo)_201010231143.ppt_第1頁
06_Linux內(nèi)核引導(dǎo)_201010231143.ppt_第2頁
06_Linux內(nèi)核引導(dǎo)_201010231143.ppt_第3頁
06_Linux內(nèi)核引導(dǎo)_201010231143.ppt_第4頁
06_Linux內(nèi)核引導(dǎo)_201010231143.ppt_第5頁
已閱讀5頁,還剩9頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quá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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論