Files
documents/initrd.md
Zhang, Jialing fc39dde51c initrd简介及重做
修改:     README.md
新文件:   initrd.md

Signed-off-by: Zhang, Jialing <jlzhang@linx-info.com>
2016-08-01 16:41:54 +08:00

22 lines
578 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 重做initrd
本文档简要介绍initrd并以initrd.img为例介绍如何重做initrd
## 什么是initrd
initrd是在系统引导过程中挂载的一个临时根文件系统用来支持两阶段的引导过程。initrd文件中包含了各种可执行程序和驱动程序它们可以用来挂载实际的根文件系统
## 解压initrd
```
gzip -cd initrd.img | cpio -uimd
```
## 压缩initrd
根据需要对解压后的文件进行替换替换完成在initrd目录内执行如下命令进行压缩
```
find . |cpio -H newc -o |gzip -9 > ../initrd.img
```