type
Post
status
Published
date
Jul 8, 2023
slug
2023/07/08/How-to-manually-generate-initramfs-when-self-compiling-the-kernel-on-ubuntu
summary
tags
开发
Linux
category
Linux
created days
new update day
icon
password
Created_time
Jul 8, 2023 08:41 AM
Last edited time
Mar 1, 2025 01:50 AM
有时候在使用 qemu 进行内核启动调试的时候会需要
initramfs
文件,默认编译的时候是没有对应的文件的,这个时候需要我们手动进行生成。在执行完
make
、make install
、make module_install
之后。mkinitramfs 6.4.2 -o initrd.img
其中 6.4.2 是想要生成 initramfs 的内核版本,
-o
后面跟保存路径。ls -alh initrd.img -rw-r--r-- 1 t t 61M 7月 8 16:42 initrd.img
欢迎加入“喵星计算机技术研究院”,原创技术文章第一时间推送。

- 作者:tangcuyu
- 链接:https://expoli.tech/articles/2023/07/08/How-to-manually-generate-initramfs-when-self-compiling-the-kernel-on-ubuntu
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。
相关文章
2025-04-14
多个具有依赖关系的静态库的链接顺序配置
2025-04-03
使用 systemd-run 限制 Firefox 所使用的内存等资源
2025-04-03
Monitoring and Tuning the Linux Networking Stack: Receiving Data | Packagecloud Blog
2025-03-06
EtherCAT 主站 IgH 学习之 —— xenomai_posix 例程代码学习
2025-03-04
如何在Debian 11上手动编译安装AMD XGBE 10GB网卡驱动
2025-02-28
内核源码中为什么会存在同一个函数的多重定义?什么是符号的强弱性?