好的,dracut 没有像我认为的那样执行,并且我找不到解决方法。我之前已经创建了多个映像,但现在我正在尝试创建一个实时启动 initramfs 来配合自定义实时 iso。每次我尝试下面的 cmdlind 参数时它都会失败,我也尝试将额外的模块放入 dracut.conf 但每次它都会给我警告(我在另一篇文章中看到它们只是您可以忽略的警告)但是在它返回到终端提示符的消息,我无法选择忽略或继续 dracut 构建等。
#dracut.conf short and sweet
add_dracutmodules+="nfs dmsquash-live livenet "
omit_dracutmodules+="biosdevname"
#dracut terminal argument
dracut -v testinitramfs.img
#output
dracut: Executing: /usr/bin/dracut -v testinitramfs.img
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'livenet' depends on 'dmsquash-live', which can't be installed
dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'dmsquash-live' cannot be found or installed.
我已经安装了软件包我已经安装了 dracut.x86 -tools -network -caps -live -squash ,我的可用模块列表显示 busybox 和 dmsquash-live 但它仍然失败并说找不到它们。在这种情况下,我需要的 dracut 构建命令是否还缺少另一个或更多的依赖项,以使这些模块可以通过 dracut 查看?
dracut --list-modules
/etc/dracut.conf: line 8: biosdevname : command not found
bash crypt terminfo
systemd dm udev-rules
warpclock dmraid virtfs
fips **dmsquash-live** **biosdevname**
systemd-initrd **dmsquash-live-ntfs** dracut-systemd
caps kernel-modules ecryptfs
systemd-networkd kernel-modules-extra ...
modsign **livenet** ...
rescue mdraid squash
watchdog multipath
**busybox** qemu
nss-softokn qemu-net
rdma stratis
rngd crypt-gpg
i18n crypt-loop
convertfs cifs
network-legacy debug
network-manager fcoe
network fcoe-uefi
ifcfg fstab-sys
url-lib iscsi
drm lunmask
plymouth nbd
prefixdevname **nfs**
prefixdevname-tools resume
lvmmerge rootfs-block
btrfs ssh-client
答案1
我相信您缺少一个--no-hostonly
参数,来自手册页:
-H, --hostonly Host-Only mode: Install only what is needed for
booting the local host instead of a generic host.
-N, --no-hostonly Disables Host-Only mode
另一个常见问题是缺少模块所依赖的包,例如device-mapper-multipath
在添加模块之前需要的包multipath
。