add 教程/3.生成initramfs.

Signed-off-by: liushuncheng <2930054131@qq.com>
This commit is contained in:
liushuncheng 2024-08-11 10:06:01 +00:00 committed by Gitee
parent fd13b14143
commit ba92e66979
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

14
教程/3.生成initramfs Normal file
View File

@ -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