From ba92e66979e10b9efc080feccbb64eba22d3c347 Mon Sep 17 00:00:00 2001 From: liushuncheng <2930054131@qq.com> Date: Sun, 11 Aug 2024 10:06:01 +0000 Subject: [PATCH] =?UTF-8?q?add=20=E6=95=99=E7=A8=8B/3.=E7=94=9F=E6=88=90in?= =?UTF-8?q?itramfs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liushuncheng <2930054131@qq.com> --- 教程/3.生成initramfs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 教程/3.生成initramfs diff --git a/教程/3.生成initramfs b/教程/3.生成initramfs new file mode 100644 index 0000000..6f401a5 --- /dev/null +++ b/教程/3.生成initramfs @@ -0,0 +1,14 @@ +我们开始生成initramfs,生成出来的initramfs必须能用才行 + +假如你是lfs sysv,运行该命令: +dracut --force-add "systemd dracut-systemd systemd-initrd systemd-networkd systemd-sysusers" \ + --add "dm dmsquash-live dmsquash-live-autooverlay kernel-modules bash" \ + --zstd --no-hostonly --no-hostonly-cmdline --no-hostonly-i18n --force \ + --kver 你的内核版本 + +假如你是systemd版本的lfs,运行此命令: +dracut --add "dm dmsquash-live dmsquash-live-autooverlay kernel-modules bash" \ + --zstd --no-hostonly --no-hostonly-cmdline --no-hostonly-i18n --force \ + --kver 你的内核版本 + +注意你的内核必须支持zstd压缩的initramfs \ No newline at end of file