> For the complete documentation index, see [llms.txt](https://richardweiyang-2.gitbook.io/kernel-exploring/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://richardweiyang-2.gitbook.io/kernel-exploring/00_index-2.md).

# 内核加载全流程

一般认为start\_kernel是整个内核代码开始的地方。但你有没有好奇过在这个之前都发生了什么。

就好像应用程序main函数在执行之前，加载器会做准备工作一样。在内核真正运行前也要有很多准备工作。这里我们就详细探索一下内核加载的全流程。

首先我们用bochs探索[bootloader如何加载bzImage](/kernel-exploring/00_index-2/02_how_bzimage_loaded.md)。

然后我们看看[内核压缩与解压](/kernel-exploring/00_index-2/04_compress_decompress_kernel.md)

最后记录一些学习过程中的[保护模式内核代码赏析](/kernel-exploring/00_index-2/03_analysis_protected_kernel.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://richardweiyang-2.gitbook.io/kernel-exploring/00_index-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
