wiki:wade/boot_process

Version 11 (modified by wade, 16 years ago) (diff)

--

Linux 開機流程

boot 來源:鳥哥的 Linux 私房菜

來源:Booting Linux: The History and the Future, Werner Almesberger

1 Introduction

在開機程序中包兩個部份:

  • 將 Linux kernel 載入記憶體中並將控制權傳給它
  • 初始化作業環境

1.1 Load the kernel

在 Boot loader 的第一階段,它會從外部的儲存媒體(storage media)(如硬碟)或是外部的資源(如網路上的 boot server ),取得 kernel 及額外的資料,並且將它們載入正確的記憶位置,接著開始啟動 kernel 。

當 Boot loader 執行一些附加的工作時,例如提供 kernel 一些韌體資訊或命令列,有些 Boot loader 也可以當作 Boot selector ,載入其它的作業系統。

Boot loader 的責任還有一些常見的設計將會在第2節中討論。

1.2 Up and running

當 kernel 開始執行的時候,它會初使化內部的資料結構、偵測硬體並驅動個別的驅動程式,直到它準備好執行 user-space 的程式。在它可以啟動 user-space 環境之前,它需要一個 file system ,所以它必需先掛載 root file system 。

為了要掛載 Root file system , kernel 需要以下二項條件:

  • 它必須知道媒體( media )位於 Root file system 的何處。
  • 它必須透過驅動程式來存取媒體。

最常見的配置是,當 Root file system 是一種簡單的在 IDE 碟磁中的 ext2 分割時,root 裝置的號碼會以一個參數的型式送給 kernel。

出處:Booting Linux: The History and the Future, Werner Almesberger

Attachments (3)

Download all attachments as: .zip