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 文件,默认编译的时候是没有对应的文件的,这个时候需要我们手动进行生成。
在执行完 makemake installmake 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
 
欢迎加入喵星计算机技术研究院,原创技术文章第一时间推送。
notion image
 
在 qume 上基于内核 6.4.2 版本添加监控系统调用fix ubuntu kernel compiling debian/canonical-certs.pem error